
Large language models will answer questions about company leave policy. However, the answer may be incorrect.
This isn’t due to sloppiness. The reason is because your model has never seen your leave policy. The model only has knowledge available on the public internet, but your HR handbook may only be stored in an internal SharePoint system. Therefore it will make educated guesses.
RAG makes your model provide accurate answers by providing it with the correct documents to refer to. Just as with a new employee, we’d rather they looked up information, than guessed.
We’ve implemented RAG for HR, compliance and field staff across India. We learned some key lessons in doing so, and in this guide, we highlight what we wish every CTO knew before starting their first RAG project.
Imagine having a research assistant. They go to the library, find the 3 most important documents and write a concise answer (with page references).
RAG works in a similar way:
This is very straightforward. No additional training is required. No knowledge has been permanently embedded within the model. You’re essentially changing the exam to be open book.
Fine-tuning may seem like the best way to make AI ‘your own’. However, for most knowledge intensive tasks, RAG is better in almost all areas.
| Factor | RAG | Fine Tuning |
|---|---|---|
| Current Answers | Updating a document means new answers are provided | Training must be run again |
| Citations | Provided automatically | Very difficult to provide knowledge is merged into model |
| Permissions | Can be limited depending on user | All users receive the same knowledge from the model. |
| Initial Cost | Lower (search and indexing required). | Higher (GPU, preparation, multiple iterations) |
| Best for | Policies/Manuals/Contracts/Support Knowledge | Style/Format of output |
Although fine tuning can be useful in some scenarios (for example, if you want the model to be in a very specific format or classify text in your domain), if you want the model to provide correct answers based on your documents, RAG is a great place to start. Fine-tuning can be added at a later point.
Building a basic proof of concept may take just a few hours. However, to gain trust across a 5000 person company requires some serious engineering. Projects often go wrong when considering these factors:
Documents may be scanned PDFs, split into tables over multiple pages, or have multiple versions of one policy (with 2 out of date). As this is what the model is working from, it can only be as good as it is given. In our experience, document quality and ownership have a much greater impact on whether the system works well than the choice of model. Someone needs to take ownership and state clearly which document is up to date and archive the others.
Chunks of text are created from documents. If the chunks are too small the context of the text will be lost. If the chunks are too long, the model will return a large block of text with the answer somewhere inside. Good chunks are dependent on the structure of the document, and so should be separated into sections, heading, clauses etc. rather than character length.
Semantics search is commonly used in RAG solutions to retrieve the best answer. While powerful, it may miss specific terms (such as policy numbers, part numbers and legal clauses). To resolve this issue, hybrid search can be used. This combines semantic search with keywords to give better results. Although not as exciting as choosing the model itself, this is very important!
If the HR assistant gives salary band information to an intern, merely by asking in the right way, it is no longer just a chatbot – it’s a data breach. Correct permission controls must be enforced in the Retriever. This should be designed into the system from the start, as adding it in later can be a pain.
‘It seems to work’ isn’t a metric. To ensure quality, create a test set of 100-200 real questions. Run these tests regularly, to ensure the correct document has been retrieved, and that the final answer accurately reflects the document. Not doing this means you’ll get into arguments based on anecdotes.
Generally speaking, the best use cases for RAG will involve high volumes of documents, repeated queries, and people spending a long time searching for information which exists.
Many enterprises in India will be concerned about data sovereignty. Normally, in a cloud based RAG system, documents (or pieces of documents) are sent to an external API every time a query is made. Within BFSI firms and hospitals this could cause major issues with compliance under the DPDP act and industry regulations.
However, this is not necessarily the case. By deploying the full RAG system internally (in a private cloud or data centre), using open source embedding models, a self-hosted vector DB and a local language model (using tools such as Ollama), and using Indian models (such as those on AI Kosh) to answer queries in regional languages, you can fully keep the data within your network.
The downside is that you’ll be responsible for managing the infrastructure. However, for many organisations, predictable costs and real peace of mind is much more valuable than convenience of using an API based system (paying per token).
You don’t need to spend 2 years deploying RAG. A sensible initial deployment can be achieved within the following schedule (similar to our 8 week pilot):
| Week | Task | Output |
|---|---|---|
| 1-2 | Choose an area to implement RAG. Gather and clean documents. Define 150 test questions. | Defined knowledge base and test set. |
| 3-5 | Build ingestion, chunking, hybrid search, permissions, and response. | Functional RAG system within your environment. |
| 6-7 | Pilot with real users. Improve retrieval accuracy and prompt tuning. | Test quality against test set. |
| 8 | Launch with monitoring and feedback. | Live system with improvement loop. |
Start with a small area. Choose one department, set of documents and a clear measure of success. Implementing a useful HR policy assistant will teach you much more than implementing a huge enterprise knowledge brain which people have no trust in.
Using RAG means that generative AI can be made very useful with your own business knowledge. It provides answers supported by real documents, includes citations, and can respect permissions. It can even be deployed fully on infrastructure that you have control over.
The LLM itself is straightforward. The difficulty is in creating high quality documents, effective search and accurate measurement. If these are achieved, your teams will have a tool that they can really rely on.
Swaran Soft has been creating enterprise solutions for 25+ years. We currently deploy production RAG/Agentic AI on open source, hosted in India systems, with no vendor lock in.
Want to talk it through with us? We run a free 45-minute AI Pilot Assessment. Drop a line to info@swaransoft.com, or ring +91 9220-313-650 (India) | +971-50-9292-650 (UAE). You'll find more at www.swaransoft.com

AI Architect and Entrepreneur building India's Edge AI ecosystem. 25+ years in enterprise technology. Founder of Swaran Soft, Gignaati, and Copilots.in.