How AI's Actually Work — HAAW

Grounding and Verification

How Do We Give the Model Something Better Than Plausibility to Work With?

After Hallucination, Change the System

The previous page established a crucial fact: a mechanically correct generation process can produce a false statement. Telling the same generator to “be more accurate” does not by itself create evidence. A stronger system can bring relevant evidence into the inference and then test important claims against evidence or computation.

PLAUSIBILITY ONLY question → model → answer GROUNDED + VERIFIED question → evidence → model → candidate answer → check → supported answer / correction / uncertainty

Three Different Jobs

Grounding

Supply relevant external or authoritative information that the model can use for this request.

Generation

Use the model, its weights and the supplied context to construct an answer.

Verification

Test important claims against evidence, computation, tools, constraints or other reliable checks.

Grounding gives the model evidence. Verification asks whether the answer actually agrees with it.

Where Does Grounding Come From?

Documents

Manuals, policies, papers, reports, records or other supplied files.

Databases

Structured records queried for specific current or authoritative values.

Search

Relevant external sources retrieved for the current question.

Tools / APIs

Systems that return measurements, calculations, schedules, account data or other results.

Sensors

In embodied or instrumented systems, measurements can provide current physical-world state.

Human Input

A user or expert can supply facts, constraints, corrections or source material.

The Model Does Not Magically See the Source

A document sitting on an SSD, a web page on another server, or a row in a database is not automatically part of the LLM's current context.

OUTSIDE INFORMATION ↓ retrieval / query / tool ↓ selected result ↓ representation inserted into usable context ↓ tokenization ↓ transformer computation

Something in the surrounding system must retrieve or otherwise provide the information.

Retrieval-Augmented Generation — RAG

A common pattern is called Retrieval-Augmented Generation.

User Question
↓
Search / Retrieval
↓
Relevant Passages or Records
↓
Add Retrieved Evidence to Context
↓
LLM Generates Answer

The retrieval system and the language model perform different jobs. Retrieval finds candidate evidence. The LLM uses that evidence while generating.

A Tiny Example

Suppose we ask about a machine whose current configuration is stored in a technical inventory.

QUESTION: "How much RAM is installed in server Bessie?" MODEL WEIGHTS: may know what RAM is may know how to discuss servers do not necessarily contain Bessie's current configuration RETRIEVAL: inventory record → "Bessie: RAM = 32 GB" CONTEXT: question + retrieved record ANSWER: "Bessie has 32 GB of RAM."

The current fact came from the inventory record, not from hoping the model's training happened to contain it.

Retrieval Is Selection

For a large document collection, the system usually cannot stuff everything into the context. It has to choose useful pieces.

many documents ↓ index / search representation ↓ question ↓ rank candidate passages ↓ select a manageable set ↓ place selected evidence in context

This creates a new failure point: the generator cannot faithfully use evidence that the retrieval system failed to find.

Embeddings Return — But With a Different Job

Retrieval systems often use vector embeddings to represent passages and queries so that semantically related material can be found even when the exact words differ.

DOCUMENT PASSAGE → retrieval embedding ─┐ ├→ compare / rank similarity USER QUERY → retrieval embedding ─┘

Do not automatically equate these retrieval embeddings with the token embedding lookup inside the LLM. Both use vectors, but they can be produced by different models and serve different purposes.

Vector Search Is Not Truth Search

A similarity search asks roughly:

"Which indexed items are numerically close to this query under this representation?"

It does not inherently ask:

"Which item contains the final and unquestionably true answer?"

Retrieved material still needs source quality, relevance and interpretation.

Grounding Can Fail

Nothing Retrieved

The needed evidence exists but search misses it.

Wrong Passage

A semantically similar but irrelevant passage ranks highly.

Stale Source

The retrieved information was once correct but is outdated.

Bad Source

The source itself contains an error.

Context Conflict

Multiple sources disagree or the prompt contradicts the evidence.

Generator Error

The correct evidence arrives, but the model misreads, ignores or misstates it.

Citation Is Provenance, Not Magic

A citation can help a reader trace a claim to its supporting source.

CLAIM ↓ SOURCE REFERENCE ↓ reader / verifier can inspect evidence

But merely attaching a citation does not prove the cited source actually supports the sentence. Citation quality itself can be evaluated.

Now Add Verification

Grounding supplies evidence before or during generation. Verification can examine the candidate result afterward—or sometimes during a multi-step process.

evidence + question ↓ model generates candidate answer ↓ extract important claim ↓ compare claim with source / tool / calculation ↓ supported? ─ yes → retain │ no ↓ correct / qualify / retrieve again / say unknown

Different Claims Need Different Verifiers

Arithmetic

Calculator or deterministic computation.

Code

Compiler, tests, execution, static analysis or formal checks where appropriate.

Database Fact

Query the authoritative record.

Document Claim

Compare with the actual supplied text.

Current Event

Check timely, reliable external sources.

Physical State

Use a sensor, instrument or authoritative telemetry when available.

There is no single universal “truth API.” Verification depends on what kind of claim is being made.

Example: Let the Calculator Own the Arithmetic

USER: "What is 17 × 24?" LLM can reason: 17 × (20 + 4) = 340 + 68 = 408 VERIFIER: calculator(17 × 24) → 408 comparison: candidate = 408 verified = 408 MATCH

The language model can explain the procedure while deterministic arithmetic independently checks the numerical result.

Example: Let the Document Own the Fact

QUESTION: "When does the policy expire?" RETRIEVED DOCUMENT: "...expires December 31, 2026..." CANDIDATE ANSWER: "December 31, 2026." VERIFICATION: Does the cited passage actually support that date? YES

The source, not the model's confidence, is the authority for that claim.

Authority Matters

Two sources can disagree. Grounding therefore has another dimension:

relevance + freshness + provenance + authority for this particular claim

A random copied page and the system of record should not automatically receive equal weight.

Provenance: Where Did This Fact Come From?

For serious verification we want more than the text of a claim. We may want metadata:

source identity document / record version timestamp retrieval time location within source tool or query used transformation performed result returned

This should look familiar. It is the same evidence discipline that appeared in WITNESS.

The Chain of Evidence

Original Source
↓
Retrieved Evidence
↓
Model Context
↓
Generated Claim
↓
Verification Result

If we preserve this chain, an investigator can ask where an error entered rather than merely observing that the final answer was wrong.

Grounding Does Not Rewrite the Weights

MODEL WEIGHTS + CURRENT RETRIEVED EVIDENCE ↓ INFERENCE

Ordinary RAG changes the information available in the current context. It does not normally retrain the model or permanently write the retrieved document into the weights.

Verification Does Not Require the LLM to Judge Itself

A model can critique or review its own answer, and that can sometimes help. But a stronger architecture can use independent mechanisms:

LLM candidate ├→ calculator ├→ database ├→ document comparison ├→ code execution/tests └→ external source check

The verification mechanism should fit the claim and, when possible, provide evidence independent of the original generation.

What Happens When Verification Fails?

A well-designed system has choices besides inventing another answer.

Retrieve Again

Search with a better query or a different source.

Correct

Replace the unsupported claim with the supported result.

Qualify

State uncertainty or disagreement explicitly.

Ask

Request missing information from the user.

Abstain

Say that available evidence is insufficient.

Confidence Is Not Verification

"I am 99% confident..." ≠ external evidence smooth wording ≠ source support repetition ≠ verification

A model's apparent certainty is a property of its generated language, not an independent measurement that the proposition is true.

Grounding Is a System Property

Return to the stack:

USER / INTERFACE ↓ ORCHESTRATION ├── retrieval ├── tools ├── databases └── source selection ↓ MODEL CONTEXT ↓ INFERENCE RUNTIME + LLM ↓ CANDIDATE RESPONSE ↓ VERIFICATION / CITATION / CHECKS ↓ FINAL RESPONSE

This is why LLM and AI assistant system must not be treated as synonyms.

WITNESS Has a New Question

If an AI system gives a grounded answer, WITNESS would not merely want the final sentence. It could ask:

What source was queried? What query was sent? What result came back? What portion entered context? What version / timestamp did it have? What claim did the model generate? What verifier checked it? What result did verification return? What happened after a failed check?

Now we can reconstruct not only what the model said, but part of the evidence path that allowed the system to say it.

Something Better Than Plausibility

Grounding gives generation relevant evidence from outside the model's learned weights.

Verification tests generated claims using an appropriate source, tool, calculation or constraint.

Provenance preserves where evidence came from and what happened to it.

None guarantees perfect truth. But together they change the architecture from:

"What continuation looks plausible?"

toward:

"What does the available evidence support, and can we check the claim before relying on it?"

HAAW Checkpoint

Grounding
Providing relevant external evidence or authoritative information for the current inference.
Retrieval
Finding candidate information from documents, databases, search systems or other stores.
RAG
Retrieval-Augmented Generation: retrieve relevant information, place it in context, then generate using it.
Retrieval embedding
A vector representation used to help search or rank semantically related material; not automatically the same as the LLM's internal token embeddings.
Vector search
Retrieval based on numerical similarity in an embedding space. Similarity does not itself establish truth.
Verification
Testing a generated claim against evidence, computation, tools, constraints or authoritative records.
Provenance
Information describing where evidence came from, its version or time, and how it was obtained or transformed.
Citation
A reference connecting a claim to a source so its support can be inspected; a citation itself is not proof that support is valid.
Authority
The degree to which a source is appropriate and trustworthy for the particular claim being checked.
Abstention
Declining to make a factual claim when available evidence is insufficient.
Central lesson
Do not ask plausibility to do the job of evidence. Retrieve evidence, preserve its provenance, generate with it, and verify important claims with mechanisms suited to the claim.