AI's Reference Materials
RAG starts with a searchable document collection (corpus).
Only documents with proper permissions become search targets.
6 document types show their access status with lock indicators.
Parsing & Normalization: Book Scanning
Raw documents are decomposed into structured blocks.
PDFs, images, and tables must be converted to text blocks for search.
A raw document is separated into 5 block types.
Chunking: Puzzle Pieces
Documents must be split into appropriately-sized chunks for accurate retrieval.
Too large loses precision; too small loses context.
Adjust chunk size with the slider and observe precision changes.
Overlap Visualization
Overlapping portions ensure context continuity
Embedding & Vector DB: Semantic Coordinates
Chunks are converted to vectors and form clusters of similar meanings.
Converting text to numbers lets us measure 'similar meaning' as 'close distance.'
See the chunk → model → vector → DB pipeline and cluster space.
Chunks with similar topics cluster together
Meaning vs Keyword vs Hybrid: Three Search Methods
Different search methods have different accuracy and speed tradeoffs.
Search by meaning, search by keywords, or use both together.
A query is searched with 3 methods simultaneously and results are merged.
Dense
Semantic similarity via embeddings
Sparse
Keyword matching via BM25
Hybrid
Best of both worlds
Filtering: Smart Filters
Metadata filters narrow search scope for efficiency.
Pre-filtering by date, department, or project speeds up search.
Toggle filters to see candidate document count decrease.
Re-ranking: Second Review
AI carefully re-compares top candidates to reorder them.
After initial search, query-document pairs are directly evaluated for ranking.
Click the button to see ranking changes before and after re-ranking.
Context Assembly: Answer Recipe
Selected chunks are assembled into the prompt template.
Most relevant chunks are prioritized within token budget.
See system prompt, context, and query assembled with token budget bar.
Answer with Citations: Grounded Sources
LLM generates answers with citations based on retrieved context.
Each claim specifies its source for verifiability.
Hover over citation numbers to see source information.
What is our vacation policy?
Employees receive 15 days of paid vacation annually, which increases to 20 days after 5 years of service. Unused vacation can be carried over up to 5 days