Skip to main content

AI glossary Models & Architecture

What is domain adaptation in AI?

← All glossary terms
In short

Adapting a general-purpose AI model so it performs well in a specialised field, such as law, healthcare or insurance, with its own language and rules.

Explained

Domain adaptation is the work of making a general-purpose model perform well in a specialised domain, such as legal documents, medical records or insurance claims. General models know a lot, but they may miss the vocabulary, formats and rules of a particular field or company. The options range from giving the model domain context at query time with retrieval-augmented generation (RAG), to fine-tuning it on domain examples, to continuing its pre-training on large amounts of domain text. Which one fits depends on whether the gap is knowledge, behaviour or language.

Ways to adapt a model

  • Retrieval (RAG): the model stays the same and receives relevant domain documents with each question. Best when the gap is knowledge that changes or must be cited.
  • Prompting and examples: instructions and a few domain examples in the prompt. Quick to try, limited by the context window.
  • Fine-tuning: training the model further on labelled domain examples. Best when the gap is format, tone or a specific task.
  • Continued pre-training: training on large amounts of unlabelled domain text. Best when the domain's language itself is unfamiliar to the model, and the most costly option.

What the research shows

A well-known study found that a second phase of pre-training on text from the target domain improved results on tasks in that domain, and that further pre-training on the task's own unlabelled text helped even after domain adaptation. The general lesson for enterprises is that domain data is valuable, but it has to be relevant and clean.

With today's large models, most companies start with retrieval and prompting, and reserve training for cases where those are not enough.

When it makes sense

  • The model misreads domain terms, abbreviations or document formats.
  • Answers must follow domain rules or a house style consistently.
  • There is enough good domain data, and someone who can judge whether outputs are correct.
  • An evaluation set exists to show whether the adaptation actually helped.

Frequently asked questions

What is an example of domain adaptation?

Taking a general language model and adapting it to read insurance claims: it learns the vocabulary of policies and coverage, the structure of claim forms and the company's rules for classifying them. The same applies to legal contracts, clinical notes or technical maintenance logs.

Is domain adaptation the same as fine-tuning?

Fine-tuning is one way to do it, but not the only one. Domain adaptation is the goal; fine-tuning, continued pre-training, retrieval and prompting are methods. Many projects combine retrieval for knowledge with light fine-tuning for format.

Should I use RAG or fine-tuning for domain adaptation?

Use RAG when the model lacks facts that change or need to be traced to a source. Use fine-tuning when the model knows enough but behaves wrongly, for instance in format or style. If unsure, start with RAG and prompting, measure, and train only if a clear gap remains.

How much data do you need for domain adaptation?

It depends on the method. Retrieval needs a well-organised document base rather than training data. Fine-tuning needs a set of good examples of the desired behaviour. Continued pre-training needs far more domain text. In every case, data quality matters more than volume.

Where it shows up at Thinkia

Further reading

Sources

Updated: 2026-10-21

Want to see how this applies to your organisation?

Talk to an AI Expert