Skip to content

~/services/ai/rag-for-business

RAG for business: AI that answers from your internal documents and shows the source

So your team can find in seconds what is buried today in folders, PDFs and old tickets. Every answer comes with the document it came from, and each person only sees what they could already see.

6 min read

$ cat ./rag-for-business/what-you-get.md

  • Knowledge base with manuals, contracts, policies and tickets
  • Answers with the cited source and a link to the document
  • Permissions per document and per role
  • Updates whenever a document changes
  • Test questions to measure quality
  • Cost dashboard per answer and per model

RAG for business means putting AI to work answering your team's questions from internal documents: procedure manuals, contracts, HR policies, technical standards, ticket history. Someone asks in plain language, the system finds the right passages and the AI answers, citing where each piece of information came from.

RAG stands for retrieval-augmented generation. The name is clunky, the idea is simple: the model doesn't answer from memory, it answers by reading what the system found in your files. I have already built a complete RAG system for my MBA, and I bring the same foundation to company projects.

A robot librarian pulls a highlighted book from a tall shelf and hands it to a speech bubble
The librarian finds the source before answering, the way RAG searches the company's documents.

Who It Is For, And Who It Isn't

This page is about internal use: your team querying the company's own knowledge. If the goal is serving customers on your website, with pre-sales questions and return policies, the topic is an AI chatbot. The technique underneath is similar; the safeguards change a lot, because internal documents have owners, access levels and change all the time.

Where an internal RAG usually pays off:

  • Procedures and manuals. A field technician asks how to service a piece of equipment and gets the step-by-step from the manual, with the page number.
  • Contracts. "When does the price adjustment kick in on this supplier's contract?" without opening 40 PDFs.
  • Internal policies. Vacation, expense reimbursement, equipment use. HR stops answering the same question every week.
  • Ticket history. Before opening a new ticket, people find out the same problem was already solved, and how.

What Separates a RAG Your Team Uses From One That Gets Abandoned

A Cited Source In Every Answer

Every answer shows the passage and a link to the original document. The reader checks it in one click. If the search finds nothing relevant, the answer is "I couldn't find this in the documents", not a well-written guess.

Permissions Per Document

Updates When a Document Changes

A RAG with last year's policy is worse than none. The knowledge base follows the folder, drive or system the documents come from: a changed document is reprocessed, a removed one leaves the base. The answer shows the date of the version used.

Real-world Formats

Not everything is clean text. Scanned PDFs need OCR to become text. Recorded training videos can become searchable transcripts. Tables need their own handling so they don't reach the model as a soup of numbers.

Quality Measured, Not Guessed

Before releasing it to the team, I put together a set of real questions with expected answers, built with the people who know the documents. The system runs those questions and I measure how many it gets right, how many cite the right source and how many it makes up. When the model changes, when the way documents are split changes, or when the base grows, it runs again.

Real questions and expected answers feed tests for accuracy, sources and made-up answers; team ratings create an improvement list.
Tests and team feedback guide improvements to the RAG system.

After launch, each answer can be marked useful or not useful. Unanswered questions and poorly rated answers become a work list: sometimes the problem is the search, often it is a document that doesn't exist.

Costs Under Control

Every question has a model cost, and it is logged per answer. The vectors live in PostgreSQL itself, with the pgvector extension, with no separate paid vector database. You can use a cheap model for simple questions, a better one for hard ones, and a fallback when the main one fails, with a monthly cap.

PostgreSQL with pgvector, models for simple and hard questions, a fallback model and per-answer cost logging with a monthly cap.
Model selection and per-answer logging help keep costs under control.

The Proof: My MBA RAG

For my MBA I built a RAG system in Next.js with PostgreSQL and pgvector, using models from Groq and Gemini. It answers from the course material loaded into it, collects a rating for each answer, reads PDFs with OCR and transcribes YouTube videos so spoken content can be searched too. That is where I learned, in practice, that the quality of a RAG depends more on the search and the material than on the model.

RAG, MCP Or Agent

  • RAG: the question is about what is written in the documents.
  • MCP server: the question is about live data in your system (orders, customers, inventory), looked up on the spot.
  • AI agents for business: besides answering, the AI needs to do something, with a person's approval.

Many projects combine the first two: the agent checks the manual through RAG and the order status through the system.

How It Starts

I start small: one department, one folder of documents and the twenty questions that come up most. If the answers are good in that slice, the base grows. If the knowledge is scattered across systems that don't talk to each other yet, sometimes the first step is a web application that organizes it.

Send me a sample of the documents and the most common questions and I'll tell you whether RAG solves it and where to start.

Frequently Asked Questions

Will my documents be used to train someone else's AI?

It isn't training. With RAG the documents stay in your database and only the passages needed go to the model when a question is asked. In the proposal I name the model provider and show what its policy says about the use of the data sent.

Can the AI make up an answer?

The risk exists with any model. It drops sharply when the answer can only use the passages found, cites the source and says "I couldn't find it" when the search comes back empty. And quality is measured with test questions before and after every change.

How much does RAG for business cost?

It depends on the volume and formats of the documents, where they live and how many people will use it. After a conversation and a look at a sample of the material, I send a proposal with scope, timeline and price, plus an estimate of the monthly model cost.

What is the difference between RAG and a chatbot?

The chatbot is the conversation channel, usually on the website and for the public. RAG is the technique of answering from documents. This page covers internal use, for your team, with permissions per document.

Related Services

Next step

Didn't Find Your Case in the List?

Tell me about the problem through the form. If I'm not the right person, I'll say so and point you to someone who is.