Skip to content
BENIBIX Learn

RAG vs Semantic Search

People often think RAG is just semantic search. Semantic search only finds the passages that match a question by meaning. RAG is the whole system: a search finds the passages, then a language model reads them and writes the answer. The search inside RAG can be semantic, keyword or both.

AI🔎 Retrieval & Search

Retrieval-Augmented Generation (RAG)

First find the right pages, then let the model answer from them.

Retrieval-augmented generation is a way to make a language model answer from your own documents. When a question comes in, a search finds the most relevant passages. Those passages are put into the prompt next to the question. The model then answers from that text and can point to its sources. It lets a model use private or fresh facts without any new training. The name comes from a 2020 research paper.

Example
Lucy's company bot gets 'How many days of leave do I get?'. It finds the two paragraphs of the staff handbook about leave and answers from them, with a link to the page.
Why it matters
It is the most common way to give an AI tool a company's own facts. It also cuts made-up answers.
Full entry
AI🔎 Retrieval & Search

Semantic Search

Search that finds text by what it means, not by its exact words.

Semantic search finds text by its meaning rather than by matching the exact words. The question and every stored text are turned into embeddings. The texts whose embeddings sit closest to the question come back first. So a search for 'fix a flat tyre' can find a page about 'mending a punctured wheel'. It is weaker on exact names, codes and rare terms, which is where keyword search does better.

Example
Jack's staff search the help pages for 'can't get into my account'. Semantic search returns the 'reset your password' page, though the words differ.
Why it matters
People rarely use the same words as the page that answers them. Semantic search closes that gap.
Full entry

In one line

Retrieval-Augmented Generation (RAG)
First find the right pages, then let the model answer from them.
Semantic Search
Search that finds text by what it means, not by its exact words.