Glossary

Document grading (RAG)

What is Document grading (RAG)?

In retrieval-augmented generation (RAG), document grading means checking retrieved passages to see whether they match the question and can support an answer. Only passages rated as relevant are passed to the language model; unsuitable results are discarded or trigger a new search. This reduces the risk of invented or wrongly sourced answers, for instance when an outdated document turns up for a question about current prices.

How KI.ordo helps

Agents in KI.ordo answer with source references and say openly when they do not know something; questions without matches appear in a list of knowledge gaps.

Learn more →: Document grading (RAG)

Topics

  • RAG
  • relevance
  • quality assurance

Try KI.ordo

Agents, flows and templates in one workspace – free 24-hour demo.

Start demo
← All terms

Related terms

Retrieval-augmented generation (RAG)

Retrieval-augmented generation combines search with text generation: before answering, the system searches a knowledge collection – such as manuals, policies or FAQs – for relevant passages and passes them to the language model as context. The answer is therefore based on current, company-specific content rather than only on the model's training knowledge. This reduces invented statements, makes sources traceable and allows updates without retraining.

  • RAG
  • knowledge search
  • +1

Document reranking

Document reranking is a second sorting step in search and RAG systems: a fast initial search returns a set of candidate results, which a more precise but more costly method then reorders by relevance. This is often done by a so-called cross-encoder that assesses the question and a passage together. As a result, the most relevant passages end up at the top before a language model formulates an answer from them.

  • search
  • RAG
  • +1

Hallucination

A hallucination is output from an AI model that sounds convincing but is wrong or entirely made up – such as a non-existent court ruling, an incorrect figure or an invented source. The cause: language models produce likely wording; they do not automatically look up facts. The risk falls when answers are based on verified sources, evidence is cited and people check important results.

  • Language models
  • Reliability
  • +1
Template

Retrieval pipeline

A retrieval pipeline is the sequence of processing steps a system uses to find the right information for a question. Typical steps are: ingesting and cleaning documents, splitting them into chunks, building a search index, optionally rewriting the query, retrieving matches, ranking them (reranking) and passing the best ones to the language model. It is the foundation of every RAG application, and its quality largely determines how good the resulting answers are.

  • RAG
  • search
  • +1