Data & RAG

Your data as a source of knowledge for AI

A language model can only know what it has access to, and your internal material is not part of that. RAG picks out exactly those passages from your own material that answer a given question and puts them in front of the model. With a source reference, and without pushing your entire archive through the context window.

Your material

Customer database
Documents
Wiki & file stores
Mail & tickets

Preparation & index

ExtractSplitEmbedIndex

The source stays with the passage

Clients

Claude
ChatGPT
Copilot
Custom AI assistants
References

Knowledge we have made accessible to AI

A group whose specialist knowledge sat in stores nobody could search. Today the assistant answers questions from it, with evidence attached to every statement.

Primeo Energie

Primeo Energie

In production

The knowledge assistant answers questions from the group's business material and backs every answer with the original source. The pipeline runs from ingest through extraction and splitting into the index. Retrieval works by similarity, after which the hits are re-scored so that the most fitting passages come out on top rather than the longest ones.

In use

pgvectorAzure AI SearchDocument AIDoclingReranking
Preparation

A scanned manual is not text

The effort rarely sits with the model. It sits in turning what you have into something that can be searched.

Step 1 of 4

Extract

PDFs, scans and office files become text with structure. Headings, tables and page numbers survive, because the answer will point back at them.

Choosing the technology

Which setup fits depends on several factors

There is no setup that is right for every archive. We choose by size, spread of formats and rate of change, and we are not tied to any vendor. That choice lands directly on your token bill.

Archive

Up to a few thousand documents, uniform formats

An index inside the database you already run

No extra infrastructure. Common databases handle similarity search themselves these days. As long as volume and formats stay manageable, that is the whole answer.

Archive

Clearly bounded topics, small archives

Separate knowledge bases per topic

A search across everything always finds something. Separate archives find the right thing, because the wrong neighbours never join in.

Archive

Large, mixed archives

A managed search service

As format variety and volume grow, a service that has solved scaling and operations pays off. We then build the feed, not the search engine.

Archive

Several hundred gigabytes, constantly moving

Your own vector index plus delta sync

At this size, rebuilding daily costs more than the project. Only what changed gets updated, and the initial load stays a one-off item.

Why the setup determines the cost

What reaches the model's context window is not the whole archive but only the passages the search judges relevant. How many that are depends on the setup: the less precise the index, the more passages it takes to make sure the right one is included. Every extra passage costs money, on every request and for every user.

Transparency

Every answer shows where it came from

An answer without a source is an assertion. That is why every statement comes with the document it was taken from, so it can be checked directly.

How is the drain pump replaced for error code E24?

Searching manuals and service sheets

E24 reports a blocked drain. Before replacing the pump, check the filter and the hose.

Removal is described step by step in the service manual, torque figures included.

Service manual, ch. 4.2Service sheet, E codes

Evidence per passage

Below the answer sit the passages it was built from. Anyone who wants to read on clicks and reads on.

Better no answer than an invented one

If the search finds nothing suitable, the system says so instead of guessing. A setting, not a hope for good behaviour.

Permissions apply inside the index

The search only covers what the person asking may see. What they may not never turns up as a hit.

The date stays visible

Every passage carries its revision. An answer taken from a 2019 version is recognisable as such.

Where the EU AI Act comes in

The regulation has applied in full since 2 August 2026. For high-risk applications it requires that output can be interpreted, that events are logged and that people keep oversight. Source references and logs are exactly that evidence, and we build it. Whether your application counts as high-risk is a legal classification. Your legal department makes it, and we provide the technical basis for it.

How the per-user sign-in works technically and how systems get connected is described on the Integration page.

Quality

How you know the answers are right

RAG without measurement is a feeling. We build the measurement in from the start, not as an afterthought before go-live.

Gold standard questions

Real questions from the business, each with the correct answer and the source behind it. Compiled by your experts, because only they know what is right. Everything else is measured against them.

RetrievalAnswer

Score the two halves separately

Did the search find the right passages? And did the model build the right answer from them? Only by checking each on its own do you know where the fault lies when an answer is wrong.

On every change

Different model, different split, new documents: scoring runs automatically alongside. Without it, every adjustment is flying blind.

Limits

What RAG does not solve

So that it is clear from the start what you get and what you do not. These points come up in every project.

Outdated stays outdated

The search finds what is there. If the old instruction is still in the archive, it can end up in the answer. People have to do the tidying.

Contradictions become visible, not resolved

Where two documents contradict each other, the system shows both. Which one applies is a question for the business, and often the most useful side effect.

Counting is not searching

“How many orders last quarter” is not answered by a document index. That needs the system holding the number.

What is written nowhere is found by nobody

Knowledge in people's heads does not become text through an index. The gap becomes visible; closing it is up to the organisation.

Common questions

What we get asked first

What is RAG, exactly?

Retrieval-augmented generation. For every question the fitting passages from your own material are retrieved first, then the model receives those passages together with the question. So it answers out of your material rather than out of what it saw during training.

Do we have to train our own model for this?

No, and as a rule it would be the wrong route. Training binds the knowledge into the weights, where nobody can check or update it any more. An index can be changed the moment a document changes.

How long until the first answers?

For a bounded archive in workable formats, a few weeks to answers you can rely on. The effort grows with the variety of formats and with settling who may see what. That permissions question comes up with every integration, but with RAG it has to be answered when the index is built.

Do our documents leave the house?

Only as far as you decide. Embedding can run at a provider or on your own servers, and running in Switzerland or in the EU is possible. What goes where is settled beforehand and stays traceable.

What does running it cost?

Three items: storing the index, embedding new and changed documents, and the requests themselves. The requests make up by far the largest share. Their cost depends on how much text goes to the model per request, and that is exactly what the choice of technology above determines.

Do we have to tidy up our data first?

No, at least not completely. It makes sense to start with a well-kept part of the archive. The first results then show where tidying up actually pays off. Starting with a large data cleanup often means waiting months for the first benefit.

Contact

Get in touch directly & without obligation

  • ✓Non-binding initial consultation
  • ✓Personal advice from our expert team
  • ✓Response within 24 hours
Timo Weiser

Timo Weiser

Co-Founder Codify AG, Cloud Engineer

contact@codify.ch

Your message

What are you interested in?
0/2000

By submitting I agree to the privacy policy.