What Is RAG? Check Retrieval before Trusting AI Answers
You give an AI the manual, yet its answer omits an exception. Some systems retrieve selected passages instead of sending every page to the model. RAG can help bring in information, but you still need to check what it found and how it interpreted it.

RAG retrieves evidence to support answer generation
Retrieval-Augmented Generation, or RAG, retrieves information to support an answer at query time rather than relying only on the model’s learned weights. The RAG paper by Lewis and colleagues is a foundational reference, but deployed systems may retrieve and organize information differently.
Think of an assistant looking up a customer question in a set of manuals. They might open an outdated edition or read only half a paragraph. Fluent writing cannot reliably restore an exception they never saw.
RAG is not model retraining, and attaching a file does not necessarily invoke RAG. One system may place the whole file in context; another retrieves passages; another reads page images. Follow the actual data path rather than a “chat with PDF” label.
How RAG retrieves text from files and passes it to the model
- Prepare content: Extract the document data and keep its filename, version, date, and access permissions.
- Split content: Make searchable chunks without separating essential headings or exceptions.
- Index it: Support keyword search, embeddings, or both.
- Retrieve on a question: Select relevant chunks, possibly filtering by version and permissions before reranking.
- Generate an answer: Give the selected passages to the model along with scope and citation instructions.
- Check the result: See whether the retrieved evidence really supports each claim.
Embeddings represent information as numbers to help find related material; they do not certify a document as true. Exact keywords may help with product codes, while semantic search may help when the question uses different wording from the manual. Either approach can fail.
Anthropic’s contextual retrieval article describes how chunking can lose context and how keyword and semantic search can be combined. We use those ideas to frame checks, not to claim its reported results hold for Thai-language tasks.
Hypothetical example: the condition is in a different section from the answer
Suppose a shop manual says “Items can be returned within 7 days of receipt,” followed by “Except items made to a customer’s measurements.” When someone asks “Can I return a made-to-measure shirt?”, the system needs both passages. This is hypothetical, not a KrobClick return policy or a statement of legal rights.
| What to observe | Layers to check | What to fix or test |
|---|---|---|
| Retrieves only the sentence saying returns are accepted within 7 days | Data preparation and retrieval | Were notes imported, and can they be associated with the same topic? |
| Retrieves all conditions and exceptions but claims returns are allowed in every case | generating answers | Instructions and the ability to interpret exceptions from evidence |
| Answers from an old manual with different conditions | Version and metadata | Filter the effective version and remove old copies from the response set. |
| Answers correctly but accesses a document the questioner is not authorized to view | Permission controls | Enforce access permissions before including data in answers |
A larger model may interpret an exception better, but it cannot retrieve a document that was never ingested or fix misconfigured access controls. Inspect both the answer and retrieved passages to locate the failure.
Thai questions must be tested with words that people actually use.
A manual might say “cancel an order” while a customer asks “I changed my mind; how do I stop it?” Test both phrasings. For codes, figures, or model names that differ by a single character, check exact matches too; semantic similarity is not enough.
Include answerable questions, exceptions, missing answers, and conflicting documents. Decide what evidence should appear before running the test so a persuasive answer does not tempt you to change the standard afterward.
With a small test set, report its size and individual failures. Do not call a pass rate on handpicked questions overall task accuracy. Recheck after changing the model, chunking method, or document collection.
Evaluate searches and answers separately.
- Retrieval: Did it find the necessary evidence, in the right version and within the user’s permissions?
- Answer: Does it address the question, include exceptions, and avoid unsupported additions?
- Citations: Can you open the source, and does it support the cited claim?
- Abstention: When evidence is missing or contradictory, does the system flag the limit and refer it for human review?
- Operations: Are time and cost acceptable once retrieval and review are included?
A simple log can record “question / expected document / retrieved document / answer / error / reviewer.” If the system hides its retrieved results, note that limitation rather than diagnosing the cause from the final answer alone.
Use RAG for data needs, not because it is fashionable
RAG may be worth considering for changing collections, traceable citations, or multiple permission levels. For a single short file, placing it directly in context may be simpler. Retrieval adds maintenance for indexes, versions, permissions, and evaluation.
Before choosing RAG, locate the authoritative information and decide how to verify the system used it. That will point toward retrieval, document organization, or answer review. A longer prompt alone may miss the underlying problem.
Sources
- Lewis et al.: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Anthropic: Introducing Contextual Retrieval
Sources reviewed October 14, 2026, Thailand time. Thai examples and prompts are KrobClick proposals, not product tests. Features and settings vary by version/account. Check originals and outputs before real use.