Glossary

Retrieval-augmented generation (RAG)

A plain-English definition, how it works, an example, and how it is used in enterprise AI.

{ Definition }

What is retrieval-augmented generation (RAG)?

A method in which an AI model first retrieves relevant documents or data and then writes its answer from them, instead of relying only on what it learned in training.

How it works

RAG has two steps. Retrieval finds passages related to the question, often with a search over embeddings (number representations of text). Generation passes those passages to the language model, which writes an answer based on them.

RAG works well for questions answered by documents: policies, manuals, contracts. It is weaker for exact business questions, such as totals, counts or which orders break a rule, because a model reading text passages can miscount or miss records.

That is why enterprise AI often combines RAG with an ontology: documents for context, and queries and rules over structured data for exact facts.

An example

Illustrative example

Illustratively, "what does our travel policy say about business class?" suits RAG. "How many invoices are unmatched this month?" should be answered by a query, with the model only writing the sentence around the number.

How NexusAI uses it

NexusAI uses both. The control plane holds embeddings for search (12,970 on the practice enterprise) and the Playground is used to validate RAG answers, while exact questions go to defined tools that query the virtual data layer.

Figures from the practice enterprise come from simulated data, not a customer.

{ FAQ }

Questions about Retrieval-augmented generation

What is the difference between RAG and an ontology?

RAG retrieves text for a model to read. An ontology gives the model structured facts, rules and actions. RAG suits document questions; an ontology suits exact business questions and safe actions. Many systems use both.

Does RAG stop AI from making things up?

It reduces it, because answers are based on retrieved text, but the model can still misread or miss records. Showing sources lets people check.

Get started

Build the intelligent enterprise

Turn enterprise systems into an intelligent operating layer that understands your business and executes operations autonomously.

Live in production within 90 daysNo systems replacedCloud, on-premise or hybrid