RAG & GraphRAG Assistants
RAG and GraphRAG assistants: retrieving evidence, entity graphs, access control, citations and evaluating answers.
A knowledge base assistant answers questions on the basis of a managed corpus of documents. Retrieval-Augmented Generation separates retrieving information from generating text [1]. This makes it possible to use new and private documents, but it does not remove retrieval errors, contradictions between sources or unreliable generation.
Indexing and retrieval
Section titled “Indexing and retrieval”Documents are split into chunks that keep headings, tables, units and provenance. A chunk that is too short loses its conditions; one that is too long adds noise. Retrieval combines lexical and vector models, then applies a cross-encoder where needed. More detail is in semantic search.
The classic probabilistic formulation of RAG treats the retrieved document as a latent variable:
is the question, a document and the answer; and are the parameters of retrieval and generation. In practical systems several chunks are often joined into one context, so this formulation describes a research model, not every RAG pipeline literally.
What GraphRAG adds
Section titled “What GraphRAG adds”GraphRAG builds a graph of extracted entities and relationships, detects communities and writes summaries of them [2]. For a global question such as “what themes connect customer requests”, such summaries can cover the corpus more broadly than a few nearest chunks.
| Task | Suitable retrieval object |
|---|---|
| An exact refund condition | A versioned document and the specific clause |
| Links between companies and products | Entities and verified edges |
| Common themes of a large corpus | Community summaries with backlinks to sources |
The graph contains errors of extraction and name resolution. An edge “related to” must not become a causal claim. Summaries keep links to the primary chunks and are recomputed when the source documents change.
Access and where computation runs
Section titled “Access and where computation runs”Permissions are checked before retrieval and again before an answer is returned. Hiding a private document in the interface is not enough if its text has already entered a shared context. Derived embeddings, caches and summaries also have an owner, a retention period and access rules.
The choice between an external API and our own cluster depends on the requirements for the data, latency and cost. Hosting locally does not by itself prove compliance with every processing rule: logs, backups and remote telemetry are taken into account. Jurisdictional conditions are covered in AI & Data Law Compliance.
Evaluation and abstention
Section titled “Evaluation and abstention”Measure retrieval recall@k, citation precision, the share of supported claims and the correctness of refusals. ALCE shows why answer quality and support by citations need different criteria [3]. A large context window does not guarantee that all the data is used: Lost in the Middle studies the sensitivity to where the relevant information sits [4].
The decision to answer can be expressed through the cost of an error:
is the calibrated probability of being correct, the cost of an error and the cost of refusing or handing over to a specialist. The model is simplified, but it explains why a reference question and a financial commitment need different thresholds.
The control set includes unanswerable questions, outdated documents, conflicting versions and requests for inaccessible data. Splits are made by document and by time, so that chunks from one source do not end up in both training and test.
Reproducibility and how Answerwell applies it
Section titled “Reproducibility and how Answerwell applies it”In the project’s research loop, Answerwell’s own robots and ML/DL models are applied to brand data. The grounds for each architecture, corpus versions, training parameters and compute are recorded according to the general methodology. Public, acquired and internal data each keep their own provenance; describing a method does not mean a proven match with the closed weights of an external platform.
The test set is separated from training by time and by object. Raw observations, failed attempts and unknown values are kept. Models are compared on the same data and budget, with the sample size and errors by segment reported. Illustrative calculations in this article are not a claim about an experiment Answerwell has carried out.
Sources
Section titled “Sources”- Lewis P. et al. (2020). Retrieval-Augmented Generation.
- Edge D. et al. (2024; revised 2025). From Local to Global: A Graph RAG Approach to Query-Focused Summarization.
- Gao T. et al. (2023). Enabling Large Language Models to Generate Text with Citations.
- Liu N. F. et al. (2023). Lost in the Middle: How Language Models Use Long Contexts.