Welkai logoWelkai

Knowledge base / RAG

Your business's own documents that an AI searches before it answers; RAG (retrieval-augmented generation) is the method that feeds those documents to the AI.

Why it matters

A general AI model knows a lot about the world and nothing about your shop. A knowledge base fixes that: it is the set of documents the AI is allowed to look things up in, such as your price list, services, opening hours, delivery areas, refund policy and frequently asked questions.

RAG is the technique that connects the two. AWS describes retrieval-augmented generation as a way for a large language model to reference "an authoritative knowledge base outside of its training data sources" before it responds. In practice: the customer's question is used to search your documents, the most relevant passages are found, and "the user query and the relevant information are both given to the LLM", which writes the answer from them.

Why this matters to a small business:

  • Answers use your facts. The AI quotes your real prices and rules instead of guessing, which cuts down on hallucinations. Anthropic's guidance on reducing them includes telling the model to use only the documents provided.
  • Updating is easy. Change a document and the next answer changes. AWS points out that this is far cheaper than retraining a model.
  • Answers can be checked. AWS notes that RAG lets the model "present accurate information with source attribution", so you can see which document an answer came from.

You will meet this idea in most AI reply tools. Meta's Business Agent for WhatsApp, for example, lets a business add "business information, FAQs, websites, and files" for the agent to answer from.

The quality of the answers depends on the quality of the documents. A few habits help:

  • Write short, plain entries, one topic each: "Delivery", "Refunds", "Prices for colouring".
  • Put numbers and conditions in full: "RM15 delivery within 5 km, free above RM100".
  • Remove old versions, so the AI never finds last year's price.
  • Write down what to do when the answer is not there, for example hand the chat to staff.

Example

A pet grooming shop puts four pages into its AI's knowledge base: prices by dog size, opening hours, the vaccination rule and the cancellation policy. A customer asks, "How much for a poodle, and do you need the vaccination card?" The system finds the price row for medium dogs and the vaccination paragraph, and the AI replies with both, word for word from the shop's own pages.

Sources

  1. AWS: What is retrieval-augmented generation (RAG)?aws.amazon.com, checked
  2. Meta for Developers: Meta Business Agent overviewdevelopers.facebook.com, checked
  3. Claude Docs: Reduce hallucinationsplatform.claude.com, checked