IT Italiano English

RAG on company documents: AI that answers from your sources

RAG makes a language model answer from your company’s documents, citing the document and the page. Here we explain when it fits, what to ask of a solution and where to start.

RAG searches your documents, then answers.

RAG stands for Retrieval Augmented Generation. It connects a language model to the company’s knowledge base: the model answers from internal documents and data and cites its sources. Invented answers drop, and the data stays under your control.

Retrieval

Extraction and indexing
PDF, images, Word, Excel, PowerPoint and web pages become text split into smaller parts, indexed with a reference to the source page.

Words and meaning
A hybrid search, lexical and semantic, finds the relevant passages even when the question uses words other than the document’s.

Generation

An answer from the retrieved context
The model writes the answer only from the passages it found and cites the document and the page, with a link to the original.

A stated limit
If the information is not in the documents, the system says so and points to the right contact.

When RAG is the right choice.

When the answer already exists, written down somewhere in the company’s documents.

Without your documents, a generic AI answers from memory.

A model can write and reason, but it does not know your company’s manuals, procedures and contracts. On those topics it answers with what it learned elsewhere, and an invented answer can look true.

Meanwhile every department tries its own AI tool: data leaving with no rules and costs nobody sees.

RAG gives the model the right documents for each question, within the rules the company sets.

How to choose a RAG solution.

Before you choose, ask to see these points on a system already in use. They apply to us too.

  • Permissions per business unit.

    Each business unit decides what goes into its own knowledge base and who can access it. Search returns only the content the person asking is allowed to see.

  • The source in every answer.

    Every answer names the document and the page, with a link to the original. If the information is not there, the system says so and points to the right contact.

  • A model you can replace.

    A single proxy to the model providers: the model is chosen per use case, for example Gemini, Claude, OpenAI or Mistral, and changed from the interface.

  • Data and inference in the EU.

    Services and inference in European Union regions, personal data masked in the logs, GDPR roles written into the contract.

  • An open source stack, no lock-in.

    Open source components, code and configuration under version control, infrastructure as code: the system stays yours even if you change supplier.

  • Visible costs, with a cap.

    Requests, tokens and cost visible per business unit, with a daily, weekly or monthly budget and an automatic alert at 80%.

  • Quality measured on real questions.

    Test cases taken from real questions, with agreed thresholds, run before every release. The questions left unanswered show which documents are missing.

Solution

The AI Knowledge Platform brings RAG to your documents.

A knowledge base per business unit, with an AI assistant that answers from internal documents and cites the source. The same components run Luiss’s chatbot with guardrails and its conversational search.

From the knowledge base to running it.

One solution for internal documents, one for search on the website, and the services that build and run them.

01 / 04

Query company documents

People ask in natural language and get answers from the company’s documents, with the source cited. Each business unit has its own rules and budget.

  • One tenant per business unit: content, model, prompt and access set by each department.
  • An accessible widget: in the website, the intranet or the e-learning platform, with anonymous access or through SSO.
  • From the first department to the others: on the same platform, with the same rules.

See the AI Knowledge Platform →

02 / 04

Answer on the public website

People type a question and find the passage of the page that holds the answer, even when they use words other than the site’s.

  • Hybrid search: lexical and semantic on Typesense, with filters and sorting.
  • Anchored to the official content: answers stay within the indexed content, with guardrails on.
  • Unanswered questions: a dashboard shows the editors which content is missing.

See semantic and agentic search →

03 / 04

Design the engine

We design RAG, agents and guardrails and connect them to your documents and applications. It starts with a workshop and a prototype on your data, with the measures agreed beforehand.

  • A replaceable model: chosen for privacy and cost.
  • MCP servers: to connect the knowledge base to other company systems, with permissions and audit.
  • Open source modules: AI Guardrails, MCP Client and the Typesense RAG recipe for Drupal, which we maintain.

See AI development →

04 / 04

Run it in operation

We run AI assistants and agents after release: each one has a person accountable for it, is evaluated before every release and keeps a record ready for audit.

  • Repeated evaluations: test cases from real questions, with agreed thresholds.
  • Costs per department: budgets, spending caps and an automatic alert at 80%.
  • Traces of every call: sources, model, cost and timing.

See AgentOps →

Frequently asked questions.

RAG, documents, models, data and costs.

What is RAG?

RAG (Retrieval Augmented Generation) connects a language model to the company’s knowledge base. The model answers from internal documents and data, cites its sources and reduces invented answers, while the data stays under your control. It serves internal assistants, customer support and knowledge management.

How does RAG work?

In two steps. First the system extracts and indexes the documents, and for each question it retrieves the relevant passages with a search by words and by meaning. Then the model builds the answer from that context only and cites the document and the page.

What is the difference between RAG and a chatbot?

A chatbot is an interface. RAG is how the system behind it finds information in your documents and answers from there. In the AI Knowledge Platform the assistant is one way of using the knowledge base, with model governance, budgets, guardrails, metrics and logs.

What is the difference between semantic search and RAG?

Semantic search finds the right content by meaning and returns the passage that answers, with a link to the page. RAG uses that search to retrieve the context, then a model writes the answer and cites the source.

Can RAG make up answers?

The model answers only from the context retrieved from the indexed content, citing the document and the page. If the information is not there, it returns a courtesy answer that points to the right contact. Guardrails filter harmful content and manipulation.

Which documents can it use?

PDF, images, Word documents, Excel sheets, PowerPoint presentations and web pages. Extraction is tuned on the most used document templates, and each team uploads its own documents.

Which model does RAG need?

The right one for the use case, for example Gemini, Claude, OpenAI, Mistral or hosted models. With a single proxy to the providers, each business unit can have its own model and change it from the interface.

Where is the data?

In the AI Knowledge Platform, services and inference stay in European Union regions, consistent with the AI Act, and personal data is masked in the logs. The client remains the data controller; SparkFabrik is the data processor under the GDPR.

How do RAG and AI agents relate?

An agent can use RAG as a tool: it decides whether to query the knowledge base, retrieves the context and builds the answer. To act on other systems it connects through MCP servers, with permissions and tracing: we explain it in AI enterprise solutions: agents and MCP.

How much does a RAG solution cost?

We do not publish a price list for the AI Knowledge Platform. The offer always separates three items: the one-off build, the running fee and the pay-per-use model cost, with a budget per business unit.

Where do you start?

From one use case with a clear perimeter: a department, its documents and the questions it gets most often. Then the platform grows, department after department, with the same rules.

RAG works when every answer carries its source.

Bring us a handful of real documents and the questions you get most often: we show you how it answers, with which sources, and what it says when it does not know.

Book a demo

Further reading.

Cases, articles, talks and guides on the same topic.

Talk to the CEO or the CTO.

Tell us which departments, which documents and which constraints you have. We will tell you which use case we would start from.

Tell us about your project