RAG
Answers grounded in your documents
Retrieval-augmented generation lets a model answer from a company's own documents instead of from memory. The work is in the parts you don't see: clean ingestion, honest refusals, and citations you can check. Here is a public example, built and evaluated end to end.
Retrieval-augmented generation
Data Science Docs Assistant
Ask a question about pandas, NumPy, SciPy, scikit-learn, matplotlib, or Plotly. The assistant searches 1,040 pages of reference docs, answers only from what it finds, and cites the library, section, and page. If the docs don't cover a question, it says so.
1,040
Reference pages indexed
100%
Right source in top 5
15 / 15
Out-of-scope questions refused
97%
Answers judged faithful
Settings
Library
Session cost
$0.0003
Data Science Docs Assistant
Ask about pandas, NumPy, SciPy, scikit-learn, matplotlib or Plotly. Answers cite the reference docs.
Use DataFrame.pivot_table to reshape and aggregate in one step:
df.pivot_table(index="region", columns="year",
values="sales", aggfunc="sum")Sources
Static preview of the deployed app. Try it live here or in a new tab.
How it works
Step 1
Step 2
Step 3
Step 4
Step 5
Measured, not assumed
A 72-question evaluation set (57 answerable, 15 deliberately out of scope) decided the chunking strategy and the refusal threshold. A stronger model graded the answers blind.
| Metric | Result | What it means |
|---|---|---|
| Hit rate @ 1 | 0.842 | Correct section ranked first (57 answerable questions) |
| Hit rate @ 5 | 1.000 | Correct section always in the context window |
| MRR | 0.899 | Page-level chunks beat section-level (0.873) |
| Refusals | 15 / 15 | Gate and LLM layer together, with 0 false refusals |
| Faithfulness | 0.970 | Blind LLM-as-judge, 3 runs, randomized A/B order |
Have documents your team keeps searching by hand?
Policies, manuals, contracts, product docs. The same pipeline (clean ingestion, cited answers, and a refusal when the answer isn't there) works on your own knowledge base.
Talk through a RAG project