All articlesThe Chronicle / Geodd

What Is an LLM? Meaning, How It Works, and How to Use One

An LLM is a large language model: an AI system trained on enormous amounts of text to predict the next piece of text in a sequence. Repeated billions of times during training, that single skill lets the model answer questions, summarize documents, translate languages, and write code. Almost every modern LLM is a neural network built on the transformer architecture. "Large" refers to both the training data and the number of internal parameters, which run into the billions.

This article explains why these models matter, how they turn text into numbers and numbers back into answers, how to start using one, and where they fail. You will also see how an LLM differs from GPT, AI, and the law degree that shares the acronym.

Geodd runs LLM inference for production teams, so the practical sections draw on what it takes to call a model through an API: real token prices, context limits, and a working code snippet you can adapt.

Why large language models matter

LLMs matter because they are the first software that handles unstructured human language at scale. Tasks that once needed a person reading and writing, such as triaging tickets or drafting replies, now run as API calls.

What an LLM can do for you

One general model covers many language jobs. You change the instruction, not the model. The table shows the most common ones.

TaskWhat the model doesTypical use
SummarizationCondenses long text into a short versionMeeting notes, research papers, support history
Question answeringAnswers from its training or from documents you supplyHelp-center assistants, internal search
Code generationWrites, explains, and debugs codeCoding assistants, repository-scale debugging
TranslationConverts text between languagesMultilingual support and content
Extraction and classificationPulls fields or labels out of messy textInvoices, sentiment tagging, routing
Tool useDecides which function to call and with what argumentsAI agents, workflow automation

Why this matters for builders

Before LLMs, each language task needed its own model and its own labeled dataset. That meant months of work per feature. Now you write a prompt, test it, and ship. One model replaces a stack of narrow models, which is why teams adopted LLMs so quickly.

The economics changed too. You do not have to train anything. Hosted APIs charge per token, so a prototype costs cents and a production workload scales with real usage. Open-weight models such as GPT-OSS-120B also let you choose between a hosted API and running the model yourself.

An LLM turns language tasks into prompts, so you adapt one general model instead of building many narrow ones.

How an LLM works

An LLM converts your text into tokens, represents each token as numbers, uses a transformer to weigh how the tokens relate, and then predicts the next token again and again until the answer is complete. Training is what teaches it those weights.

From text to tokens and embeddings

A model cannot read letters, so a tokenizer first splits your text into tokens. A token is a word, a piece of a word, or a single character. In English, one token averages about three quarters of a word, so a 1,000-word document is roughly 1,300 tokens. A rare word like "unbelievable" may be split into several pieces, while "the" is a single token.

Each token is then mapped to a list of numbers called an embedding. Tokens with related meanings end up with similar numbers. The model works entirely on these vectors, never on the words themselves.

Transformers and self-attention

The transformer, introduced by Google researchers in the 2017 paper Attention Is All You Need, is the architecture behind nearly every LLM. Its key idea is self-attention. For each token, the model scores how relevant every other token in the input is, then blends information from the most relevant ones.

Take the sentence "The bank raised interest rates." Self-attention lets the model link "bank" to "interest" and "rates", so it reads "bank" as a financial institution, not a riverbank. Because these scores can be computed in parallel on GPUs, transformers train on far more text than earlier designs could. Stacks of many such layers refine each token's representation until it carries the meaning of its whole context.

Self-attention lets the model decide which earlier words matter for each new word, and that is what separates modern LLMs from older language models.

How training teaches the model

Training happens in stages, and each has a different job.

A three-step ladder showing pretraining, instruction tuning, and preference tuning as stages of LLM training.

  1. Pretraining. The model reads trillions of tokens from books, websites, and code. For each position it predicts the next token, compares its guess with the real one, and nudges its parameters to shrink the error. No human labels are needed, because the text supplies its own answers.
  2. Instruction tuning. A smaller set of prompt and ideal-response pairs teaches the model to follow requests instead of just continuing text.
  3. Preference tuning. Humans rank candidate answers, and the model is trained toward the ones people prefer. This is where tone, safety, and helpfulness are shaped.

Pretraining is the expensive step. It takes large GPU clusters, which is why most people use a finished model instead of building one.

How the model writes an answer

Running a trained model is called inference. The model tokenizes your prompt, computes probabilities for every possible next token, picks one, appends it, and repeats. It never knows the full answer in advance.

Two settings shape the result. Temperature controls randomness: low values give predictable, repeatable text, and high values give more varied text. The context window caps how many tokens the model can consider at once, covering your prompt and its reply together. Newer models handle hundreds of thousands of tokens, and some handle over a million.

How to start using an LLM

Start with a hosted model behind an API. You send text, you get text back, and you pay per token. Self-hosting only pays off once your volume is high or your control requirements are strict.

Choose how to access a model

You have three realistic routes:

A smartphone, a laptop with code, and a server tower representing three ways to reach an LLM.

  • Chat app. Fine for exploring what a model can do. Not suited to building a product.
  • Hosted API. You call a model from code and pay per token. This is the fastest path to production and the right default for most teams.
  • Self-hosting. You rent or buy GPUs and run the serving stack yourself. You gain control and take on the operations work.

An API that follows the OpenAI format is the easiest to adopt, because the official OpenAI SDK works with it. Switching providers then means changing the base URL and the model name.

Compare models by price and context

Three numbers decide most buying choices: input price, output price, and context size. These are the listed Geodd prices per 1M tokens for three text models. Check each model page for current figures before you budget.

ModelInput / 1MOutput / 1MContextMax output
GPT-OSS-120B$0.039$0.158131.07K tokens131.07K tokens
GLM 5.3 Flash$0.110$0.4001.05M tokens128K tokens
DeepSeek V4.1 Flash$0.300$1.1001.05M tokens384K tokens

Here is a worked example. Say a support assistant handles 100,000 requests a month, each with 2,000 input tokens and 500 output tokens. That is 200M input tokens and 50M output tokens.

ModelInput costOutput costMonthly total
GPT-OSS-120B200 × $0.039 = $7.8050 × $0.158 = $7.90$15.70
GLM 5.3 Flash200 × $0.110 = $22.0050 × $0.400 = $20.00$42.00
DeepSeek V4.1 Flash200 × $0.300 = $60.0050 × $1.100 = $55.00$115.00

The cheapest model is not automatically the right one. Pick the smallest model that passes your own test set, then pay for more capability or a longer context only where the tests show you need it.

Make your first call and improve the results

Because the API is OpenAI-compatible, a call looks like this. Take the base URL and API key from the model page and your account.

from openai import OpenAI

client = OpenAI(
    base_url="BASE_URL_FROM_THE_MODEL_PAGE",
    api_key="YOUR_API_KEY",
)

response = client.chat.completions.create(
    model="openai/gpt-oss-120b",
    messages=[
        {"role": "system", "content": "You are a concise technical assistant."},
        {"role": "user", "content": "Explain a context window in two sentences."},
    ],
    max_tokens=200,
)

print(response.choices[0].message.content)

Once that works, three habits improve quality more than model swaps. Write a clear system prompt that states the role, the format, and what to do when unsure. Add two or three examples of ideal output inside the prompt. And ground answers in your own documents by retrieving relevant passages and putting them in the prompt, a pattern called retrieval-augmented generation (RAG).

Limits and risks of LLMs

LLMs sound confident whether they are right or wrong. They can state false facts, reflect bias in their training data, and forget what falls outside the context window, so any serious use needs checks around the model.

Hallucinations and how to reduce them

A hallucination is a fluent answer that is false. It happens because the model predicts plausible text, not verified truth. Names, citations, numbers, and recent events are the usual weak spots.

A magnifying glass over a printed page with a red pen and source documents nearby.

You cannot remove the problem, but you can shrink it. Supply source documents through RAG and tell the model to answer only from them. Ask for structured output so you can validate fields in code. Keep a human review step wherever an error is costly, such as medical, legal, or financial content.

Treat model output as a draft that needs checking, not as a source of record.

Bias, privacy, and cost

Models learn from human text, so they can repeat its stereotypes and gaps. Test your prompts on varied inputs before launch, especially when the output affects people.

Privacy depends on your provider, so read the data policy before you send anything sensitive. Geodd, for example, does not use API data for model training and does not store prompts, outputs, or uploaded files unless separately agreed in writing. Cost is the last risk. Long prompts and long outputs both bill by the token, so trim your context and cap max_tokens.

LLM vs GPT, AI, and other terms

An LLM is one kind of AI model. GPT is a family of LLMs from OpenAI, and ChatGPT is a product built on them. The acronym also names a law degree that has nothing to do with AI.

How the terms relate

People use these words interchangeably, but they sit at different levels.

TermRelationship to an LLM
Artificial intelligenceThe broad field. LLMs are one type of AI model.
Machine learningMethods that learn from data. LLMs are trained this way.
Natural language processingThe field of working with human language. LLMs are its most capable tool today.
Foundation modelA large pretrained model adaptable to many tasks. LLMs are one type, and some foundation models also handle images or audio.
GPTGenerative pre-trained transformer, a series of LLMs from OpenAI.
ChatGPTA chat product that uses GPT models.
Small language modelThe same idea at a smaller scale, built to run on limited hardware.

So the difference between GPT and an LLM is category versus member. Every GPT model is an LLM, but many LLMs, such as Claude, Gemini, Llama, GLM, and DeepSeek, are not GPT.

When LLM means a law degree

In law, LLM stands for Legum Magister, the Latin name of the Master of Laws degree. It is a postgraduate qualification that lawyers take to specialize in an area like tax or international law, or to study another country's legal system. If a search for "LLM for a lawyer" or "LLM in Masters" led you here, that is a separate meaning. Everything else in this article is about the AI kind.

Where to go from here

A large language model is a transformer network that learned the patterns of language by predicting the next token, then got tuned to follow instructions. That explains both its strengths and its habit of confident mistakes. You now know what the acronym stands for, how text becomes tokens and answers, and how to compare models by price and context before you commit.

The fastest way to learn more is to run a small test. Pick a real task from your work, write a prompt, and try it on two models. Measure the quality and the token cost on your own data, not on a benchmark.

When you are ready to call a model from code, you can compare the text models in Geodd's catalog and open any model page for pricing, limits, and integration examples.

The Chronicle / Bartosz Neuman
Build with Deploypad

Your next idea. A model API away.

Start building with inference and model APIs on Deploypad.

$10 USD Discovery credit

Explore inference and model APIs with $10 in Discovery credit. Enroll in Deploypad and unlock it with your first qualifying automatic top-up. Eligibility and offer details are shown in Deploypad.

Get started on Deploypad
Keep reading

More from Geodd.

All articles