Tech, ExplainedData platforms and AI
Product

Domain-specific language models

Models trained for finance, law or medicine.

BEFORE ITAFTER ITDomain-specificlanguage modelsNugenCOVERSOne fieldSmaller modelsAPI accessField testsLLM gatewaysends financerequestsLarge language model (LLM)provides thebase modelcompares withgeneralmodelsLLM evaluationCONCEPTS IT USESFoundation modelsBEFORE ITAFTER ITDomain-specificlanguage modelsNugenCOVERSOne fieldSmaller modelsAPI accessField testsLLM gatewaysends financerequestsLarge languagemodel (LLM)provides thebase modelcompares withgeneralmodelsLLM evaluationCONCEPTS IT USESFoundation modelsBEFORE ITLLM gateway↓ sends finance requestsLarge language model (LLM)↓ provides the base modelDomain-specific language modelsNugenOne fieldSmaller modelsAPI accessField testsAFTER IT↓ compares with general modelsLLM evaluationCONCEPTS IT USESFoundation models
Domain-specific language models receive specialist requests through the LLM gateway, such as a 400-page offer document, and return the extracted risk factors, which evaluation compares with a general model's answers.
opens a page inside this one a page in the same scene a page in another scene a concept page a label only, with no page

Domain-specific language models are language models trained for one field, such as finance, law or medicine, and usually sold through an API, which lets an app send a request and receive the model's answer. They are an alternative to a general model that has learned a little about everything. An app that needs answers on one subject now often calls such a specialist.

A general large language model (LLM) is trained on a very wide range of text, as every foundation model is. It writes well about most topics, but it may not know the exact terms, rules and document formats of one field. A domain model is made in one of two ways. It may be a general model that is trained further on a large collection of text from the field, such as annual reports or court judgments. Or it may be trained from the start on a mix that contains far more of that field's text. Either way, it is then tested on questions from that field.

Specialist models are often smaller than the largest general models. That makes each answer cheaper and faster. For a company that sends lakhs of similar requests a day, this saving can matter more than broad knowledge.

For instance, the equity research team of a broking firm in Mumbai reads the offer documents of companies planning to list their shares. SEBI requires each company to publish such a document before its IPO, and each one runs to 300 or 400 pages. The team's tool sends each document to a model trained on Indian company filings. The model pulls out the risk factors, the pending court cases and the planned use of the money raised, and fills them into the team's template. A general model can do this too. But it is more likely to misread Indian accounting terms, and it costs more per page.

The app usually reaches the specialist through an LLM gateway, which sends finance questions to the finance model and everything else to a general one. Teams compare the two with LLM evaluation on their own questions, because a specialist is not always better.

The same idea appears in products built for one profession, such as a legal AI assistant or a financial research platform. The difference is that those are finished products for the professional. A domain-specific model is a component that other software developers build on.

Tech, Explained is a part of ingrid.fyi. Every page explains one piece of technology in plain words.