By ยศกร จิรพงศานานุรักษ์, Founder · 16 min read · AI for business · AI technology and models

Most businesses that try using AI to answer customers run into the same problem in the first week: it answers very smoothly, but wrongly. It quotes prices that do not exist and cites warranty terms the company never offered. The cause is not that the AI is stupid. It has never seen a single page of your documents, so it guesses from whatever it has read around the world.
How does RAG work?
RAG stands for Retrieval-Augmented Generation. In plain terms, it means search first, then answer. Instead of letting the model answer from memory, we force it to pull text from the company's real documents first, and then instruct it to write its answer from that text only.
- Split the company's documents into small chunks, such as product manuals, sample quotations and warranty policies.
- Convert each chunk into numerical representations that capture its meaning, and store them in a searchable database.
- When someone asks a question, the system first retrieves the most relevant chunks.
- Send the question together with those chunks to the model to compose the answer, with a reference to which document it came from.
The fourth step matters most. A well-designed system always shows where its answer came from, and if it finds no relevant information it must say that nothing was found and hand over to a person, not keep guessing.
How is RAG different from fine-tuning?
- RAG: teaches the AI where to look for information. It is easy to update, since you only change the files. It suits information that changes often, such as prices, stock and promotions.
- Fine-tuning: adjusts the model itself so it speaks or formats output the way you want. It suits setting a tone of voice or an output format, and does not suit packing in facts that change often.
Almost all customer question-answering work needs RAG, not fine-tuning. If every price change meant retraining the model, the project would die by the second month.
The most common misunderstanding: thinking you must train a model on your company data first. In fact you do not need to, and arguably should not. RAG does not embed your data into the model. The data stays in your own database. When you edit a file, the answers change immediately, and you can remove data whenever you want.
Which documents work well, and which are harder?
- Works well: manuals, policies, FAQs, product specs, and meeting minutes typed out as text.
- Works, but needs preparation: price tables in Excel with multiple sheets and merged cells. These should be converted into a clear structure first.
- Hard to use: PDFs that are scanned images, which need OCR first, and handwriting that even a person cannot read.
- Should not be included at all: documents containing customers' personal data or employee salary data, unless access control was designed in from the start.
How do you measure whether it really works?
Do not measure by the number of messages the bot answers, because a bot that answers wrongly can answer plenty too. Instead, collect about 50 real questions that customers often ask, with correct answers that the sales team has confirmed. Then measure three things: the share answered correctly, the share where it said it did not know although it should have been able to answer, and the share answered wrongly with confidence. The last one is the most dangerous and must be brought to zero before the bot is opened to customers.
Frequently asked questions
Will company data leak into a public model?
It depends on the contract and the settings you choose. Most business-grade providers state clearly that they do not use customer data for further training, but you should check the contract terms before starting. For very sensitive data, you can also choose to run the model entirely inside your own organisation.
How many documents do you need to get started?
Fewer than you might think. Many projects start with just a few dozen pages that cover the most common questions and are already usable. What matters more than volume is that the documents are correct and up to date, because if the source is wrong, the answers will be wrong too.
Does it handle Thai well?
Much better than a few years ago, but watch the word-splitting and search steps, because Thai has no spaces between words. A setup that suits English documents may fail to find things in Thai documents. Test with real Thai questions from the pilot stage, rather than finding out later.
If the bot answers wrongly, who is responsible?
Define the scope clearly from the start. For example, let the bot answer only general information questions, and always transfer questions about net prices, contracts and warranties to a person. Show the source of every answer so it can be traced back. This way you gain the speed without taking on unnecessary risk.
References
- Okapi BM25 (Wikipedia) (accessed 2026-11-21)
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al., 2020) (accessed 2026-11-21)
- Retrieval-augmented generation (Wikipedia) (accessed 2026-11-21)
- BAAI/bge-m3 (Hugging Face model card) (accessed 2026-11-21)
- M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings (Chen et al., 2024) (accessed 2026-11-21)
- pgvector: open-source vector similarity search for Postgres (accessed 2026-11-21)




