Book a free call

Enterprise RAG in Production: How to Run It Well

Enterprise RAG in production needs fresh indexes, answer checks, access control and cost limits. This guide covers the parts that keep retrieval working.

Hertiv engineering teamReviewed by a senior engineer
5 min read
Enterprise RAG in Production: How to Run It Well
On this page

Short answer

Enterprise RAG in production is a retrieval system that answers staff or customer questions from company documents, running with fresh indexes, quality checks, access control and monitoring. It works when the documents stay current, wrong answers are caught early, and only the people who should see a document can reach its answers.

What is enterprise RAG in production?

Enterprise RAG in production is a retrieval-augmented generation system that answers questions from a company's own documents, running as a live service rather than a pilot. A user asks a question, the system finds the most relevant passages in the document store, and a language model drafts an answer grounded in those passages, with links back to the sources.

The difference from a pilot is everything around the answer: the index must stay fresh as documents change, answers must be checked on a schedule, access rules must match the company's own permissions, and someone must watch cost, latency and failure rates. A pilot proves the idea; production keeps it working for hundreds of users.

The table below shows the parts a production RAG system needs.

PartWhat it doesWhat breaks without it
Index pipelineIngests and chunks documentsStale or missing answers
RetrievalFinds the best passagesAnswers from the wrong document
GenerationDrafts a grounded answerInvented facts with no source
EvaluationScores answers on a fixed setQuality drifts unseen
Access controlFilters by user permissionsStaff see documents they should not
MonitoringTracks cost, latency, failuresSlow answers and surprise bills

If you are still building the first version, start with how to implement RAG, then use this guide to move it into production.

How do you keep the index fresh?

Documents change every day: policies are updated, prices move, and old versions are replaced. A RAG index that is not refreshed will answer from last quarter's document, which is worse than no answer at all, because it sounds confident while being wrong.

Set up an ingestion pipeline that watches for changes instead of rebuilding the whole index on a schedule. When a document is added, changed or deleted, the pipeline should re-chunk it, re-embed the new chunks and remove the old ones. Keep a version stamp on every chunk so you can tell which document version an answer came from.

Test the pipeline with a real change before you trust it. Update one policy document, wait for the pipeline to run, then ask a question that only the new version answers. If the system still quotes the old version, the pipeline has a gap. Check the change log daily for the first month, then weekly once it is stable.

How do you know the answers stay good?

Build an evaluation set of real questions with known good answers, drawn from actual user questions and the documents that answer them. Run the set on a schedule, for example weekly, and track how many answers pass. A falling score is the earliest sign that the index, the retrieval or the model has drifted.

Add human review on top of the scores. Send a sample of live answers to subject experts each week and ask them to mark each one right, partly right or wrong. Expert review catches problems a score cannot, such as an answer that cites the right document but draws the wrong conclusion from it.

Watch the signals users give you too. A high rate of follow-up questions, thumbs-down marks or rephrased queries on the same topic usually means the answers are weak there. For a deeper method, see RAG evaluation.

How do you control who sees what?

Enterprise documents carry permissions: salary bands, deal terms and unreleased plans are not for everyone. A RAG system must respect those permissions, or it will hand restricted content to the wrong person in a friendly answer. Filter by the user's permissions at retrieval time, so restricted passages never reach the model at all.

Check the filter with a real test. Create a test user with a junior role, ask a question whose answer sits in a restricted document, and confirm the system refuses or answers from public material only. Repeat the test after every change to the permission rules.

Strip personal data from the index where it is not needed. Names, addresses and account numbers in training chunks create a leak risk that grows with every query. Keep the index to the content the system actually needs to answer questions.

How do you run RAG in production in 5 steps?

A careful rollout beats a fast one. The steps below take a working pilot to a production service without losing control of quality or cost.

  1. Freeze the document set for the pilot scope and wire the ingestion pipeline to it, with a version stamp on every chunk.
  2. Build an evaluation set of at least 100 real questions with known good answers, and record the first score as your baseline.
  3. Turn on access control and test it with junior and senior test users before any real user gets access.
  4. Roll out to one team, watch the eval score, the review sample and the cost daily for two weeks.
  5. Set monthly reviews of the eval score, the index freshness log and the cost per question, and fix drift before widening the rollout.

Each step has a clear owner and a clear check. If a step fails its check, stop and fix it rather than pushing on to the next one.

Example (hypothetical): a bank runs RAG for policy answers

Example (hypothetical): a bank builds a RAG system over 12,000 internal policy documents so staff can ask how a process works instead of searching the intranet. The team starts with one department and an evaluation set of 200 questions with known good answers.

On the first weekly run, 184 of the 200 answers pass, which is 92%. At 400 questions a day, about 8% of answers, or 32 a day, need review. The team sends those 32 to policy experts, who fix the worst answers and feed the gaps back into the index.

After a month, the pass rate rises to 95%, which cuts the daily review load to 20 answers. The team then rolls the system out to a second department, keeping the same weekly evaluation and review loop in place.

What are the common mistakes?

Most RAG production problems come from treating launch as the finish line. The mistakes below show up again and again, and each one is easy to avoid with a steady routine.

  • Rebuilding the index on a schedule instead of watching for document changes.
  • Skipping the evaluation set, so quality drift goes unnoticed for months.
  • Filtering access after generation instead of at retrieval time.
  • Indexing personal data the system never needs to answer questions.
  • Rolling out to the whole company before one team has used it for two weeks.
  • Measuring usage instead of answer quality and cost per question.
  • Leaving no one in charge of the index, the eval set or the review sample.

To see why systems fail in the first place, read why RAG systems fail before you plan your rollout.

Key takeaways

  • Production RAG is a live service: fresh indexes, answer checks, access control and monitoring.
  • Refresh the index when documents change, and stamp every chunk with its document version.
  • Run a fixed evaluation set weekly and review a sample of live answers with experts.
  • Filter by user permissions at retrieval time, so restricted passages never reach the model.
  • Roll out to one team first, watch quality and cost daily, then widen the rollout.

Frequently asked questions

What is the difference between a RAG pilot and production RAG?

A pilot proves that retrieval and generation work on a small document set. Production adds fresh indexes, scheduled evaluation, access control, monitoring and cost limits, so the system keeps working for hundreds of users.

How often should a RAG index be refreshed?

Whenever a document changes, not on a fixed calendar. Watch for additions, edits and deletions, re-chunk what changed, and stamp every chunk with the document version it came from. Check the change log daily at first.

How many questions should a RAG evaluation set hold?

At least 100 real questions with known good answers is a workable start. Run the set weekly, track the pass rate, and add questions from live failures as they appear.

Can RAG leak restricted documents?

Yes, if access is filtered after generation instead of at retrieval. Filter by the user's permissions before the model sees any passage, and test the filter with a junior-role account after every change.

What should RAG monitoring track?

Track the eval pass rate, the share of answers needing review, latency, cost per question and failure rates. Review the numbers weekly and act when a trend moves the wrong way.

How do you cut RAG costs in production?

Cache common questions, limit the passages sent to the model, and route simple questions to smaller models. Measure cost per question before and after each change, so you know what actually helped.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning to take RAG into production and unsure what the launch needs?

A senior engineer replies within one business day. Or see our RAG Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call