Vector Search
AIVector search finds content similar to a query by comparing embedding vectors. Instead of matching keywords, it matches meaning: "invoice total" and "amount due" can retrieve the same relevant chunks.
How It Works
- Index — Document chunks are embedded and stored in Pinecone
- Query — User query is embedded with the same model
- Similarity — Vector index returns top-k most similar chunks (e.g., cosine similarity)
- Retrieve — Chunks are passed to the LLM for RAG answer generation
Top-K and Reranking
- Top-k — Number of chunks retrieved (e.g., 10–20). Higher K improves recall but adds latency and context size.
- Reranking — Optional step to reorder results by relevance before generation.
Scoping
DocLD scopes vector search by knowledge base. Only documents in the selected knowledge base are searched. Metadata filters (e.g., document type, date) can further narrow results.
Related Concepts
Vector search is powered by embeddings stored in the vector index (Pinecone). Chunking determines what gets indexed; top-k and reranking control retrieval. Results feed RAG and the LLM. Knowledge bases scope which documents are searched.