Book a free call

How to Create Custom LLMs for Your Enterprise

A custom LLM for your enterprise starts with your own documents and one clear job. This guide covers the options, the data work, and the build steps.

Hertiv engineering teamReviewed by a senior engineer
7 min read
How to Create Custom LLMs for Your Enterprise
On this page

Short answer

A custom LLM is a language model shaped for your enterprise, so it answers from your own documents, follows your rules, and speaks in your terms. Most teams do not train a model from scratch; they adapt an existing one with their data and their checks.

What is a custom LLM?

A custom LLM is a language model adapted for one enterprise, so it works with that company's documents, terms and rules. The base model already knows general language; the custom work teaches it your products, your policies, your customers and the way your team talks.

There are three ways to make a model custom, and they differ in cost and effort. Prompting and retrieval change what the model sees at run time. Fine-tuning changes the model itself by training it further on your examples. Training from scratch builds a new model, which almost no enterprise needs. Most teams start with retrieval, add fine-tuning only when the simple version falls short, and never train from scratch.

Approach What changes When to use it
Prompting and retrievalWhat the model sees per questionAnswers must come from your documents
Fine-tuningThe model, trained on your examplesTone, format or a narrow task
Train from scratchA new model, built on your dataAlmost never worth the cost
Small model, own dataA small model tuned for one jobLow cost and full control matter

The right approach depends on the job. If the answers live in your documents, retrieval is enough. If the model must write in a strict format or handle a narrow task well, fine-tuning helps. For the fine-tuning route in detail, see how to fine-tune an LLM.

When does a custom LLM make sense?

A custom LLM makes sense when a general model cannot do the job: it does not know your products, it uses the wrong terms, or it cannot follow your rules. If a general model already answers well with a short prompt, custom work is a waste of time and money.

Good reasons to customise include:

  • Your own language. Product names, internal codes and industry terms that a general model gets wrong or invents.
  • Your own documents. Answers must come from price lists, policies and guides that the model has never seen.
  • Strict format. Replies, reports or tickets that must follow an exact structure every time.
  • Data rules. Documents that cannot leave your systems, so the model must run where the data lives.
  • Volume. A task that runs thousands of times a day, where a smaller tuned model costs less than a large general one.

Bad reasons include wanting a model that "knows everything" or copying a rival's announcement. A custom model is only as good as the data and the checks behind it, and a vague goal produces a vague result.

What data does a custom LLM need?

A custom LLM needs the documents and examples that already hold the answers: guides, price lists, policies, product notes, past tickets and past replies. The quality of that data decides the quality of the model, so data work is most of the build.

For retrieval, gather the documents that answer the job and clean them: remove the stale ones, fix the gaps, and organise them by topic. Twenty to fifty good documents beat five hundred stale ones. For fine-tuning, gather examples of the task done well: pairs of input and correct output, written or checked by a person who knows the subject.

Ask three questions about every source:

  • Is it current? Old prices, retired products and out-of-date policies are the most common source of wrong answers.
  • Is it allowed? Check that the data holds no customer secrets, passwords or personal data the model should never see.
  • Is it complete? If the answer to a common question is only in someone's head, write it down before the build.

Keep a list of who owns each source, so updates have a home. For how the search step uses those documents, read what retrieval-augmented generation is.

How do you build a custom LLM?

You build a custom LLM in six steps, and each step has a check before you move on. Rushing to a launch without the checks is how teams end up with a model nobody trusts.

  1. Define the job and the measure. Write one sentence for the job and one number for success, such as answers accepted without edits.
  2. Gather and clean the data. Collect the documents and examples, remove the stale ones, and fix the gaps that matter most.
  3. Pick the approach. Start with retrieval. Add fine-tuning only when the simple version falls short on tone, format or accuracy.
  4. Choose where it runs. Pick a hosted model or a model you run yourself, based on data rules, cost and language needs. See vendor site for current pricing.
  5. Write the rules. Tell the model its role, its tone, what it must cite, and when to refuse or pass to a person.
  6. Test on real cases. Run a fixed set of real questions with known answers, and record accuracy, refusals and errors. For the testing method, see how to test AI models.

Build in that order. Teams that start with the model and add the documents later usually rebuild the search and the rules from scratch.

How do you check that it works?

You check a custom LLM by testing it on real questions with known good answers, and by watching what it does in use. A demo on easy questions proves nothing; a test set of real cases proves a lot.

Build a test set of twenty to fifty real questions with the correct answers written by a person who knows the subject. Run the model on them and record three things for each one: whether the answer was right, whether it used the right source, and whether it refused when the facts were missing. A model that guesses instead of refusing will cause more trouble than one that is cautious.

After launch, keep checking. Log every question, answer and source used, and review a sample each week. Track the share of answers accepted without edits, the share that needed a fix, and the questions that come up most. When you change the model, the documents or the rules, run the same test set again so you can see whether the result got better or worse.

Example: a custom LLM for support replies

Example (hypothetical): a software company gets 300 support tickets a week. Agents spend much of their time looking up the same facts in guides and writing similar replies. The team builds a custom LLM that drafts replies from the company's own guides, with a person reviewing each draft before sending.

The build is small. The team gathers 40 guides and FAQs, removes 12 that are out of date, and writes the missing answers for the ten most common questions. They add 60 examples of good replies to fine-tune the tone, then test the model on 40 real questions with known answers. It answers 34 correctly, refuses 3 where the facts are missing, and gets 3 wrong, which the team fixes by adding the missing documents.

The arithmetic is easy to follow. Before the model, 300 tickets at 8 minutes each take 2,400 minutes, which is 40 hours a week.

After the model, 200 tickets need only 2 minutes of review each, which is 400 minutes, and 100 tickets still need the full 8 minutes, which is 800 minutes. The total is 1,200 minutes, or 20 hours a week, a saving of about 20 hours a week before the time spent keeping the documents current.

The team also measures quality: drafts accepted without edits, drafts that needed a fix, and answers that cited the wrong source. Those three numbers decide whether to widen the pilot.

What are the common mistakes?

The most common custom LLM mistakes are skipping the data work, training on too little data, and launching without a review step.

  • Feeding it stale documents. Out-of-date prices and retired products produce wrong answers that look confident.
  • Fine-tuning too early. Retrieval on clean documents solves most jobs. Fine-tuning before that is wasted effort.
  • Too few examples. A fine-tune on a handful of examples teaches the model the format, not the subject.
  • No refusal rule. A model that invents an answer when the facts are missing is worse than one that says it does not know.
  • No test set. Without fixed questions and known answers, nobody can tell whether a change helped or hurt.

Key takeaways

  • A custom LLM is a model shaped by your documents, examples and rules
  • Start with retrieval; add fine-tuning only when the simple version falls short
  • Clean, current data matters more than the choice of model
  • Test on real questions with known answers, and keep the test set fixed
  • Let the model refuse when the facts are missing, and keep a person in the loop

Frequently asked questions

Do I need to train a model from scratch?

No. Almost no enterprise needs to train a model from scratch. Start with retrieval over your own documents, and add fine-tuning when the simple version falls short on tone, format or accuracy. Training from scratch costs far more and rarely pays back.

How much data do I need for fine-tuning?

It depends on the task. A narrow task with a strict format can work with a few hundred good examples, while a broad task needs far more. The examples must be checked by a person who knows the subject; bad examples teach the model bad habits.

Can a custom LLM run on my own servers?

Yes. Smaller models can run on your own servers or in your own cloud, which suits teams whose documents cannot leave their systems. The trade-off is that you own the hosting, the updates and the monitoring, so plan for that cost.

How do I stop a custom LLM from inventing answers?

Give it only your documents to draw on, tell it to refuse when the facts are missing, and show the sources it used beside every answer. Test it on questions with no answer in the documents and check that it refuses instead of guessing.

How long does a custom LLM take to build?

A small pilot usually takes a few weeks: a week to gather and clean the data, a week to connect the model and the search step, and a week to test on real questions. Fine-tuning adds time for gathering examples and running the training.

What skills does my team need?

The team needs someone who knows the subject, someone who can gather and clean the data, and someone who can build and test the model. Many teams start with one developer and one subject expert, then add skills as the pilot grows.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building a custom LLM for your enterprise? Talk to Hertiv.

A senior engineer replies within one business day. Or see our LLM Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call