Engineering 11 min

Grounding an answer in a policy document

Written by

Akash Kurup

AKINO Labs grounds AI answers in policy documents using structural chunking, metadata filtering, and structural citation. The system defines a clear refusal boundary, escalating queries when documents lack support, are out of scope, or…

The failure mode nobody demos

A retrieval-augmented workflow is straightforward to get working and difficult to get right. Chunk the corpus, embed it, retrieve the nearest neighbours, put them in the prompt. Ten minutes of work produces something that answers most questions correctly, which is exactly the problem: the demo passes and the failure mode is invisible until it reaches a real user.

The failure is not a wrong retrieval. It is a confident answer assembled from chunks that were merely nearby. Ask about parental leave in a corpus that documents only maternity leave and a naive pipeline will produce a fluent, plausible, wrong answer, because nothing in the pipeline is responsible for noticing the gap.

Chunking against the document's own structure

Fixed-size chunking splits policy documents in the worst possible places. A clause and its exception land in different chunks, and retrieval brings back the clause without the carve-out that changes its meaning.

We chunk on the document's structure instead: clause and sub-clause boundaries, headings, table rows. Each chunk carries metadata that survives into the answer.

{
  "text": "Casual leave accrues at 1 day per completed month...",
  "doc_id": "hr-policy-v7",
  "doc_title": "Leave Policy",
  "clause": "4.2.1",
  "effective_from": "2026-04-01",
  "jurisdiction": "MH",
  "audience": ["permanent", "probation"]
}

The metadata is not decoration. Jurisdiction and effective date are filters applied before ranking, not facts hoped for afterwards. A question from a Pune employee should never be answered from a clause that applies only in Gujarat, and no amount of embedding similarity will enforce that. Filter first, rank second.

Citation as a hard constraint

Asking a model to cite its sources produces citations. It does not produce correct ones. The model will happily attach a plausible clause number to a sentence it composed.

We make the citation structural. The generation step emits claims bound to chunk identifiers, and a verification pass checks each claim against the chunk it names before the answer is released.

for claim in answer.claims:
    chunk = corpus[claim.chunk_id]
    if not entailed(claim.text, chunk.text):
        return escalate(reason="unsupported_claim", claim=claim)

An answer that cannot be traced back to retrieved text does not get shown. That single rule removes the entire category of fluent invention, at the cost of a higher escalation rate in the first weeks, which is the correct trade.

The refusal boundary

The most valuable thing one of these systems does is decline. Three conditions send a query to a person rather than to an answer:

  • No sufficient support. The retrieved set does not entail an answer, regardless of similarity scores.
  • Out of scope. The question is about a specific individual case, or requires judgement the documents do not encode. In a clinical or legal deployment this is the majority of the value.
  • Conflicting sources. Two documents both apply and disagree. This one is worth surfacing loudly, because it usually means a real policy conflict that nobody had noticed.

Escalation carries the full conversation, the retrieved candidates and the reason for the refusal. A person picking it up should never have to ask the user to start again.

Measuring the thing you actually care about

Answer accuracy on a curated question set is a weak signal, because the questions were written by someone who knew what the corpus contained. We evaluate on three axes instead:

  • Groundedness. Of the answers given, what proportion are fully entailed by cited text? This should be effectively 100 per cent, because the verification pass enforces it. Anything less is a bug in the checker.
  • Coverage. Of the questions the corpus can answer, how many were answered rather than escalated? This is where tuning effort belongs.
  • Escalation precision. Of the queries escalated, how many genuinely needed a person? A system that escalates everything is trivially grounded and useless.

Coverage and escalation precision move against each other, and the right operating point is a business decision rather than a technical one. Groundedness is not negotiable at any operating point.

What this costs

Verification adds a second model call on every answer, and structure-aware ingestion is meaningfully more work than a text splitter. In exchange, the number that matters in production, the proportion of answers a compliance team will stand behind, stops being a hope.

Frequently asked questions

What is a common failure mode in naive retrieval-augmented generation (RAG) systems?

A common failure mode in naive RAG systems is producing confident, yet incorrect, answers. This happens when the system retrieves document chunks that are merely nearby the query, rather than directly relevant. The pipeline fails to identify gaps in the retrieved information, leading to plausible but wrong responses that can go unnoticed until reaching a user.

How does AKINO Labs approach document chunking for policy documents?

AKINO Labs chunks policy documents based on their inherent structure, such as clause boundaries, headings, and table rows. This prevents critical information from being split across chunks. Each structural chunk includes metadata like jurisdiction and effective date, which are then used as filters before ranking retrieved content, ensuring relevance.

How does AKINO Labs ensure citation accuracy in AI-generated answers?

AKINO Labs ensures citation accuracy by making it structural. The system binds claims in the generated answer to specific chunk identifiers. A verification pass then checks each claim against its named chunk. If a claim is not fully entailed by the cited text, the answer is not shown, preventing the system from inventing information.

Under what conditions does an AKINO Labs system decline to answer a query automatically?

An AKINO Labs system declines to answer automatically under three conditions. These are: if there is no sufficient support in the retrieved documents to form an answer, if the query is out of scope (e.g., a specific individual case), or if conflicting sources are found within the applicable documents.

Sources and further reading

  1. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Lewis et al., NeurIPS 2020. The paper that named retrieval-augmented generation: answers are generated from passages retrieved from an index, so each one can be traced to its source.
  2. Lost in the Middle: How Language Models Use Long Contexts. Liu et al., TACL 2024. Models use information at the start or end of a long context far better than information in the middle, one reason retrieval precision matters more than context size.

0 comments

2000 characters left

Loading comments
Buy what exists. Build what doesn't.

Want this applied to your own operation?

A working session on your own estate, with a prioritised view of what to build, what to buy and what to leave alone.

Or speak to us directly
Kinjal DesaiFarhad WadiaHemang ShahMonesh ShahaniHeld by a principal. We respond within one business day.