You don't need your own model (yet)

Josep Castells, , 3 min read

Stacked binders full of documents
Photo: Pixabay / Pexels

Before training anything: have the AI answer from your documents, citing the source, and measure it with real questions.

"We want our own AI model." It is one of the things I hear most often when a company starts thinking about artificial intelligence, and the answer is almost always: not yet. Not because training a model is impossible, but because it is almost never the first thing you need.

What people mean by "our own model"

When someone asks for their own model, they usually want three things:

  1. For the AI to know what their company knows: its procedures, its contracts, its technical data sheets.
  2. For it not to make up answers.
  3. For their data not to end up in someone else's hands.

None of the three requires training anything.

First, make it answer from your documents

The technique is called RAG (retrieval-augmented generation): before answering, the system searches your documents for the relevant passages and the model answers based on them, citing where each answer comes from. If it finds nothing, it says "I can't find it" instead of making something up.

Compared with training, it has very practical advantages:

  • It updates itself. You change a document and the answer changes. A trained model would have to be retrained.
  • It respects permissions. Each person only gets answers from the documents they could already see.
  • It can be checked. Each answer shows its source; if it is wrong, you know why.

I explain it in more depth in How an AI learns, where I compare RAG, CAG and retraining.

Then, measure it

An assistant that "seems to work" is not enough. Before launching it, we prepare with the company a set of real questions with their correct answers, the ones their team asks every week, and we measure how many it gets right. The same set is run again every month: if a change in the documents or the model makes something worse, it shows.

That set of questions is the most valuable part of the whole project, more than any model. It is what lets you decide based on data rather than impressions.

And only then, if needed, fine-tune

There are cases where adapting a model (fine-tuning, often with lightweight techniques such as LoRA) does pay off: very specific vocabulary, a very rigid output format, or a language in which general models are weak. But the way to find out is the same: with the set of questions in front of you. If fine-tuning does not improve the score, it is not done.

So the order is this:

  1. RAG over your documents, with cited sources.
  2. An evaluation with real questions, before launch and every month.
  3. Optional fine-tuning, only if the evaluation justifies it.

On data and sovereignty

The third concern, keeping the data in-house, also has solutions that do not involve training: servers in the European Union, providers that act as data processors and do not train on your data, or open models deployed on-premises when the case calls for it. For Spanish and Catalan there are open models such as Salamandra, from the Barcelona Supercomputing Center, which can run on your own infrastructure; as with any model, it is worth checking the licence of each version before using it (I explain this in Data and models you can use on a commercial website).

When not to

For most local businesses, training their own model almost never makes sense: there are not enough examples for it to learn anything that a good RAG setup does not already solve. For medium-sized companies with a lot of documentation, the path is the one above, in phases and measuring at each one. That is what I offer in AI for business, and it always starts with a free diagnosis.

More from the blog

Shall we look at it in your business?

Tell us which process eats your hours and we will see whether AI solves it, with a free assessment.