All demos
RAG Explorer
Give a language model evidence to work with
Retrieval-augmented generation (RAG) searches a collection for relevant text and puts that evidence into the model's context. The model weights stay the same. Can better evidence produce a better answer?
Try this
- Explore the fictional university's documents and choose a question.
- Retrieve relevant documents and inspect the selection.
- Compare answers, then change the evidence and try again.
These short documents describe the fictional Juniper University. Each document is already a single chunk of text.
The question and documents become vectors. Cosine similarity ranks their directions; a high score does not guarantee that a document answers the question.
| Include | Document | Similarity | Text |
|---|---|---|---|
| Retrieve to inspect the ranked documents. | |||
Question Only
The model receives only your question.
Question + Selected Context
The same model also receives the selected documents.
Exact prompt with retrieved context
Retrieve documents to assemble the context.
Instructions ask the model to use the evidence, but do not guarantee that it will. Check whether each answer is supported by the documents. No training occurs here.