What is an LLM and how do AI models actually work?

An AI reply can sound right and still be wrong. See how a large language model builds an answer and where a person needs to check it.

An ink drawing of stacked building blocks beside an open book and a pocket compass.

In a 2024 study, language models often answered questions better when the document with the answer came first or last in the input. The researchers moved the same document among others that didn't contain the answer. The answer was available even when the model missed it.

A large language model, or LLM, is software trained on large collections of text to learn patterns in language. To write an answer, it predicts what piece of text should come next based on what it has been given. That makes it useful for drafting a reply, but it can still miss the line in your policy that changes the answer.

That matters when you decide what to let a model do

  • Training gives it patterns to write with
  • Tokens are the pieces it reads and writes
  • The context window limits what it can use at once
  • A person or a separate check should verify facts that carry a cost

Training changes how the model predicts text

During initial training, many models practise predicting the next piece of text in examples drawn from large collections. The training software compares each prediction with what actually came next and adjusts the model's internal settings to reduce errors. Over many examples, those settings pick up patterns in spelling and grammar as well as associations between ideas.

Developers can then train the model further to follow instructions, using examples of helpful replies or feedback on which answers people prefer. Your prompt is the message or instruction you give the model when you use it. Giving it a new policy in a prompt changes the information available for that reply without retraining the model.

The model builds a reply one token at a time

An app breaks your text into tokens, which can be whole words, parts of words or punctuation. Different models can split the same sentence differently. That is why a word count alone won't tell you how much room a document will take up.

Say you run a repair shop and a customer writes, “I can bring my bike in on Friday. Do I need to book?” Given the message and your instructions, the model scores possible next tokens. Once it picks one, that token becomes part of the text it uses to pick the next. By repeating that process, it can turn your notes into a reply that sounds like something your team would send.

The wording can help a customer understand what to do. To confirm a slot on Friday, though, the app would need current information from your booking system.

The context window limits what the model can use in a reply

A context window is the amount of text, measured in tokens, that a model can work with at once. The app decides what to include, which might be your instructions, earlier messages and excerpts from a document. Leave room for the reply too, since the text the model generates adds to the sequence.

Your chat screen can show a message even if the app leaves it out of the model's input. Suppose the repair shop only accepts walk-ins for quick adjustments and that rule appeared much earlier in the conversation. If the app has left it out, the model might draft a reply that sends the customer in for a job the shop can't take without a booking.

We'd give the model the current booking rule alongside the question rather than paste an entire operations manual. An app can search your documents and pass in the relevant passages before the model writes. The answer can still go wrong if the search brings back an old rule or misses an exception.

A fluent answer can still contain a made-up fact

An AI hallucination is an answer that invents or misstates information and presents it as fact. A model might write that a deposit is refundable because that wording fits the rest of the reply. Whether it's true depends on your terms, and a smooth sentence gives you no way to tell if the model used them.

If the app shows the policy passage it used, ask the reviewer to check whether that passage supports the answer. For an actual refund, let a staff member make the decision and use the model to draft the explanation after that. If you're deciding who should take each action, compare chatbots, workflows and AI agents. Planning what to do when an AI assistant gets something wrong matters as soon as a draft can reach a customer.

Start with a draft your team can check

We'd start with replies your team already writes and can check against a short policy. Keep every reply in draft while you test it. If the job is simply to send the same wording every time, save it as a template and skip the model.

  1. Pick a repeat question

    Use the bike shop's booking question or pick one your team sees often. Remove customer details from past messages before using them as test inputs. Keep the current policy next to them and note who can settle an exception.

  2. Give the model the rule

    Provide the policy with each question and ask for a draft reply based on that text. Tell the model to flag questions the policy doesn't answer. Keep message sending and booking changes switched off while you test.

  3. Check the reply against the policy

    Keep the question, the policy excerpt, the draft and your correction together in a sheet. Try a case the policy doesn't cover and check whether the draft asks for help. If the model promises an exception, keep that question with staff and run the same test after changing the instructions.

Bring the sheet to your next team meeting and pick the replies someone can check faster than they can write. If a reviewer has to open the booking system for every reply, test a saved draft that leaves the time blank for staff to fill in.

If you're weighing this trial against other automation ideas, our strategy and growth service helps you decide what to try first. You can book a consultation to talk through the job you want to test.

Keep reading

Book a consultation