TR EN
work@empty.ventures Mersin · Türkiye
All articles Architecture

How to build an AI assistant that works with company data

EV Empty Ventures 30 June 20269 min read

Most internal assistant projects stumble at the same point: the model gives a correct answer but cannot say where it came from, or it quotes a document the user should not see. Both are architecture problems.

The problem: the model knows, but cannot say how

Two mistakes dominate internal assistant projects. First, the model cannot cite a source even when the answer is right; second, it quotes a document the user is not allowed to see. Neither is a model problem — both are architecture problems.

The right architecture: retrieve first, answer second

The approach that works: before generating an answer, the model searches your company documents, finds the relevant passages and grounds its answer only in those passages. This is broadly called RAG. No retraining is needed, and when a document is updated the answer updates with it.

  • Document preparation — splitting and indexing your sources
  • Retrieval layer — finding the passages closest to the question
  • Permission filter — removing documents the user may not see from the search
  • Answer and source — showing which document each answer rests on

Permissions: the most critical and most skipped step

The permission filter must live inside the retrieval layer, not after the answer. If the model reads everything first and gets filtered afterwards, the data has already leaked. In a correct setup the user’s role is part of the query and unauthorised documents are never read.

In an assistant that works with company data, security is not a check bolted onto the answer — it is a constraint embedded in the retrieval.

How to measure accuracy

“Seems to work well” is not a measurement. Before launch, build an evaluation set of 50–100 questions with the expected answer and source written down for each. Re-run the set after every change. That is how you see whether one improvement broke something else.

Data security: clear answers

In a correct setup, company data never enters model training. Data can stay on your own infrastructure, operations are logged, and where required the whole solution runs on your servers. These are not options — they should be the default in enterprise projects.

Frequently asked questions

Is it safe to give my company data to an AI?

In the right architecture the data never enters model training. It stays on your infrastructure, the model only reads documents you are authorised to see at query time, and it cites its source in the answer.

What is RAG and why is it needed?

RAG means the model searches your company documents before generating an answer. It is the most practical way to get current, sourced answers without retraining the model.

Want to talk through this with your own processes in mind? Book a call

Related articles

Strategy

Why do most AI projects stall at the pilot stage?

The problem is usually not the model but the scope. The three decisions that turn an AI pilot into a real…

23 June 2026 · 6 min read
Guide

How to choose an AI agency: an 8-point evaluation guide

The questions to ask when picking the best AI agency: scope clarity, data security, delivery format and p…

28 July 2026 · 8 min read
Product

How to build an AI product: from idea to launch

If all you have is an idea, where do you start? The four steps of building an AI product, how long each t…

21 July 2026 · 7 min read