Table of contents
In this article
Technical page · Systems
Retrieval and grounded answers
Hybrid search, permissions and citations
- Published
- 8 November 2026
- Last reviewed
- 8 November 2026
- Re-checked every
- 90 days
- Reviewed by
- Ales Analytics engineering
- Used in
- Knowledge systems
In one paragraph
A grounded answer is one built only from passages retrieved from the organisation's own documents, with each claim linked to the passage that supports it. Retrieval decides what the model can possibly say, so most of the engineering goes into finding the right passages for the person asking, respecting what they are allowed to see, and refusing to answer when the evidence is not there.
How it works
- Chunking along structure. Documents are split at their own headings, clauses and tables. Each passage can carry a short description of its place in the document, so it is still findable out of context.
- Hybrid search. Keyword search (BM25) and vector search run side by side. Results are merged with reciprocal rank fusion and the top candidates re-ranked by a cross-encoder.
- Permission filtering. Each passage carries its source document's access list, applied inside the search.
- Answer with citations. The model writes the answer from the retrieved passages and cites them by page or section.
- Groundedness check. Before an answer is shown, each claim is checked against its cited passage. Unsupported claims are removed, or the system answers that the evidence is insufficient.
Design choices and trade-offs
| Choice | Trade-off |
|---|---|
| Chunk size | Small chunks retrieve precisely but lose context; large chunks keep context but dilute relevance |
| Re-ranking | Improves precision noticeably; adds latency per query |
| Graph-based retrieval | Helps with questions about the whole corpus; costs a model call per chunk at indexing time |
| pgvector vs dedicated engine | One database and simpler permissions vs better filtering and independent scaling at large scale |
When not to use it
When the answer is a figure that should come from a database query, query the database. When questions are few and documents short, a well-organised folder and search may be enough.
How we evaluate it
A test set of real questions with the passages that answer them, written by the client's experts. Report recall@k for retrieval, faithfulness of answers to cited passages, the rate of correct "insufficient evidence" responses on questions the documents cannot answer, and permission leakage on test users with restricted access, which must be zero.
Sources
- Lewis et al. (2020), Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (opens in a new tab)
- Anthropic: contextual retrieval (opens in a new tab)
- Qdrant hybrid queries (opens in a new tab), pgvector (opens in a new tab), Microsoft GraphRAG (opens in a new tab)
- Ragas: faithfulness (opens in a new tab)
- Explainer: Grounded answers
Should you have any questions regarding this page, please contact us at solutions@alesanalytics.com.