The short answer
An AI agent that answers from your documents uses two models. The embedding model turns every document into numbers so it can be searched, which means it processes the full text of everything you index. The chat model sees only the few passages retrieved for each question. If the embedding model is a hosted service, your whole document set has been sent to it, whatever you decided about the chat model.
The right question about the wrong model
When a security team reviews an AI agent, the first question is nearly always the same: where does the prompt go. Which model answers, who hosts it, what does it keep.
It is the right question about the wrong model.
Two models, two very different views of your data
| Embedding model | Chat model | |
|---|---|---|
| Its job | Turn text into numbers so it can be searched | Write the answer |
| When it runs | When documents are indexed, and again on each question | On each question |
| What it sees | Every word of every document you index | The question and the few passages retrieved for it |
| Who thinks about it | Almost nobody | Everybody |
The chat model gets attention because it is the one people talk to. The embedding model is a line in a configuration file. In many tools it is set by default to a hosted service, and nobody on the project chose it.
So an enterprise can spend weeks deciding that its chat model must run in the country, and never notice that the contracts, policies and customer files it indexed on day one were sent, in full, to an embedding service somewhere else.
Why this ends projects late
I see the same pattern often. A team builds a proof of concept. It works. Six months in, security joins, traces where the data goes, and finds a model nobody approved. The project is stopped, and the work goes on a shelf.
The fix is cheap on day one and expensive in month six, because changing the embedding model means indexing every document again.
If you can keep only one model on your own infrastructure, keep this one
Embedding models are small. They run on modest hardware, a fraction of what a large chat model needs, and good open-weight ones are freely available. There is rarely a cost reason to send this work out.
- Embedding model: run it yourself. It sees everything, and it is cheap to host.
- Vector store: keep it with the embedding model. The stored numbers sit beside the original passages, so treat it as you treat the documents.
- Chat model: decide by workload. It sees less per question, so the risk is lower, though not zero. For sensitive work, keep it in the country too.
Three questions for your next review
- Which embedding model does each of our agents use, and who chose it?
- Where does it run, and under whose law?
- If we changed it tomorrow, how long would re-indexing take?
If nobody in the room can answer the first one, you have found the gap.
On Katonic, the embedding model, the vector store and the chat model can each run on your infrastructure, and an administrator chooses which models each agent may use.
Read next
Questions and answers
What does an embedding model do?
It turns text into lists of numbers so that passages with a similar meaning can be found by search. An agent that answers from documents uses it to index the documents and to look up each question.
Does the embedding model see my whole document?
Yes. Every document you index is sent through it in full, usually in chunks. The chat model sees only the passages retrieved for a question.
Is it safe to use a hosted embedding service?
It depends on the documents. For public material it is usually fine. For contracts, customer files or regulated data, a hosted embedding service means all of it has left your infrastructure.
Can I run an embedding model on my own infrastructure?
Yes. Open-weight embedding models are small compared with chat models and run on modest hardware.
What happens if I change the embedding model later?
Every document has to be indexed again, because numbers from one embedding model cannot be searched with another. That is why the choice is best made at the start.
