liveBook · Manning

Grounding

As explained in LLMs in Production

Grounding is the practice of supplying a language model with relevant external context so its generation is anchored to available information.

Grounding supplies a language model with necessary context inside the prompt, giving generation a factual base instead of leaving it to invent information. section 12.2.5

Retrieval-augmented generation (RAG) is a common grounding technique: retrieve relevant context, then use it to augment the model’s response. Technically, retrieval can use any search algorithm or database, although industry usage often implies semantic search with a vector database. section 12.2.5

Grounding has practical limits:

  • It can improve difficult capabilities when the model receives helpful tools or context, but prompt cleverness without follow-up is insufficient. section 12.2.5
  • RAG works best for simple questions; similarity search may miss the entities needed to answer a multistep question. section 12.2.5

A multistep question

“What is Gal Gadot’s husband’s current job?” requires identifying her husband before finding his occupation. A similarity search may retrieve many articles about Gadot but none about Jaron Varsano, leaving RAG poorly equipped to answer the complete question. section 12.2.5

How LLMs in Production covers it

How deep it goes
Defines grounding, clarifies RAG terminology, and identifies multistep retrieval limits without detailing implementation.
Examples
Uses a Gal Gadot question to demonstrate why similarity retrieval struggles with multistep questions.
What you can do after
Apply grounding by adding necessary context or retrieval results before asking a model to generate an answer.
How it connects
Connects grounding with hallucination, prompting, retrieval-augmented generation, semantic search, and vector databases.

Also explained in

Compare how 8 books explain grounding →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.