Hashlogics
Glossary

What is RAG (retrieval-augmented generation)?

Skip it and your assistant answers from month-old training data, with total confidence, about a policy you rewrote last week.

Retrieval-augmented generation

RAGGrounding

Retrieval-augmented generation is a technique that searches a document set at query time and passes the matching passages to a language model, so the answer is grounded in a specific source rather than in the model's training data.

Two things happen on every question. Retrieval finds the passages most likely to hold the answer. Generation writes the reply using those passages, and cites them.

The model's own memory is not the source. That is the whole idea. Edit a document and the next answer reflects the edit, with no retraining involved.

Why teams reach for RAG

A general model has never read your pricing rules, your case files or last quarter's board pack. Ask it anyway and you get a fluent guess. Retrieval closes that gap without touching the model's weights, which is why it is usually the first thing to try.

It also produces a citation. On Greenlight, an ESG research platform we built, each of more than 50 topics carries 10 to 15 independent sources that a user can click through and check. Auditors care about that far more than they care about fluency.

One question through a RAG systemLive
  1. QuestionFrom a user with an identity
  2. FilterOnly what they may read
  3. RetrieveTop passages by similarity
  4. Re-rankBest, not merely nearest
  5. GenerateAnswer from those passages
  6. CiteShow the source, or say nothing found

Retrieval quality sets the ceiling. A model cannot answer correctly from a passage that was never fetched.

Questions, answered
01What is the difference between RAG and fine-tuning?

RAG supplies facts at query time; fine-tuning changes how a model behaves. Retrieval is the right tool when the answer lives in documents that change. Fine-tuning is the right tool when you need a consistent format, tone or classification, and it will not make a model learn your current price list.

02Does RAG stop hallucination?

RAG reduces hallucination but does not remove it. Grounding an answer in a fetched passage removes the need to invent one, though a model can still misread the passage or answer beyond it. Citations and a scored eval set are what catch the rest.

03Do you need a vector database for RAG?

No. Vector search is the common choice because it matches meaning rather than exact words, but keyword search, SQL filters or an API call are all legitimate retrieval. Many strong systems combine keyword and vector search, then re-rank the merged list.

Verified
Start

Anyone can ship the agent. We answer the pager.

We build AI agents and automation, then stay on under an agreed service level. A senior engineer reads every brief, and your call gets scheduled within 24 hours.

What happens next

  1. 01

    You send a brief or book a call

    Two minutes, whichever you prefer.

  2. 02

    A senior engineer replies within 24 hours

    Not a sales rep.

  3. 03

    Honest scoping, in writing

    And if we’re not the right fit, we say so.

Abdul Basit, CEO of Hashlogics

“I started Hashlogics because too many teams ship a demo, get paid, and disappear. We build to a standard we’d run ourselves — and we stay to keep it running.”

Abdul Basit · CEO · a direct line

Not ready to talk? Take the checklist.

12 questions to ask any AI agency before you sign. They separate a demo shop from a team that ships to production.

Get the checklist

Free · no newsletter