# Admissible Evidence Spans

Restricting answers to specific verified passages that may legitimately be cited, common in regulated and legal settings.

**Rests on:** Citations and Evidence

*LLMs and Generative AI · Retrieval-Augmented Generation*


## Why learn this

This concept explains how AI systems prove they read the right documents before answering your questions. In fields like finance, law, or medicine, an answer is only useful if you can trace it back to a specific, verified source document that existed at a known time. If you cannot point to the exact text that supports a claim, the answer is not trustworthy in a professional setting. Understanding this mechanism lets you build systems where every statement made by an AI can be checked against the original records, turning vague responses into verifiable facts.


## The intuition

Imagine you are a junior analyst at a financial firm. A senior partner asks you a question: 'What were the risks mentioned in the last quarterly filing of Company X?' You open the firm's document system and search. You pull up several documents, each with a few paragraphs that might answer. But you cannot just paste the first thing you find into your reply. You must point to the exact paragraph — the precise span of text — that supports each claim you make. That exact paragraph is an 'admissible evidence span'. It is admissible because it comes from a verified source (the filing), and it is a span because it is a specific, bounded section of text, not the whole document or a vague reference.

Now think about how a modern AI assistant works when you ask a question. The system does not just 'remember' the answer. It finds relevant documents, identifies passages within them, and generates an answer based on those passages. If the answer is grounded in admissible evidence spans — meaning each claim is backed by a specific, traceable passage from a trusted source — then you can click a number in the answer and see the exact sentence that supports it. If the passage is not admissible — say it comes from an unverified blog or a stale version of the filing — the whole answer becomes suspect. In regulated settings, the difference between 'admissible' and 'inadmissible' can be the difference between a compliant answer and a lawsuit.


## An analogy

Think of a courtroom trial. A lawyer cannot just say 'the defendant was at the scene' — she must present evidence: a witness who saw it, a CCTV clip, a signed document. That evidence must be admissible: it must be authentic (not fabricated), relevant (it actually speaks to the case), and properly obtained (not hearsay or illegally gathered). And it must be specific — you cannot cite 'the whole investigation file'; you point to exhibit A, page 3, lines 12–14. An AI system that answers questions is like a lawyer building a case. The 'admissible evidence spans' are the specific passages it may cite. The system's search step is like the lawyer's investigator pulling relevant documents. But the lawyer must check admissibility: is this passage from a trusted source? Is it about the question? Is it specific enough to pinpoint? Only if it passes these checks can it be used in the final argument — the AI's answer.


## Definition

An admissible evidence span is a specific, continuous section of text from a verified document that an AI system is allowed to use and cite as proof for a claim in its answer. It must come from a trusted source, be relevant to the question asked, and be precise enough to identify exactly where the information came from.


## How it connects

This concept sits next to Retrieval-Augmented Generation, which is the practice of giving AI models access to external documents so they can answer questions using that text rather than just their training memory. It is also closely tied to Chunking, which is the process of splitting large documents into smaller, manageable pieces so they can be stored and searched effectively.


## The mathematics

Mathematics is often about patterns and relationships. This concept does not require heavy algebra or calculus; it relies on logic and set theory, which is about classifying things and combining them. The main operations here are: (1) measuring similarity between a question and a passage (which we will express as a number), (2) applying a threshold to decide if a passage is relevant enough, and (3) checking that the passage meets predefined criteria (source, date, access). All of these use simple arithmetic: multiplication, addition, and comparison. The idea of 'closeness' is measured by a score called a dot product — but we will teach that from scratch with numbers, not symbols.

Suppose we have a question: 'What are the risks in Q3 filing?' and a passage. Our system computes a relevance score: perhaps 0.75 on a scale of 0 to 1. We then have a rule: only passages with a score above 0.7 are admissible. Also, the passage must come from a source marked 'verified'. So we check: score 0.75 > 0.7, and source is verified → admissible. The mathematics here is comparison and boolean logic — nothing more than arithmetic and yes/no decisions.

A passage P is an admissible evidence span if and only if:

  (P is from a verified source) AND (relevance_score(P) >= threshold)

In symbols:

  admiss(P) = value( P.verified == True ) AND value( P.score >= t )

where:
- P.verified is a boolean attribute of the passage (True if the source is authenticated)
- P.score is a number between 0 and 1 (relevance, as from a dot product)
- t is a threshold, e.g., 0.7
- 'value(...)' means the comparison yields 1 if true, 0 if false

admiss(P) = 1 means the passage is admissible, 0 means not.


## A worked example

```
We have a question and three candidate passages. Each passage has a relevance score (from 0 to 1) and a 'verified' flag (True/False). Also, our system requires a passage to have a score >= 0.7 and the flag True to be admissible. The candidate passages are:
- Passage A: score = 0.82, verified = True
- Passage B: score = 0.65, verified = True
- Passage C: score = 0.91, verified = False

Step 1: Check passage A: score 0.82 >= 0.7? Yes. verified = True? Yes. → admissible   # Both conditions are met, so A is admissible.
Step 2: Check passage B: score 0.65 >= 0.7? No. → not admissible (even though verified)   # The relevance threshold is not met, so we reject B.
Step 3: Check passage C: score 0.91 >= 0.7? Yes. verified = True? No. → not admissible (even though relevant)   # Source verification fails, so we reject C.

Result: Only Passage A is an admissible evidence span. This means the AI system may cite A in its answer, but not B or C. Note that relevance and verification are two separate gates, and both must pass.
```


## From scratch, in Python

In this concept, we write plain Python code to check whether a passage is admissible. We will use simple building blocks: lists (to hold candidate passages), dictionaries (to store attributes like 'score' and 'verified'), and a function (to encapsulate the rule).

First, the building blocks:
- A list holds multiple items in order: e.g., ['a', 'b', 'c']
- A dictionary stores key-value pairs: e.g., {'score': 0.82, 'verified': True}
- A function is a named block of code we can call with inputs, like a recipe.

Now, the code:

```python
# Define the candidate passages as a list of dictionaries
passage_a = {'id': 'A', 'score': 0.82, 'verified': True}
passage_b = {'id': 'B', 'score': 0.65, 'verified': True}
passage_c = {'id': 'C', 'score': 0.91, 'verified': False}

candidates = [passage_a, passage_b, passage_c]

# The threshold for relevance
def is_admissible(passage):
    return passage['score'] >= 0.7 and passage['verified'] == True

# Check each passage
for p in candidates:
    if is_admissible(p):
        print(p['id'], 'is admissible')
    else:
        print(p['id'], 'is NOT admissible')
```

When you run this code, you'll see:
A is admissible
B is NOT admissible
C is NOT admissible


## The same thing, with a framework

```python
In production, you would use a framework to handle the retrieval and scoring. For example, with a library like `sentence-transformers` (which computes embeddings and similarities) and a vector database like `faiss`, the relevance score (a dot product) would come from a precomputed embedding. But the admissibility check remains a simple filter: you still check `passage.score >= threshold` and `passage.verified`. A framework simply does the heavy lifting of computing scores and storing passages; the logic you just wrote is the core of the check. Libraries like `haystack` or `langchain` provide retrieval components that return passages with metadata; you would still add a filtering step like the one above.
```


## What the code does

Let's step through the code line by line. First, we create three dictionaries, each representing a passage with its id, a score, and a verified flag. Then we put them into a list called `candidates`. The list is just a container; we will loop over it. Next, we define a function `is_admissible(passage)`. A function is like a reusable block: it takes an input (here, a passage dictionary) and returns a Boolean (True or False). Inside the function, we use the `and` operator to require both conditions: the score must be at least 0.7, and the 'verified' key must be True. Then we have a `for` loop: the loop goes through each element in the `candidates` list, one at a time. In each iteration, the variable `p` refers to the current dictionary. We call `is_admissible(p)`. If True, we print a message; else, we print the other message. This is the essential logic of the admissibility check: a simple gate based on score and verification.


## Common misconceptions

**Admissible means the passage is long enough** — A longer passage is more admissible because it has more information.

Admissibility is about source verification and relevance, not length. A long, unverified passage is not admissible, and a short verified one is. In fact: A span is admissible based on its provenance (verified source) and relevance score, not its size.

**If the AI says it confidently, it must be grounded** — The fact that the model is very sure must mean it has good evidence.

A language model can be confident without any retrieved evidence; confidence is not a sign of grounding. In fact: Only evidence that passes the admissibility filter counts; the model's confidence is irrelevant to admissibility.

**Any passage from the same document is equally admissible** — As long as the document is verified, any paragraph from it can be cited.

The passage must be relevant to the question, and its relevance score must meet the threshold. Not every paragraph is relevant In fact: The span must pass both the source verification and the relevance gate.

**An admissible span is always part of the model's training data** — The model memorized the verified documents, so it can answer without retrieval.

LLMs do not reliably memorize specific passages; they draw from training data that may be unverified. Admissible spans come from retrieval at query time. In fact: Admissible spans are always retrieved from the corpus, not pulled from the model's parametric memory.


## In short

Admissible evidence spans are the specific, verified passages from trusted sources that an AI system may cite in its answer. A passage is admissible only if its source is verified and its relevance score passes a set threshold. This is a compliance requirement in regulated fields like finance and law, where every claim must be traceable to an acceptable source. Implementing this in practice means adding a filter to the retrieval pipeline: check metadata and score, and only pass the admissible chunks to the generative model. The simple Python function you wrote embodies that gate.


## Where this is used

This concept is used in many AI systems, especially in regulated industries. Here is how it appears in practice, with the mechanism spelled out.

**Large language models (LLMs):** When a user asks an LLM a question, the model itself does not natively know a document. Instead, a RAG (retrieval-augmented generation) system retrieves likely passages from a corpus, and those passages are placed into the model's context window. The model then generates an answer based on that context. Admissible evidence spans come into play as a post- or pre-generation filter: before the model sees the passages, we filter out those that do not meet the admissibility criteria (verified source, relevance above threshold). This is often implemented as a code function similar to the one above, called on each retrieved passage. The model's output is then accompanied by citation numbers that link to those spans. For example, in a financial assistant, an answer like 'The company faces currency risk (see [1])' would have [1] referring to a specific paragraph from a verified SEC filing. The developer writes this filter in their retrieval pipeline, often after the retrieval step but before the prompt is assembled.

**Small language models (on phones/laptops):** Small models have limited context and memory. Admissible spans are even more important because they cannot 'remember' verified sources; they rely entirely on the retrieved context. On a device, the retrieval runs locally against a small, curated set of documents. The admissibility check is often simplified to a rule: only passages from the device's approved cache pass. The developer writes a filter that checks the passage's metadata (source, date) against an allow-list. The benefit is that the answer is as trustworthy as the cache, but the risk is that the cache might become stale, so the admissibility check also includes a timestamp requirement.

**Retrieval-augmented generation (RAG) systems generally:** In any RAG pipeline — from question-answering over legal documents to customer support over a product manual — the concept is central. The pipeline is: ingest documents, chunk them into spans, embed them into vectors, store in a vector database, retrieve top-k, and then pass to the model. Admissible evidence spans determine what gets retrieved and what is finally cited. Developers often implement a two-stage filtering: first, retrieve the top-k by vector similarity (a dot product), then apply an admissibility mask based on metadata (e.g., 'access group', 'document version', 'is_verified'). They also compute a threshold for the similarity score, tuned on a validation set. A typical implementation uses a vector database that returns scores; the developer wraps the database call with a filter that discards low-scoring or unverified chunks. The failure mode of doing this badly is that the model cites unverified or irrelevant passages, making the answer unreliable — which in law or finance can be dangerous. So the developer must test the threshold and metadata rules carefully.

**Agentic systems that plan and call tools:** An AI agent may decide to query a document store, then decide to search again if the evidence is insufficient. Here, the admissibility check is part of the agent's tool-calling loop. When the agent retrieves candidate passages, it must evaluate whether any span is admissible to answer the question. If not, it may issue a new search query. Developers implement this by giving the agent a 'retrieve' tool that returns only admissible passages. The agent's policy might be: if the retrieval returns zero admissible spans, try a different query. The mechanism is a loop: while no admissible evidence, search with a modified query. The developer writes the agent logic using a framework like LangChain, but the core is the admissibility check they embed in the tool definition.

**Everyday applied machine learning:** In recommendation, forecasting, fraud detection, and other domains, a similar principle applies: predictions must be traceable to the data that supported them. For example, a credit scoring model might be required to explain why a loan was denied. The model's input features (like income, debt) are the 'evidence'. Admissible evidence spans in this context might be the specific rows in the database that indicate the applicant's debt-to-income ratio is high. The developer ensures that the model's decision is based on columns that are admissible (e.g., verified data, not imputed guesses). In practice, this means maintaining data lineage and only allowing certain features into the model. So while the concept is most directly about text spans, the principle of restricting answers to verified, relevant evidence applies broadly.

**What breaks when done badly:** If admissibility is not enforced, the AI might cite a passage from an unverified source (a crawled web page that is actually a competitor's parody), or a passage that is irrelevant but high-scoring due to a weird embedding artifact. The answer may look confident and correct but be unsupportable. In regulated settings, that is a compliance failure. A developer must also handle the case where no passage passes the filter: the honest response is 'I cannot answer with the available evidence' — which is often better than hallucinating. In code, this means the function `is_admissible` might return False for all candidates, and the system must detect that and fall back to a refusal or a request for more information.


---

Read this on the web: https://basavapurushottam.com/learn-ai/admissible-evidence-spans
