Home/AI services/RAG and knowledge bases

RAG and knowledge bases

Query your internal documents, with sources to back every answer

RAG (retrieval-augmented generation) finds the relevant passages in your own documents, then asks the AI to answer based on them and cite its sources. Your teams find the answer instead of hunting for the document.

Updated October 11, 2026

A team of employees working on laptops during a training workshop

The reality

The knowledge already exists; it needs to be made accessible

3 h → 25%

of working time spent searching for information, from 3 hours a week to a quarter of the week, according to vendor surveys.

Source: Slite 2026 · Glean/Harris Poll 2022

−67%

retrieval failures with contextual retrieval combined with reranking, on Anthropic's datasets (−49% without reranking).

Source: Anthropic, Contextual Retrieval

63%

of organizations don't have, or aren't sure they have, the right data management practices for AI.

Source: Gartner, via Freevacy

Anthropic's results come from their own datasets: they need to be validated on your documents.

How it works

Two phases: prepare your documents, then answer

Preparation happens once, then again whenever your documents are updated. Answers are generated for each question, in a few seconds.

Once: preparation

  1. 1

    Your documents

    Procedures, contracts, product sheets, emails, internal databases.

  2. 2

    Chunking

    Each document is split into short passages, enriched with their context.

  3. 3

    Index

    Each passage is indexed by meaning (embeddings) and by exact keywords.

For each question: the answer

  1. 1

    The question

    An employee asks a question in natural language.

  2. 2

    Retrieval

    The most relevant passages are retrieved, then ranked.

  3. 3

    Generation

    The AI writes the answer using only those passages.

  4. 4

    Cited answer

    The answer lists the source documents for verification.

Approach described by Lewis et al. (Facebook AI, NeurIPS 2020) and detailed by Anthropic.

Do you really need RAG?

RAG, fine-tuning or long context: making the right choice

We'll be upfront: if your knowledge base fits in a few hundred pages, RAG isn't always necessary. These three approaches complement each other more than they compete.

Often the right starting point

RAG

Choose it if: Your knowledge changes, it's large, and you want citations and per-user access rights.

Limitation: Quality depends on retrieval: an irrelevant passage can degrade the answer.

Special cases

Fine-tuning

Choose it if: You want to enforce a consistent format, tone or vocabulary.

Limitation: Poorly suited to adding facts: they go stale and the model isn't updated.

Special cases

Long context

Choose it if: Your knowledge base is small and stable: about 500 pages at most, according to Anthropic.

Limitation: Weak citations, and quality can degrade with very long contexts.

Not sure which approach is right? One conversation is enough to decide.

Talk to a consultant

Sources: Anthropic · Denser · AI Builder Club.

What makes a good RAG

Five quality levers

The answer can't be better than the passages retrieved: quality is mostly decided at the retrieval stage.

Context for every passage

An isolated excerpt loses its meaning (which company? which period?). We add its context before indexing it.

Hybrid search

Meaning (embeddings) and exact keywords (references, acronyms, proper names) complement each other.

Result reranking

A second model reranks the retrieved passages to keep only the most useful ones.

Enough passages

Passing around twenty passages gives better results than five or ten, according to Anthropic.

Measured on your data

Settings are tested on your own questions, not on generic examples.

French, Arabic, dialect

Not all your documents are in French

  • Standard approaches often work less well on Arabic, and dialects have few resources.
  • We found no retrieval benchmark for dialectal Arabic, so we test several models on a question set drawn from your own documents.
  • We don't promise performance without measuring it on your content.

Sources: ArabicMTEB / Swan · Optimizing RAG Pipelines for Arabic.

Security and privacy

Internal documents, controlled access

OWASP identifies vector database weaknesses as a risk category in its own right for AI applications. Here is what we put in place.

Everyone sees only what they're allowed to see

Your document access rights are enforced on every search, including in the index.

Data isolation

Departments, subsidiaries or clients don't mix: without isolation, an index can return someone else's documents.

Protect the index like a database

An unprotected vector index is equivalent to an unprotected database.

Vectors are not anonymous

The original text can be approximately reconstructed from vectors, so we treat them as sensitive data.

Sources: OWASP GenAI · Giskard. Regulatory framework: AI governance and the AI Act.

Measuring quality

Four questions to know whether your RAG is reliable

You don't judge a RAG system by impression: you measure it with four metrics, computed on questions representative of your business. They are scored by a model and vary from one run to the next, so we track them over time.

Faithfulness

Is every claim in the answer supported by the retrieved documents?

Answer relevance

Does the answer actually address the question asked?

Context precision

Are the right passages ranked ahead of irrelevant ones?

Context recall

Did we retrieve everything needed to answer?

Source: RAGAS · Athina.

Our approach

From your documents to a useful knowledge base

Procedures and internal memosContracts and legal documentsProduct and technical documentationCustomer request historyReports and studiesHR and quality policies
  1. 01

    Inventory

    Document sources and each user's access rights.

  2. 02

    Prepare

    Clean, structure and chunk the content.

  3. 03

    Index

    Semantic and exact-keyword search, with context for each passage.

  4. 04

    Evaluate

    Measure on your own questions before opening it to your teams.

  5. 05

    Deploy

    Access rights, cited sources, monitoring and ongoing updates.

FAQ

RAG and knowledge bases: your questions

What is RAG?

RAG (retrieval-augmented generation) finds the relevant passages in your documents, then provides them to the AI so it can answer based on them and cite its sources.

Does RAG eliminate AI errors?

No. It reduces them by grounding answers in your documents, but an irrelevant or contradictory passage can degrade the answer. That's why we measure quality on your questions.

RAG or fine-tuning the model?

For knowledge that changes and must be cited, RAG is generally the better choice. Fine-tuning is more for enforcing a format or tone. The two can be combined.

My document base is small: do I need RAG?

Maybe not. According to Anthropic, a knowledge base of about 500 pages or fewer can be placed directly in the prompt. Beyond that, or when access rights must be managed, RAG becomes relevant.

Do my documents stay confidential?

Confidentiality relies on access rights enforced on every search, data isolation and protection of the index. Vectors are not anonymous: we treat them as sensitive data.

Does it work with documents in Arabic?

Yes, but quality varies by model, especially for dialects. We test several approaches on a sample of your documents before committing to a result.

Make your internal knowledge accessible

Tell us about your documents: we'll tell you whether RAG is the right solution and how to measure it.