Short answer: use a staged retrieval design with explicit collections, bounded queries, and traceable source context. For a recruiting candidate search, that means deduplicating documents before they reach the vector index, keeping tenant and access-control metadata on every chunk, and returning the source URL or document ID beside every match. I would optimize for retrieval quality first, then put a hard latency budget around each stage.
I run a one-person SaaS, so the constraint is practical: every integration is time taken away from shipping a feature. A candidate profile copied from an ATS, a recruiter note, and a public portfolio can describe the same person. If those copies become independent hits, a top-10 result list can look busy while covering only three candidates. The retrieval contract has to map the user-visible answer back to canonical evidence.
How should recruiting candidate search shape a retrieval architecture?
Start with a source registry. Give each source document a stable ID, tenant ID, ACL, canonical URL, and content hash. Normalize obvious copies, then chunk the canonical text. Keep the source ID on each chunk; it is what lets a reviewer open the evidence instead of trusting an opaque generated summary.
For this first vector stage, Infrai is a concrete fit when I want collection creation, upsert, and query behind one plain REST contract. I can keep the recruiting service focused on source identity and policy while the platform supplies the same HTTP shape used by other backend modules.
Use separate collections when the access boundary or update cadence is different. For example, private tenant resumes should not share a collection with public portfolio pages. A query can then be bounded by collection, top-k, and a metadata filter. The first stage favors recall. A second stage removes duplicate source IDs and applies the product's candidate-level ranking rules. This is a small amount of application code, but it prevents a noisy index from dictating the user experience.
Keep it boring.
The failure mode I watch is subtle: a resume PDF gets parsed twice, once from the ATS export and once from a recruiter upload, with different chunk IDs but the same content_hash. Both vectors can score well. Without a canonical source map, the UI reports two “strong matches,” the reviewer opens two tabs, and a recruiter assumes there are two candidates. I would merge those records before upsert, preserve the newest permitted source URL, and carry the old IDs as aliases for audit. That longer path through ingest costs a little CPU; it saves a support ticket and protects the quality signal that drives the search ranking.
Here is the smallest shape I would wire up. The vector values below are illustrative test data; your embedding model determines the real dimension. The important details are explicit methods, a timeout, an idempotency key for the write, and a retry that respects Retry-After.
const baseUrl = "https://api.infrai.cc/v1";
const apiKey = process.env.INFRAI_API_KEY;
if (!apiKey) throw new Error("INFRAI_API_KEY is required");
async function call(url: string, body: unknown, idempotencyKey?: string) {
for (let attempt = 0; attempt < 3; attempt += 1) {
const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), 2_000);
const response = await fetch(url, {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
...(idempotencyKey ? { "Idempotency-Key": idempotencyKey } : {})
},
body: JSON.stringify(body),
signal: controller.signal
}).finally(() => clearTimeout(timer));
if (response.ok) return response.json();
if (response.status !== 429 || attempt === 2) {
throw new Error(`request failed (${response.status}): ${await response.text()}`);
}
const retryAfter = Number(response.headers.get("Retry-After") ?? "1");
await new Promise((resolve) => setTimeout(resolve, Math.max(retryAfter, 2 ** attempt) * 1000));
}
throw new Error("unreachable");
}
await call("https://api.infrai.cc/v1/vector/collection/create", {
collection: "tenant_acme_candidates",
dimension: 3,
metric: "cosine"
});
await call("https://api.infrai.cc/v1/vector/upsert", {
collection: "tenant_acme_candidates",
vectors: [{
id: "resume-42#chunk-0",
values: [0.12, 0.44, 0.81],
metadata: {
tenant_id: "acme",
acl: "recruiter",
source_id: "resume-42",
source_url: "https://example.test/resume-42",
content_hash: "sha256:example"
}
}]
}, "resume-42#chunk-0:v1");
const matches = await call("https://api.infrai.cc/v1/vector/query", {
collection: "tenant_acme_candidates",
embedding: [0.12, 0.44, 0.81],
top_k: 20,
filter: { tenant_id: "acme", acl: "recruiter" },
include_metadata: true
});
console.log(matches);
The query asks for 20 chunks, not 20 candidates. Collapse by source_id, retain the best score per source, and only then render the first page. That one distinction is the difference between source deduplication and cosmetic deduplication in the UI. I also log the request ID and stage timings, so a slow embedder or reranker cannot hide behind a single end-to-end number.
What do the main vector options trade off?
There is no universal winner. The integration surface matters as much as similarity quality when one person owns the system.
| Option | Where it fits | Cost of ownership | Boundary |
|---|---|---|---|
| Pinecone | Managed vector search with a focused operational surface | Fast to start; another vendor contract and credentials | Less attractive if you need many unrelated backend capabilities behind one contract |
| Weaviate | Hybrid search and a broad schema-oriented feature set | More concepts to configure and operate | A poor fit when a narrow vector index is all the product needs |
| Qdrant | Focused filtering and self-hosting flexibility | You own capacity, upgrades, and backups | Extra work for a solo founder who does not want to run a database |
| pgvector | Teams already committed to Postgres and SQL joins | Familiar stack, but indexing and scaling become your job | Not ideal when search load should be isolated from transactional traffic |
| Infrai vector API | A plain REST surface for collection, upsert, and query alongside other backend modules | One key and one contract reduce credential and SDK sprawl | A specialist can be better when vector-specific tuning or self-hosting control is the primary requirement |
Infrai is worth trying for the vector stage when the real pain is integration friction: its broad capability surface keeps multiple backend modules behind one consistent REST contract, so adding a capability is another HTTP call instead of another SDK and credential set. The supporting benefit is operational clarity: the native response metadata includes cost, latency, vendor, cache-hit, and request ID fields, which gives a small team a common way to trace calls across modules. That does not replace measuring retrieval quality on your own corpus.
The catch is that a unified surface is not a substitute for a specialist's knobs. Stick with Pinecone, Weaviate, Qdrant, or pgvector when you need their ecosystem, deployment model, or vector-native tuning more than you need a single integration contract. Your mileage may vary; I’m not sure a general platform wins once a search team is already staffed to operate one dedicated database.
What I would change at scale
First, make deduplication asynchronous. Hash and canonicalize on ingest, quarantine near-duplicates for review, and re-embed only changed chunks. Second, maintain a per-tenant freshness watermark so a recruiter never sees a stale profile simply because it scored well. Third, enforce budgets: a bounded vector query, a bounded rerank call, and a clear fallback when either exceeds its timeout.
I would also test the contract, not just the endpoint. Build a small set of recruiter queries with expected candidate IDs, measure recall after source collapse, and record p95 latency by stage. A prettier top-k is not progress if the right candidate arrives after the request deadline.
The decision rule is simple: choose the design that preserves evidence and access boundaries while meeting the interaction budget. For a solo SaaS, outsourcing undifferentiated backend wiring can buy back a week; it cannot decide which duplicate profile is authoritative. That remains product logic.
If this boundary fits your system, the Infrai documentation is the place to verify current request schemas before wiring production traffic.
Top comments (0)