Topic · 34 resources
Cost & Performance
Tokens, pricing, latency and context limits — the operational numbers that decide whether an AI feature is viable, and how to bring them down.
Projects1
Articles3
GPT vs Claude vs Gemini: An Honest Comparison
A practical comparison of the three leading AI models across writing, coding, reasoning, long documents and cost — including which one to reach for on which task, and where each genuinely falls short.
Which AI API Is Cheapest? How to Actually Compare
Headline price per million tokens is a misleading way to compare AI APIs. Here is how to calculate real cost for your workload, and the four changes that cut bills the most.
How to Cut Your AI API Costs by 70% Without Changing Models
Most AI API bills are two to three times larger than they need to be, and the fix is rarely a cheaper model. Seven techniques that reduce cost without reducing quality — caching, routing, output limits and the ones teams miss.
Glossarys26
Token
A token is the unit of text an AI model reads and writes — roughly four characters or three-quarters of a word in English. Models price by the token and cap context by the token, so token count determines both what you pay and what fits.
Tokenizer
A tokenizer is the component that splits text into tokens before a model processes it. Different model families use different tokenizers, which is why the same text can have different token counts on GPT versus Claude.
Few-shot prompting
Few-shot prompting means including two to five worked examples of the input-output pattern you want before making your real request. It is the fastest way to lock in a consistent format, tone or edge-case behaviour.
Chain-of-thought prompting
Chain-of-thought prompting asks a model to work through its reasoning step by step before answering. It measurably improves accuracy on maths, logic, and multi-step problems by forcing intermediate steps instead of an immediate guess.
Tree-of-thought
Tree-of-thought extends chain-of-thought by exploring several reasoning branches in parallel, evaluating each, and pursuing the most promising. It helps on problems where the first plausible path is often wrong.
Self-consistency
Self-consistency runs the same reasoning prompt several times at non-zero temperature and takes the most common answer. It trades cost for accuracy on problems with a single verifiable result.
Prompt chaining
Prompt chaining splits a complex task into a sequence of focused prompts, where each step's output feeds the next. Chains are easier to debug and more reliable than one large prompt.
Transformer
The transformer is the neural network architecture behind virtually all modern language models. Its key innovation is self-attention, which lets every token directly consider every other token in the input.
Reasoning model
A reasoning model is trained to generate extended internal deliberation before answering. It trades latency and cost for substantially better performance on maths, logic, coding and multi-step problems.
Multimodal model
A multimodal model accepts or produces more than one type of data — commonly text plus images, and increasingly audio and video. It processes them in a shared representation rather than through separate pipelines.
Open-weights model
An open-weights model has publicly downloadable parameters, letting anyone run it on their own hardware. Llama, Mistral, Qwen and DeepSeek are prominent examples.
Fine-tuning
Fine-tuning continues training a pre-trained model on your own examples to specialise its behaviour. It is the right tool for teaching consistent style, format or classification behaviour — not for adding knowledge.
LoRA
LoRA (Low-Rank Adaptation) is a fine-tuning method that trains small adapter matrices instead of updating all model weights. It cuts the compute and storage cost of fine-tuning by orders of magnitude.
Quantization
Quantization reduces the numerical precision of model weights — from 16-bit to 8-bit or 4-bit — shrinking memory use and speeding inference at a modest cost in quality.
Distillation
Distillation trains a smaller model to imitate a larger one, transferring much of the capability at a fraction of the inference cost. Most small production models are distilled from bigger teachers.
Reranking
Reranking takes an initial set of retrieved candidates and reorders them with a more accurate but slower model. It is one of the cheapest ways to materially improve RAG quality.
Knowledge cutoff
A model's knowledge cutoff is the date after which it has no training data. It cannot know about events, releases or prices after that point unless given the information in the prompt or via search.
AI agent
An AI agent is a system where a model plans and takes actions through tools in a loop, rather than producing a single response. It decides what to do next, does it, observes the result, and continues until the goal is met.
Inference cost
Inference cost is what you pay to run a model on a request, almost always billed per million input and output tokens. Output tokens typically cost three to five times more than input tokens.
Prompt caching
Prompt caching stores the processed form of a repeated prompt prefix so subsequent requests reusing it are cheaper and faster. Cached input tokens typically cost a fraction of normal input tokens.
Latency
Latency is the delay before and during a response. Two measures matter: time to first token, which governs perceived responsiveness, and tokens per second, which governs how fast the rest arrives.
Streaming
Streaming sends a response token by token as it is generated rather than waiting for completion. It does not reduce total generation time but dramatically improves how fast the response feels.
Determinism
A deterministic system returns identical output for identical input. Language models are only approximately deterministic even at temperature 0, because floating-point and infrastructure variation introduce small differences.
Evaluation (evals)
Evaluation is systematically measuring AI output quality against a test set, rather than judging from a handful of examples. It is what makes prompt and model changes safe to ship.
LLM as judge
LLM as judge uses one model to grade another's output against criteria you define. It makes evaluating subjective quality practical at scale, with known biases to control for.
Mixture of experts (MoE)
Mixture of experts is an architecture where only a subset of the model activates per token. A router selects a few specialised sub-networks, so a very large model runs at the cost of a much smaller one.
Prompts4
Chain-of-Thought Prompting — ChatGPT
Asking a model to "think step by step" before answering measurably improves accuracy on reasoning, math, and multi-step logic tasks because it forces the model to externalize intermediate steps instead of jumping to a guess..
Loop Budgets and Failure Handling
Production loops need budgets (max iterations, max cost, max time) and explicit failure paths: what happens when the Reviewer fails a result three times? Options: escalate to a human, fall back to a simpler method, or return a partial result flagged as unverified.
AIDA and PAS Prompts — ChatGPT
AIDA (Attention, Interest, Desire, Action) and PAS (Problem, Agitate, Solution) are proven copy structures.
Series & Format Design
Channels grow on repeatable formats, not one-off videos: a recognizable structure (same open, same segments, same visual grammar) lowers production cost and trains the audience to return.