Architecture
What you get out of the box
- Hybrid retrieval (dense + sparse) with configurable weights
- Cross-encoder reranking so the LLM sees genuinely relevant chunks
- Citation spans in the response: which chunk and which character range
- Eval harness hook so you can score against your own gold set
- One HTTP endpoint that does retrieve + rerank + generate end-to-end
Example prompt
In the dashboard:Cookbook
For full code that shows ingestion, embedding, retrieval, and generation against the OpenAI-compatible API, see the RAG cookbook.Eval pattern
The RAG agent expects you to bring your own eval set. Three columns are enough:| column | meaning |
|---|---|
question | The user question |
expected_answer | The reference answer for human or LLM-judge scoring |
expected_citations | The chunk ids the model should cite |