AI / A CONCEPT NOTE

Grounding

anchoring answers in verified facts

~65 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

Ensuring model responses are based on verifiable, reference facts or documents (like your own documentation in RAG) rather than its internal parametric training data.

02 / FOLLOW THE MECHANISM

How fact anchoring works

  1. Data match

    app pulls verified documentation from repository index database.

  2. Injection

    places documentation text block in LLM prompt system context.

  3. Generation constraints

    directs model: 'Answer only based on the facts provided below.'

  4. Reference output

    model outputs answer citing exact lines from source documents.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

test grounding accuracy

promptfoo eval -c RAG-grounding.yaml

Explore command anatomy in the CLI lab