From Documents to Retrieved Passages
Trace chunking, vector search, hybrid retrieval, and reranking.
generative ai, retrieval, embeddings, searchPrepare a collection
Ingestion collects documents, extracts text, preserves source and permission metadata, and divides text into chunks. Chunk boundaries affect meaning: a table or sentence split badly may lose context. A vector store can index embeddings for similarity search; a keyword index can retain exact terms.
Find the library hours
- Split a library guide into passages and keep each passage's source and access rules.
- Search the user's question with keyword and embedding-based retrieval.
- Combine candidates and rerank them; return the most relevant permitted passages with their source. A missed candidate cannot be fixed by reranking.
See the reasoning
Find a permitted passage
Trace document preparation, retrieval, and reranking. This is a prepared demonstration, not live code execution.
Prepare
- GuideChunks with source and permissionsCurrent focus
- SearchNot run
- CandidatesNone
Preserve source and permission metadata when chunking.
Choices and risks
Hybrid search combines lexical and vector signals, but the combination and similarity metric need evaluation. Approximate nearest-neighbour search trades some recall for speed. Apply access controls before exposing results, and update or delete stale indexed content. Embeddings can capture sensitive information and semantic similarity is not evidence that a passage is true.
Reflect on the concept
Four fixed questions to reinforce the reasoning. Answers are not saved or scored.
