Comparisons
Commonly confused prompting and LLM techniques, side by side. Each comparison links to both entries and their primary sources.
- Chain-of-Thought Prompting vs Self-Consistency
- Chain-of-thought prompting asks a model to write intermediate reasoning steps before its answer, in a single response. Self-consistency builds on it by sampling several chain-of-thought responses to the same question and returning the most common final answer, which improves accuracy at the cost of several times the inference.
- Tree of Thoughts vs Chain-of-Thought Prompting
- Chain-of-thought produces one left-to-right sequence of reasoning steps. Tree of thoughts treats reasoning as a search, generating several candidate next steps, having the model evaluate partial solutions and backtracking from dead ends, which helps on problems that need planning or lookahead but costs many more model calls.
- Retrieval-Augmented Generation vs Fine-Tuning
- Retrieval-augmented generation gives a model relevant documents at query time, so it can use current or private information without changing the model. Fine-tuning further trains the model's weights on examples, which is better for teaching a consistent format, style or specialized skill than for adding facts that change.
- Prompt Injection vs Jailbreak
- A jailbreak targets the model's own safety training, trying to make it produce content it was trained to refuse. Prompt injection targets an application, smuggling instructions into the model's input, often through data it processes, so that they override the developer's instructions.
- Few-shot Prompting vs Zero-shot Prompting
- Zero-shot prompting gives a model only an instruction. Few-shot prompting adds a small number of worked input-output examples so the model can infer the task and format from demonstrations, at the cost of a longer prompt and sensitivity to which examples are chosen and in what order.
- Prompt Engineering vs Context Engineering
- Prompt engineering is the craft of wording and refining a prompt so a model reliably produces the desired output. Context engineering is broader, covering everything a model sees at each step of an agent's run, including instructions, tools, retrieved data, memory and history, and deciding what enters and leaves a limited context window over time.
- ReAct vs Plan-and-Execute
- A ReAct agent decides one action at a time, reasoning after every observation about what to do next. A plan-and-execute agent writes a complete multi-step plan first and then carries out the steps, which uses fewer tokens and allows parallel steps but adapts less well unless it replans when something goes wrong.
- Agentic Workflow vs AI Agent
- In an agentic workflow, model calls and tools follow code paths the developer defined in advance, such as a fixed chain or a router. In an AI agent, the model itself decides which steps and tools to use, in a loop, until the task is done, gaining flexibility at the cost of predictability and spend.
- Function Calling vs Model Context Protocol
- Function calling is the model capability of emitting a structured request to run a tool, which the application executes. The Model Context Protocol is an open standard for how applications expose tools, data and prompt templates to model clients, so one server can work with any compliant client; the tools it exposes are still invoked through function calling.
- Agent Skills vs Model Context Protocol
- Agent skills are folders of instructions, scripts and reference files that teach an agent how to do a kind of task, loaded into context only when relevant. The Model Context Protocol connects an agent to external tools and data through servers. Skills supply procedures and knowledge, while MCP supplies capabilities, and the two are often used together.
- Structured Outputs vs Function Calling
- Structured outputs make a model's response conform to a schema, typically JSON Schema, so downstream code can parse it. Function calling also produces structured data, but as a request to run a specific tool with arguments, after which the result goes back to the model and the conversation continues.
- Top-k Sampling vs Top-p Sampling
- Top-k sampling always restricts each next token to the k most probable candidates. Top-p (nucleus) sampling instead keeps the smallest set of candidates whose probabilities add up to p, so the number of candidates grows when many tokens are plausible and shrinks when one is clearly best.
- Dense Retrieval vs BM25
- BM25 ranks documents by the query's exact words, weighted by how rare each word is, and needs no training. Dense retrieval compares embedding vectors, so it matches meaning and paraphrases but can miss exact identifiers, names and codes. Production search often combines the two in hybrid search.
- Prompt Caching vs KV Cache
- The KV cache stores attention keys and values for the tokens already processed within a single request, so each new token does not reprocess the whole sequence. Prompt caching keeps that processed state for a shared prompt prefix across requests, so later calls that begin with exactly the same content are cheaper and faster.
- Reinforcement Learning from Human Feedback vs Direct Preference Optimization
- Both align a model with human preferences learned from comparisons of responses. RLHF first trains a separate reward model on those comparisons and then optimizes the language model against it with reinforcement learning, while direct preference optimization trains directly on preferred-versus-rejected pairs with a simple loss, with no reward model or reinforcement learning step.
- Low-Rank Adaptation vs Fine-Tuning
- Full fine-tuning updates all of a model's weights on new training data. LoRA is a parameter-efficient form of fine-tuning that freezes the original weights and trains small low-rank matrices added to them, which needs far less memory and lets several task adapters share one base model.
- Self-Refine vs Reflexion
- Self-Refine improves a single output within one task, with the model critiquing and revising its own draft until a stopping point. Reflexion works across attempts, having an agent write a reflection on why an attempt failed, often using signals such as test results, and store it in memory to guide the next try.
- Vibe Coding vs Spec-Driven Development
- Vibe coding builds software by describing what you want to an AI model and accepting the code, largely without reading it, with intent living only in the chat. Spec-driven development writes and refines a specification first, then has the agent derive a plan, tasks and code from it, keeping the specification as the source of truth while the developer reviews focused changes.