Glossary

Retrieval-augmented generation

Retrieval-augmented generation (RAG) lets an AI answer from your own documents and catalog instead of guessing. Learn how it works and why sales chats need it.

What is retrieval-augmented generation?

Retrieval-augmented generation, or RAG, is a method for making an AI assistant answer from your information rather than from what the model happened to learn during training. It works in two steps:

  1. Retrieve. Your documents (FAQ, return policy, delivery charges, product descriptions) are split into small chunks and indexed, usually as embeddings that capture meaning. When a customer asks a question, the system finds the chunks that best match it.
  2. Generate. Those chunks are given to the language model along with the question, and the model writes a reply based on them.

If nothing relevant is found, a well-built system says so or passes the chat to a person instead of inventing an answer.

Why does it matter for sellers in Bangladesh?

A general AI model knows nothing about your delivery charge outside Dhaka, your exchange policy or which courier you use. Without RAG it may guess, and a wrong promise in chat turns into a return or a bad review. With RAG you upload your own policies once and update them when they change, and the AI agent answers from them.

Example

A customer asks, "Exchange korte parbo? Size boro hoye gele?". The system retrieves the exchange-policy paragraph ("size exchange within 3 days, unworn, with tag") and the AI answers from it, in the customer's language.

In SaleMag's AI chatbot, your knowledge-base documents are split into chunks and searched for each question, and only chunks above a relevance cutoff reach the AI. When it cannot answer from that material, it can hand the chat to your team.

AI agent, human handover, Banglish.

Frequently asked questions

Does RAG stop an AI from making things up?

It reduces it a lot, because the model is told to answer from the retrieved text. A good setup also tells the AI to hand over to a person when nothing relevant is found.

What content should I add to a knowledge base?

Delivery areas and times, return and exchange policy, payment options, size guides, opening hours and answers to the questions customers ask most.

Do I need to retrain the AI when my prices change?

No. With RAG you update the documents or product data, and the next answer uses the new information.

About the author

SaleMag Team

WhatsApp & F-commerce automation, Dhaka

The Dhaka team that builds SaleMag, the AI sales inbox for WhatsApp, Messenger and Instagram used by online sellers in Bangladesh.

Related terms

What is Banglish? Meaning & examples

Banglish is Bangla written in English letters, like 'dam koto?' or 'order dibo'. Learn why customers use it in chat and what it means for an AI assistant.

October 21, 2026 · 1 min read

Ready to win every conversation?

Grow faster with SaleMag. Start free — no credit card required.