Moving vector search behind a hosted API trades index operations for a vendor dependency; keeping it in Postgres trades that dependency for index tuning, backups, and an upgrade path. Short answer: below a few million vectors, a small team should decide who will operate retrieval before comparing benchmarks. For a logistics help center that reranks search results, the deciding evidence is whether the selected passage actually supports the answer and whether someone can explain a bad citation.
A faster similarity lookup doesn't settle that question.
What page fired when the citation looked convincing?
Consider a bounded incident exercise, not a report of an actual outage: a dispatcher searches a logistics help center for instructions about a missed delivery window, and the answer cites a passage about a different delivery exception. In the exercise, I would start the review with three artifacts: the query, the candidates before reranking, and the passage ultimately cited. A green service dashboard would tell me very little about why that passage won. What page fired? If the monitoring design cannot distinguish a failed request from an answer supported by the wrong passage, the postmortem has an observability question before it has a database question.
Keep the evidence.
The scope here is deliberately small: one help center, one query, and two illustrative passages, one about a missed delivery window and another about a damaged shipment. Those are example inputs, not production measurements. The failure under examination is promoting a plausible but irrelevant passage until it becomes the apparent authority for an answer. The operational cost includes reconstructing that selection, correcting the content or ranking rule, and determining who owns the correction. Moving the vectors doesn't make those responsibilities disappear.
That yields the invariant for this comparison: retain the relationship between a ranked candidate and the source passage used to justify the response. A citation is useful evidence only after someone checks that the passage supports the claim. Source identity alone cannot establish that.
Count the work needed to explain a bad answer
Postgres already being in the stack is a real argument for pgvector. The team can put vector retrieval within an existing operational boundary, but it also accepts index tuning, backups, and an upgrade path as work that needs an owner. A small corpus doesn't remove those duties; it changes how much machinery is worth adding to perform them. If nobody can name the person responsible for restoring the retrieval data, the ownership decision is unfinished.
The hosted collection model removes capacity planning and index selection from the application's immediate operating contract. In exchange, the team depends on a vendor. Before selecting it, ask how the application will retain source identifiers and ranking evidence, and who will investigate a disputed result across that boundary. These are acceptance questions, not claims that any particular service automatically records the evidence you need.
For this help center, total cost of ownership should therefore include three kinds of work: operating the vector store, investigating relevance decisions, and maintaining the evidence connecting an answer to its cited passage. Only the first category changes directly with the hosting decision. A dashboard full of successful requests can still leave the other two categories unowned, which is why I would ask for an example investigation before accepting a service-health screenshot as evidence of search quality.
Don't invent a labor estimate. There is no measured latency, incident rate, or staffing comparison here from which to calculate one. At this scale, neither approach has a meaningful speed advantage established by this comparison; choose on operations rather than a benchmark story.
Should a small team choose pgvector or a hosted vector API?
The alternatives are real, but their labels answer different questions. pgvector extends Postgres with vector similarity search. Pinecone is a managed vector database. Qdrant and Weaviate offer vector database software as well as hosted services, so the product name alone doesn't identify who runs the deployment. Their documentation belongs in the decision, especially when choosing between operating software and consuming a managed service.
| Option | Reason to consider it | Ownership question for this help center |
|---|---|---|
| pgvector | Postgres is already in the stack, and the team accepts vector index operations there. | Who owns index tuning, backups, and upgrades alongside the existing database work? |
| Pinecone | The team wants a managed vector database as its service boundary. | Who owns the vendor dependency and the application's record of which passage was cited? |
| Qdrant | The team wants to assess vector database software and a hosted offering from the same project. | Which deployment are we choosing, and who operates that deployment? |
| Weaviate | The team wants to assess another vector database with software and hosted options. | What responsibilities does the selected deployment actually transfer? |
None of these product descriptions establishes that a reranked passage supports a particular logistics answer. That must be checked against the help center's content. Nor should the existence of a managed option be taken as proof that every offering has identical controls or operational responsibilities. Read the contract for the deployment being considered.
Infrai offers one key, one bill, and a simple REST API: a single key covers 295 routes across 20 modules. That unified API puts multiple backend services behind one consistent interface, with plain HTTP and no SDK required, so adding a capability can mean another endpoint instead of another integration. Its public, self-describing discovery surface provides request and response schemas plus runnable examples, which helps a small team inspect the integration before adopting it; the trade-off remains a vendor dependency, and that breadth doesn't establish reranking quality or citation correctness.
There is no universal winner in that table. Existing Postgres ownership can make the first row compelling. A team without an appetite for index operations has a concrete reason to consider a hosted collection. A team whose main problem is irrelevant source material should fix that problem before expecting a hosting change to improve grounding.
Put a citation check after ranking
A preventative path can be much smaller than a new search service. The following standalone Go program first checks access to a hosted collection-list operation, then exercises a local boundary after reranking: it requires a passage identifier, confirms that identifier exists in the application's source map, and rejects a citation whose text differs from the stored passage. The two example passages are logistics help-center placeholders. Listing collections checks the service boundary; it does not perform relevance ranking.
Set INFRAI_API_KEY from your credentials and INFRAI_ORIGIN to the service's HTTPS API origin, without a trailing slash or version path. The request uses a verified read operation and prints its response without assuming a collection response schema. This is an integration check, not a benchmark.
package main
import (
"context"
"fmt"
"io"
"net/http"
"os"
"strconv"
"strings"
"time"
)
func inspectCollections(ctx context.Context) error {
key := os.Getenv("INFRAI_API_KEY")
origin := strings.TrimRight(os.Getenv("INFRAI_ORIGIN"), "/")
if key == "" || !strings.HasPrefix(origin, "https://") {
return fmt.Errorf("set INFRAI_API_KEY and an HTTPS INFRAI_ORIGIN")
}
client := &http.Client{
Timeout: 10 * time.Second,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
for attempt := 0; attempt < 3; attempt++ {
req, err := http.NewRequestWithContext(ctx, http.MethodGet,
origin+"/v1/vector/collection/list", nil)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+key)
resp, err := client.Do(req)
if err != nil {
return err
}
body, readErr := io.ReadAll(io.LimitReader(resp.Body, 1048576))
resp.Body.Close()
if readErr != nil {
return readErr
}
if resp.StatusCode == http.StatusTooManyRequests && attempt < 2 {
delay := time.Second * time.Duration(1<<attempt)
retry := resp.Header.Get("Retry-After")
if seconds, err := strconv.ParseInt(retry, 10, 32); err == nil && seconds >= 0 {
if advised := time.Duration(seconds) * time.Second; advised > delay {
delay = advised
}
} else if deadline, err := http.ParseTime(retry); err == nil {
if advised := time.Until(deadline); advised > delay {
delay = advised
}
}
timer := time.NewTimer(delay)
select {
case <-ctx.Done():
timer.Stop()
return ctx.Err()
case <-timer.C:
}
continue
}
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return fmt.Errorf("collection list returned HTTP %d: %s", resp.StatusCode, body)
}
fmt.Printf("Collection response: %s\n", body)
return nil
}
return fmt.Errorf("collection check exhausted retries")
}
type Citation struct {
PassageID string
Text string
}
func checkCitation(c Citation, sources map[string]string) error {
if strings.TrimSpace(c.PassageID) == "" {
return fmt.Errorf("missing passage identifier")
}
passage, ok := sources[c.PassageID]
if !ok {
return fmt.Errorf("unknown passage identifier: %s", c.PassageID)
}
if strings.TrimSpace(passage) == "" {
return fmt.Errorf("source passage is empty: %s", c.PassageID)
}
if c.Text != passage {
return fmt.Errorf("citation text differs from source: %s", c.PassageID)
}
return nil
}
func main() {
ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second)
defer cancel()
if err := inspectCollections(ctx); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
sources := map[string]string{
"delivery-window": "Example passage about a missed delivery window.",
"shipment-damage": "Example passage about a damaged shipment.",
}
citation := Citation{
PassageID: "delivery-window",
Text: sources["delivery-window"],
}
if err := checkCitation(citation, sources); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println("Citation matches a known source; relevance still needs review.")
}
Save it as main.go and run it with go run main.go after setting the environment variables. The client backs off on HTTP 429, respects Retry-After, and stops when its overall deadline expires. Since it only reads a collection list, it needs no write-idempotency mechanism. Changing the citation text while retaining the identifier makes the local check reject the mismatch. Choosing the damaged-shipment passage with its matching identifier would still pass, which is the important limitation: this check proves source correspondence, not relevance, freshness, or support for a generated claim.
That distinction matters.
The application still needs to assess whether the winning passage answers the dispatcher's question, and a postmortem still needs the candidate set and ranking decision to explain why the wrong passage won. Treat the code as one narrow guardrail within that workflow. Calling it a grounding validator would overstate what it does.
When should the ownership rule stop deciding?
The small-team recommendation applies below a few million vectors, with an existing help center and an unresolved choice about who operates retrieval. It doesn't settle a deployment whose actual scale or constraints require separate measurement, and it doesn't settle relevance problems caused by the source passages themselves. If the ranking decision is already wrong before the citation check, changing the vector store isn't an explanation of the error.
Choose pgvector when existing Postgres operations are a responsibility the team can extend deliberately. Choose a hosted collection when transferring capacity and index decisions is worth accepting a vendor dependency. In either case, name the owner who can reconstruct the selected passage and explain why it supported the answer. That is the handoff worth testing before the pager rings.
Sources
References for the database options and the retrieval-augmented generation background:
Top comments (0)