What is an LLM? Large language models in coding tools

By

An LLM generates text and code from learned patterns. Learn how the model fits inside a coding agent, with a small example and links to hands-on guides.

An LLM (large language model) is a model trained on large amounts of text and code to generate language. It produces an answer a piece at a time, using the input and what it has already generated.

How to build an LLM from scratch walks through training a small model. AI fundamentals shows real local runs and explains the vocabulary.

How an LLM works

The input becomes tokens. The model uses learned weights to predict what comes next. Repeating that process produces text, code, or a request for a tool.

Generating text with a language modelInput tokens enter the model, which predicts another token and repeats until the response ends.Input tokensModel predicts nexttokenAppend tokenFinished response

In coding tools

Claude Code wraps Claude models with tools and context management. The model reasons about the request; tools read files, make edits, and run checks. See how Claude Code works.

OpenAI’s agents guide separates the model, tools, and guardrails. That distinction helps when using Codex: choosing a model and granting command access are separate decisions.

Cursor Agent combines instructions, tools, and the model you select. Grok Build is a coding agent available through an interactive terminal, headless scripts, or ACP.

Details checked against each vendor’s documentation in November 2026.

A concrete example

Try this prompt in a coding chat:

What does ['apple', 'pear'].map(word => word.length) return?
Explain each step.

The JavaScript expression returns [5, 4]. A model can explain it from learned patterns. An agent with a JavaScript runtime can also execute it and compare the output. Check whether the tool actually ran before treating an answer as a test result.

Use an LLM to explain unfamiliar code or draft a small function. For an introduction you can run locally, follow the local LLM guide.

Pitfalls

Fluent text can contain errors. Ask for evidence from the repository and run the code. A model’s training data also has a cutoff; give it current documentation for a newly changed API.

Language Model Builder shows the app used in the training guide. It makes the model’s training process visible before you add an agent’s tools around it.

  • Coding agent: A coding agent uses a model and tools to read a repo, edit files and run commands in a loop. How Claude Code, Codex, Cursor and Grok Build each do that job.
  • Tokens and usage limits: A token is the unit a model reads and writes. A usage limit is how much of that work a plan includes. How Claude Code, Codex, Cursor and Grok count it.
  • Training data: Training data is what a model learned from, and it stops at a cutoff. Dates on the Grok 4.7, GPT-6.1 Terra and Claude cards, and how an agent reads your repo.

All AI glossary entries →

Want me to talk about your product? You can sponsor this site.