Glossary · AI

What is RAG?

See the worked example

Definition

Retrieval-augmented generation (RAG) is a method where the system first retrieves relevant text or records and then gives them to a language model to answer from.

Subject
AI
Applies
In any country
Also called
retrieval-augmented generation, retrieval augmented generation, search by meaning, semantic search, vector search

Term 113 of 150, A to ZUpdated

What it means

A language model knows only what it was trained on. It has never seen your customers, items or tickets. Retrieval-augmented generation closes that gap in two steps. First the system retrieves the pieces of your data that fit the question. Then it sends those pieces to the model with the question, and the model answers from them.

Retrieval is often done by meaning, not by exact words. Each record’s text is turned into a list of numbers that stands for its meaning, and the lists are kept in an index. A question is turned into numbers the same way, and the nearest records are returned. So “the pump supplier from Vijayawada” can find a supplier whose record never uses those exact words.

RAG is good at finding and describing. It is not a way to count or add up. Retrieval returns the closest few records, not all of them.

Example

Question Right method Why
“Which supplier sold us the borewell pumps?” Retrieval by meaning The answer is a record to find
“What did the customer say about late delivery?” Retrieval by meaning The answer is in the text of a ticket or a note
“How many invoices are unpaid?” An exact lookup The answer is a count over every matching record

Common mistakes

  • Using retrieval to produce a total. The closest ten records are not all the records.
  • Forgetting permissions. If the index ignores who is asking, search becomes a way round access control.
  • Sending whole documents to build the index when a few descriptive fields would do.
  • Letting the index go stale. It must be updated as records change.

In MyRecords

Search by meaning covers 15 kinds of record, indexed as they are saved. Only a few descriptive fields are sent to the AI provider to build the index, never amounts or attachments, and the index is kept in your own database. Results are filtered by the searching person’s permissions at the moment of the search. Counts and totals use an exact lookup, not retrieval. See ask your records and AI privacy and masking.

Any business, anywhere

Put these terms to work in your books.

Accounting, tax, stock, payroll and loans in one system, customised to the way you work.

See every appWorks worldwide

Free, no obligation

Request a quote

  • For the apps and modules you pick
  • At our best price, in writing
  • Your questions, answered by our team