# Retrieval and grounded answers

> How hybrid retrieval, permission filtering, citations and groundedness checks produce answers drawn only from your own documents.

- Web page: https://www.alesanalytics.com/docs/retrieval-and-grounded-answers
- Markdown: https://www.alesanalytics.com/docs/retrieval-and-grounded-answers.md
- Last updated: 2026-11-08
- Publisher: Ales Analytics

Technical page. Hybrid search, permissions and citations. Published 2026-11-08. Last reviewed 2026-11-08. Reviewed by Ales Analytics engineering.

## 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.

![Figure 1. Hybrid retrieval, permission filtering and the groundedness check.](https://www.alesanalytics.com/diagrams/sa-retrieval.svg)

## 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](https://arxiv.org/abs/2005.11401)
- [Anthropic: contextual retrieval](https://www.anthropic.com/engineering/contextual-retrieval)
- [Qdrant hybrid queries](https://qdrant.tech/documentation/concepts/hybrid-queries/), [pgvector](https://github.com/pgvector/pgvector), [Microsoft GraphRAG](https://microsoft.github.io/graphrag/)
- [Ragas: faithfulness](https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/faithfulness/)
- Explainer: [Grounded answers](https://www.alesanalytics.com/explainers/grounded-answers)

## Contact

solutions@alesanalytics.com, or https://www.alesanalytics.com/contact.

- Every page as Markdown: https://www.alesanalytics.com/llms.txt
