Part 6 of 7 · AI and the craft
Which AI and LLM terms do engineers actually need?
A working glossary for engineers building with language models, grouped by what you're doing (building, evaluating, running, adapting, keeping it safe), with one or two plain sentences per term and what each means for the code you write.
The verdict, which the rest of this post earns: you need about forty terms, grouped by what you’re doing:
- Building on a model: tokens, context window, prompts, structured output, tool use, embeddings, retrieval (RAG), agents.
- Checking it works: evaluations, golden sets, hallucination, LLM-as-judge.
- Running it: inference, latency, caching, cost per token, model size.
- Changing the model itself: fine-tuning, LoRA, RLHF.
- Keeping it safe: prompt injection, guardrails, PII.
You don’t need the maths behind any of them to build good products. You do need to know what each one changes in your code, your costs and your failure modes.
Here’s the case. You sit in a design review, and the room fills with words: RAG, evals, LoRA, MCP, guardrails. It sounds like a new discipline with its own secret language, and the usual suspects for the confusion are the obvious ones: “it’s all research maths”, or “you need a machine-learning background”. Neither holds up. The clue that cracks it is that much of this vocabulary is familiar engineering in new clothes: caching, schemas, tests, retries, least privilege. Once the words click, the systems stop feeling mysterious and start feeling buildable, and that turns out to be the satisfying part.
Definitions are deliberately short and practical; where a term is used loosely in the industry, I say so. The evidence comes from my LLM document-ingestion pipeline, which extracts purchase orders from emails and PDFs.
Case file
The case A design review full of words like RAG, evals, LoRA, MCP Suspects “It’s all research maths”, “you need an ML background” Culprit Familiar engineering in new clothes The fix Learn about forty terms, grouped by what you’re doing Evidence An LLM document-ingestion pipeline for purchase orders
The basics: the lay of the land #
Let’s start with the handful of ideas everything else is built on. Every later clue leans on these.
- Model / LLM (large language model): a neural network trained to predict the next piece of text. Everything it does, from answering questions to writing code to calling tools, is built on that one objective.
- Foundation model: a large model trained on broad data, meant to be adapted or prompted for many tasks rather than built for one.
- Parameters (weights): the numbers learned during training. More parameters usually means more capable, slower and more expensive to run. Counts are quoted in billions (“a 70B model”).
- Open-weight vs closed model: open-weight models publish their weights, so you can run them yourself. Closed models are available only through the provider’s API. “Open source” is often used loosely for open-weight models whose training data and code aren’t public.
- Training vs inference: training produces the weights (once, expensively). Inference is using the model to generate output (every request, and what you pay for day to day).
Building on a model: where the work happens #
This is where most of the day-to-day work happens, and where the most useful ideas live. Watch how many of them are old friends wearing new names.
Diagram source
flowchart LR
A["Untrusted input"] --> B["Guardrails"]
B --> C["Retrieval (RAG)"]
C --> D["Prompt in the context window"]
D --> E["Model (inference)"]
E --> F["Structured output"]
F --> G{"Passes every check?"}
G -->|yes| H["Auto-accept"]
G -->|no| I["Human review"]
- Token: the unit a model reads and writes: a word, part of a word, or punctuation. Prices, limits and speed are all counted in tokens. English averages roughly four characters per token; other languages and code vary.
- Context window: the maximum number of tokens a model can consider at once: your instructions, the conversation, retrieved documents, and its own output. Anything outside it doesn’t exist for the model.
- Prompt / system prompt: the text you send. The system prompt sets standing instructions (role, rules, format); user messages carry the request.
- Few-shot examples: worked examples included in the prompt to show the format or reasoning you want. Often the cheapest quality improvement available.
- Temperature (and top-p): sampling settings that control randomness. Low means more consistent output, and suits extraction and classification; higher means more varied output, for brainstorming and writing. Not a quality dial.
- Structured output: asking the model for output that matches a schema (usually JSON Schema), and having the API enforce it. Essential whenever code, not a person, reads the result: my pipeline gets every purchase order back as typed JSON.
- Tool use (function calling): the model asks your code to run a function (search, look up an order, send an email) with arguments it chose. Your code runs it and returns the result. The model never runs anything itself: it proposes, your code decides.
- Agent: a loop where a model repeatedly decides what to do next, calls tools, reads the results and continues until the task is done. Powerful, and harder to test and bound than a single call. Give agents limits: steps, time, cost, and the tools they’re allowed.
- MCP (Model Context Protocol): an open protocol (introduced by Anthropic in late 2024) for connecting AI applications to tools and data sources in a standard way, instead of writing a custom integration per tool.
- Embedding: a list of numbers representing the meaning of a piece of text, so that similar meanings land close together. Used for semantic search, clustering and deduplication.
- Vector database / vector index: storage that finds the embeddings nearest to a query embedding. It can be a dedicated product, or an extension of a database you already run (for example
pgvectorfor PostgreSQL). - RAG (retrieval-augmented generation): retrieve relevant documents first, put them in the prompt, then ask the model to answer from them. That’s how you get answers about your own, current data without retraining. It’s a lovely, pragmatic idea: instead of teaching the model everything, you hand it the right page at the right moment.
- Chunking: splitting documents into pieces for retrieval. Chunk size and boundaries decide what retrieval can find, so it’s often where RAG quality is won or lost.
- Hybrid search and re-ranking: combining keyword search (exact terms, part numbers, names) with embedding search (meaning), then re-ordering the top results with a more accurate model. Pure embedding search misses exact identifiers like
BRG-6204.
Checking it works: the evidence that matters #
If teams building with LLMs read only one section, I’d want it to be this one. A model that sounds right is the most persuasive red herring in this whole field; these are the tools that tell you whether it is right.
- Hallucination: confident output that isn’t supported by the input or by facts. You reduce it with grounding (RAG), structured output, and asking the model to say when it doesn’t know. You detect it with evaluation and validation.
- Eval (evaluation): an automated test of model behaviour on a fixed set of inputs, with a score. Evals are to LLM features what unit tests are to code. Without them, every prompt change is a guess (the evals post goes further).
- Golden set: the labelled inputs and expected outputs an eval runs against. Build it from real cases, especially failures, and keep a held-out part you don’t tune on. My pipeline reports accuracy on both a tuning set and a held-out set, because the two can differ.
- Precision and recall: of the things the system flagged or extracted, how many were right (precision), and of the things it should have found, how many it found (recall). They trade off, and you choose the balance per use case.
- LLM-as-judge: using a model to grade another model’s output against a rubric. Cheap and scalable for open-ended output. Check the judge against human labels before trusting it.
- Confidence / routing: deciding per output whether to trust it or send it to a person, based on validation and confidence signals. My pipeline auto-accepts only lines that pass every check, and routes the rest to review. That’s how you automate safely without perfect accuracy.
- Benchmark: a public, standardised test set for comparing models. Useful for shortlisting models, never a substitute for an eval on your data.
Running it: following the money #
Once it works, the questions become the familiar ones: how fast, how much, how many. If a bill surprises you, the culprit is almost always somewhere in this list.
- Latency: time to first token (TTFT) and total time. Streaming shows tokens as they’re generated, so users see progress long before the full answer.
- Throughput: tokens per second per request, or requests per second for a deployment.
- Cost per million tokens: the usual pricing unit, with input and output tokens priced separately (output is usually more expensive). Long prompts sent on every request add up quickly.
- Prompt caching: reusing the processed form of a repeated prompt prefix (long instructions, a document) across requests, for lower cost and latency. Put stable content first and the variable part last.
- Batching (batch API): sending many requests to be processed asynchronously, at a lower price, when you don’t need answers immediately.
- Model routing / cascading: sending easy requests to a small, cheap model and hard ones to a larger model. Often the biggest cost lever after caching.
- Quantisation: storing a model’s weights with fewer bits, so it runs faster and in less memory, with some loss of quality. Matters when you host models yourself.
- Distillation: training a smaller “student” model to imitate a larger “teacher” on your task: big-model quality at small-model cost, for a narrow job.
- Rate limits: the provider’s caps on requests and tokens per minute. Design for retries with backoff, and for queueing work rather than failing it.
Changing the model itself: the tempting suspect #
Fine-tuning is the answer people reach for first, and often it’s the wrong one. Most teams never need this section, but knowing what’s possible helps you choose not to.
- Pretraining: the original, very expensive training on huge amounts of text. Almost no company does this.
- Fine-tuning: further training a model on your examples to change its behaviour: a style, a format, domain language, a narrow task. It teaches how to respond better than it teaches new facts, which RAG handles better.
- LoRA / PEFT (parameter-efficient fine-tuning): fine-tuning a small set of added parameters instead of all of them. Much cheaper, and the result is a small file applied on top of the base model.
- Instruction tuning: fine-tuning on instruction-and-response examples, so the model follows instructions. It’s what turns a raw text predictor into an assistant.
- RLHF (reinforcement learning from human feedback) and related methods: training on human (or AI) preferences between responses, to make outputs more helpful and safer.
- RAG vs fine-tuning vs long context: RAG for facts that change or are private; fine-tuning for consistent behaviour or format; a long context window when the whole relevant material fits and changes per request. The RAG, fine-tuning or long context post compares them properly.
Keeping it safe: the adversary in the room #
These terms are about the same old discipline: never trust input, and limit what any one part can do. In this part of the story, someone is actively trying to fool your system.
- Prompt injection: text in the model’s input (a web page, an email, a document) that tries to override your instructions: “ignore previous instructions and…”. Any content from outside is data, not instructions. Limit what tools the model can use when processing untrusted content.
- Jailbreak: a user deliberately trying to get the model to break its rules.
- Guardrails: checks around the model, before and after: input filtering, output validation against a schema, policy classifiers, and allow-lists of tools and actions.
- PII handling: keeping personal data out of prompts, logs and training data where it isn’t needed. Redact before sending, and check the provider’s data retention terms.
- Human in the loop: a person approves consequential actions (sending money, deleting data, emailing customers) before they happen. Cheap insurance for agents.
- Red-teaming: deliberately attacking your own system (injection, misuse, edge cases) before someone else does.
- Alignment: the research field, and the goal, of making models reliably do what their developers and users intend. Mostly a concern of model builders, but it’s why models refuse some requests.
Remember this
- Most LLM vocabulary is familiar engineering: caching, schemas, tests, least privilege.
- Evals are to LLM features what unit tests are to code.
- Any content from outside is data, not instructions.
The reveal: the ten I’d learn first on Monday #
If you’re starting to build with LLMs this week: token, context window, structured output, tool use, embedding, RAG, eval, golden set, prompt injection, cost per token. With those you can build something useful, know whether it works, keep it safe, and know what it costs. The rest you’ll pick up as you need it.
That’s the quiet reveal of the whole case: the mystery was mostly vocabulary. As you pick up the rest, notice how many of the best ideas here are old ones, adapted to a new kind of component, and how good they still look in their new setting. If you want the next case, start with the evals post.
Definitions reflect common usage in late 2026; terms in this field shift quickly, and vendors sometimes use the same word for different things. Examples from llm-document-ingestion.
Comments
No comments yet.
Sign in to comment. We'll email you a link; no password needed.