Oil painting in blue: a pensive data scientist in front of a monitor showing a network of nodes, with one hand on the laptop
  1. Home
  2. AI for business
  3. RAG for enterprises

AI that answers from your company's documents.

RAG connects a language model to contracts, manuals, policies and internal systems, respects who can see what and shows where each answer came from.

A model alone answers with what it learned in training and makes things up when it does not know. RAG first searches the company's documents and gives the model only the relevant passages. Answer quality depends more on that search than on the model.

From document to sourced answer

There are two parts: preparing the knowledge and, for each question, retrieving the right passage.

  1. DocumentsContracts, manuals and rules
  2. SystemsERP, CRM and tickets
  3. PreparationExtraction and cleanup
  4. Passages and indexVector and text search
  5. PermissionsWho can see what
  6. RetrievalFinds the right passages
  7. ModelAnswers with the source
  8. EvaluationFaithfulness to the source
  9. Human reviewLow confidence

Reference flow. Sources, vector database and model change with each company's documents and data rules.

Where RAG tends to help

Frequent lookups of content that changes and that today depends on someone who knows where to look.

Customer service and after-sales

Answers from manuals, exchange policies and ticket history, with the source for the agent to check.

Contracts and legal

Finding clauses, deadlines and obligations across many contracts, without replacing the analysis of those who answer for them.

Internal knowledge base

Procedures, rules and training in one place to search, respecting each area's permissions.

Catalog and product sheets

Product questions answered from the product sheet and catalog, in the store or in the sales area.

The decisions that set the quality

A RAG prototype comes together quickly. These choices are what separate it from real use.

Document preparationPDFs with tables, old versions and duplicate files need treatment. Bad input produces bad answers.
ChunkingPassages that are too short lose context, and long ones bring noise. The right size depends on the document type.
Hybrid searchCombining vector search with keyword search helps with product codes, names and contract numbers.
RerankingA second step reassesses the passages found before handing them to the model.
PermissionsThe search respects who can see each document. The filter applies before the answer, not after.
UpdatesA new or revoked document must be reflected in the base, with date and version.
Vector databasePinecone, Weaviate or pgvector. If Postgres already does the job, there is no reason to add another system.

How to know the answers can be trusted

RAG reduces fabrication but does not eliminate it. That is why evaluation is part of the system.

Answer with source

Each answer points to the document and passage used, so the person can check.

The right not to know

When the search finds no sufficient basis, the system says it does not know instead of improvising.

Evaluation set

Real questions with known answers measure whether the search found the right passage and whether the answer stayed faithful to it.

Injection protection

A document may contain malicious instructions. Retrieved content is treated as data, and personal data is masked in the records.

How we implement it

  1. 1

    Choose the use

    One audience, one set of documents and the real questions that audience asks.

  2. 2

    Prepare the base

    We treat the documents, define the passages and connect the existing permissions.

  3. 3

    Measure

    We build the evaluation set and tune the search before tuning the model.

  4. 4

    Operate

    We track unanswered questions, keep the base up to date and expand its use.

Frequently asked questions

What is RAG in AI?

It stands for retrieval-augmented generation: before answering, the system searches for relevant passages in the company's documents and gives them to the model as context. The answer comes from those passages, with the source shown.

What is the difference between RAG and fine-tuning?

Fine-tuning adjusts the model's behavior with examples. RAG gives it up-to-date information at question time. To answer with company content, RAG is usually the first step: it is simpler to maintain, and a new document comes in without new training.

Does RAG eliminate AI hallucinations?

It reduces them but does not eliminate them. The model can still misread a passage. That is why we show the source, let the system say it does not know and measure how faithful the answers are.

Do my documents leave the company when I use RAG?

It depends on the architecture. The base and the model can run in your cloud, and open models can stay on your own network. The choice follows the company's data rules, with the DPO involved from the scoping stage. No client data is used to train external models without explicit consent.

Which vector database should I use?

In most cases, the difference between databases weighs less than the quality of the documents and the search. If the company already uses Postgres, pgvector is a good start. Dedicated databases, such as Pinecone and Weaviate, come in with larger volumes or specific requirements.

RAG or an agent: which do I need?

RAG answers; an agent acts. If the need is to look things up, RAG is enough. If someone has to carry out something in a system after the answer, consider AI agents connected to the ERP, which can use RAG as one of their tools.

Talk to an AI specialist.

Thirty minutes with a CCX engineer, at no cost, to assess your documents and the questions your team asks most.