AI Basics for Business: LLMs, Tokens, Prompts, Embeddings, RAG, Tools and Fine-Tuning
TL;DR: Every AI tool a business buys runs on the same seven ideas. An LLM generates text from patterns it learned in training. It reads and bills in tokens (about three quarters of an English word). What you send it is the prompt, and the wider job of choosing everything it sees is context engineering. Embeddings turn text into numbers so software can find documents by meaning, which is how RAG feeds your own documents into an answer. Tool use lets the model call search, code or your systems, and that is what makes it an agent. Fine-tuning changes how a model behaves, not what it knows. For most business problems the order to try is: a better prompt, then RAG, then tools, and fine-tuning last.
If you’d rather have someone pick the right setup and build it with you, that’s what we do in custom AI automation for small businesses.
How the pieces fit
You write a request. The software around the model adds instructions, past messages, and sometimes documents it found by searching your files (RAG, using embeddings). All of that is cut into tokens and sent to the LLM. The model either answers or asks to use a tool, gets the tool’s result back, and continues. You pay for every token in and out. Fine-tuning, if anyone did it, happened earlier and only changed the model’s habits.
LLM (large language model)
An LLM is the engine behind ChatGPT, Claude and Gemini. It was trained on a very large amount of text and learned which words tend to follow which. When you ask it something, it writes the answer one piece at a time by predicting what comes next. It does not look answers up in a database, which is why it can sound sure and still be wrong (see glossary/hallucination).
What matters for a business:
- Models differ. The big three families (OpenAI’s GPT, Anthropic’s Claude, Google’s Gemini) each sell a top model, a default and a cheap fast one. Open-weight models you can run yourself are covered in glossary/open-weight-models.
- Names turn over every few months. Check the vendor’s models page before you rely on a version; current prices are in tools/ai-plans-and-pricing.
- The cheapest per token is not always the cheapest per job. A model that needs more tokens or more retries can cost more in the end: glossary/cost-per-completed-task.
Tokens
LLMs read text in tokens, not words. In English one token is about 4 characters, so 1,000 tokens is roughly 750 words. Other languages often take two to three times as many tokens for the same content.
Tokens set two limits:
- What fits. Each model has a context window, the most tokens it can take in one request. The flagships from OpenAI, Anthropic and Google all sit around 1 million tokens. Claude’s current tokenizer fits about 555,000 English words in that million, so the 0.75 rule overstates Claude’s capacity.
- What you pay. API prices are per million tokens, and output costs more than input: Claude Sonnet 5.5 is $2 in and $10 out, Opus 5.5 is $4 and $20. A support bot that sends 750 tokens and gets 100 back costs a quarter of a cent per conversation at the $2/$10 rate, or $25 for 10,000 conversations a month.
Ways to spend fewer: shorter standing instructions, summarising old conversation instead of resending it, a cheaper model for simple jobs, and glossary/prompt-caching for text you send every time.
Prompt engineering and context engineering
A prompt is what you type. Prompt engineering is writing it so the model can do the job on the first try: say who it’s for, the format and length, the tone, and give an example.
Weak: “Write marketing copy for my product.” Strong: “Write a 100-word description of an organic moisturiser for women 35–50 who care about clean ingredients. Warm, not salesy. Mention: natural ingredients, no parabens, small batches. End with an offer of a free sample.”
Context engineering is the same job for everything the model sees, not only your message: standing instructions, history, retrieved documents, tool descriptions and tool results. It matters because more context is not better. Models miss things buried in the middle of long inputs and get worse on hard tasks as input grows, so the work is choosing, compressing and ordering what goes in. The full method is on glossary/context-engineering.
Embeddings
An embedding turns a piece of text into a list of numbers (a vector) that captures what it’s about. Texts that mean similar things get vectors that sit close together, even when they share no words: “my login is broken” lands next to a help page titled “troubleshooting authentication issues”.
That is what makes search by meaning, recommendations and RAG work. What embeddings are bad at: exact phrases (“Q3 2024 revenue”), “about A but not B”, recency, and comparing numbers. Production systems therefore mix keyword search with embeddings and a reranker.
Two costs to know before you build: you choose the embedding model once, because switching means re-embedding every document; and how you split documents into chunks changes what gets found. Current options are OpenAI’s text-embedding-3, Voyage (Anthropic has no embedding model of its own and recommends Voyage) and Google’s Gemini Embedding 2.
RAG (retrieval-augmented generation)
RAG means the system searches your documents first and puts the best matches into the prompt, so the model answers from your material instead of from memory. It’s the usual way to build a chatbot over a help centre, a policy library or product data, and the main defence against made-up answers.
Its weak spot is the search step. If retrieval brings back the wrong passages, the answer is wrong however good the model is. Improving it is design work: a minimum similarity instead of a fixed number of results, a reranker, dropping near-duplicates, and letting the model decide when and where to search again (agentic RAG). Those fixes are on glossary/rag.
Tool use
Tool use lets the model call something outside itself: web search, a calculator, code, your CRM or ad account. The model decides when to call a tool, which one and with what inputs; the tool returns a result; the model carries on. This is the step that turns a chatbot into an agent (glossary/ai-agent), and tools/mcp is the common way to plug tools in.
An agent is only as reliable as its tools: the same model does much better with tools that have clear descriptions, narrow jobs and error messages that say what to do next. Tool design is covered on glossary/tool-use.
Fine-tuning
Fine-tuning trains an existing model further on your examples so it adopts your format, terminology or style. It changes how the model answers, not what it knows: for new or changing facts, use RAG.
It pays when the output format is too specific to explain in a prompt. Honeycomb used it to teach a model its own query language; ReChat used it for a CRM format mixing structured fields and free text. It doesn’t pay for coding (base models already know code), for tasks that change often, or when a good prompt already works. Before you start you need a way to measure whether it helped (glossary/llm-evals); without one, you can’t tell if fine-tuning worked.
Which one do you need?
| Your problem | Try first |
|---|---|
| Answers are vague or in the wrong format | A better prompt with an example |
| The model doesn’t know your products, policies or documents | RAG |
| It needs live data or has to act in your systems | Tool use (via MCP) |
| Long inputs give worse answers | Context engineering: send less, in a better order |
| The bill is too high | Fewer tokens, a cheaper model for simple steps, prompt caching |
| A very specific output format still fails after all of the above | Fine-tuning |
Key Takeaways
- An LLM predicts text; it doesn’t look things up, so it can be fluent and wrong.
- Tokens set both what fits in one request (about 1 million on current flagships) and what you pay; output costs more than input.
- Prompt engineering is the cheapest fix; context engineering is the same job for everything the model sees.
- Embeddings find text by meaning; RAG uses them to put your documents into the answer.
- Tool use is what makes an agent; reliability depends on tool design.
- Fine-tuning changes behaviour, not knowledge, and needs an evaluation set first.
Related
- glossary/rag — retrieval quality in depth: thresholds, rerankers, agentic RAG
- glossary/context-engineering — the four operations and a cache-friendly layout
- glossary/tool-use — how tool calls work and how to design tools
- glossary/hallucination — why models invent things and what reduces it
- glossary/prompt-caching — paying less for text you send every time
- glossary/open-weight-models — models you can download and run yourself
- glossary/cost-per-completed-task — comparing models by the cost of a finished job
- glossary/llm-evals — measuring whether a change helped
- tools/ai-plans-and-pricing — current seat and API prices, dated per row
- tools/mcp — the standard way to connect tools and data to a model
Sources
- Claude models overview (Anthropic docs) — current Claude lineup, 1M-token context, about 555K words per 1M tokens on the current tokenizer
- Claude pricing — $2/$10 Sonnet 5.5 and $4/$20 Opus 5.5 per million tokens
- OpenAI API models — GPT-6 lineup and the 1.05M-token context of GPT-6.1 Sol
- Gemini API models — Gemini 4 Argon’s 1,048,576-token context
- OpenAI embeddings guide —
text-embedding-3models - Embeddings (Claude docs) — Anthropic offers no embedding model and recommends Voyage AI
- Gemini API embeddings — Gemini Embedding 2; embedding spaces of different models aren’t compatible
- Hamel Husain: Is fine-tuning still valuable? — the Honeycomb and ReChat cases, and evals as the prerequisite
- OpenAI prompt engineering guide and Anthropic prompt engineering docs
- Grootendorst, M. & Alammar, J. (2026). An Illustrated Guide to AI Agents. O’Reilly, ch. 4 — embeddings and retrieval worked example