How do I make an AI answer from my own documents?
Use retrieval-augmented generation (RAG): find the passages in your documents that match each question and have the AI answer only from them.
A model only knows what it learned in training and what you put in front of it. RAG puts the right page in front of it at the moment of the question. A basic pipeline has four steps:
- Chunking: split each document into small, overlapping pieces.
- Embeddings: turn each piece into a list of numbers that captures its meaning, so similar ideas end up close together.
- Search: find the pieces closest to the question, often combining meaning-based search with keyword search, which catches exact names and codes.
- Grounded answer: send the best pieces to the model with instructions to answer only from them, cite which piece each fact came from, and say "I don't know" when the answer isn't there.
Two things decide the quality. First, measure your search with a set of test questions, so you know whether a change helped. Second, check access: if documents belong to different customers, filter by owner before searching, or one customer's data can leak into another customer's answer.
Vumbli's RAG, Embeddings & Search track builds every piece by hand, from "Why RAG? Give the model the right page" through chunking, cosine similarity, BM25 keyword search, hybrid search and quality metrics, and ends with a mini RAG engine that cites its sources.
Start with these missions
- Why RAG? Give the model the right page (RAG, Embeddings & Search)
- Chunking with overlap (RAG, Embeddings & Search)
- Cosine similarity: how close are two meanings? (RAG, Embeddings & Search)
Tracks that teach it
More questions, answered by building