The discipline of designing effective instructions for language models, combining clarity, structure, and examples to obtain consistent, high-quality responses.
Prompt engineering is the process of designing instructions that guide a language model to generate responses meeting specific requirements for format, tone, accuracy, and content. It is not simply "asking an AI questions" — it is a discipline combining clear communication, structured thinking, and iterative experimentation.
A prompt is the text input a language model receives. Prompt engineering is the optimization of that input to maximize output quality. Since models are non-deterministic, achieving consistent results requires specific techniques that go beyond intuition.
Each model provider publishes official guides with recommendations tailored to their models' strengths. While fundamental techniques are universal, implementation details vary.
These techniques work with any modern language model:
Specific instructions produce better results than vague ones. Instead of "write something about X," specify format, length, tone, and audience.
Include the relevant information the model needs to solve the problem. Do not assume the model has all necessary context — treat it as a brilliant but new collaborator who does not know the details of your project.
Show the model what a correct response looks like. Between 3 and 5 diverse examples are usually sufficient to establish the desired pattern. Examples are one of the most reliable ways to control format, tone, and structure.
Separate instructions, context, examples, and input data using clear delimiters — whether XML tags, Markdown headings, or text separators. This reduces ambiguity and improves interpretation.
Defining who the model is in the system prompt focuses its behavior and tone. Even a single sentence makes a difference.
Instead of a monolithic prompt, split into sequential steps (prompt chaining) or parallel subtasks that aggregate at the end.
Prompt design is iterative. Rephrase, change content order, try different levels of detail, and measure results.
Anthropic emphasizes structure and clarity as foundational pillars. Key recommendations:
<instructions>, <context>, <examples>. Use descriptive, consistent names.OpenAI distinguishes between GPT models and reasoning models, each requiring different strategies:
instructions parameter or message roles (developer, user) to establish instruction authority hierarchy.Google promotes the PTCF framework (Persona, Task, Context, Format) and emphasizes examples:
Llama models are open-source and require special attention to token formatting:
<|begin_of_text|>, <|start_header_id|>, and <|eot_id|> to delimit roles and conversation turns.Bedrock is a platform offering access to multiple models, with additional management tools:
| Technique | Mechanism | When to use |
|---|---|---|
| Chain-of-Thought | Ask "think step by step" before responding | Reasoning, math, logic |
| Prompt chaining | Output of one prompt feeds the next | Complex tasks with sequential steps |
| Self-consistency | Generate multiple responses and select the most frequent | Reduce reasoning errors |
| RAG | Combine prompt with information from external sources | Reduce hallucinations, keep responses current |
| Few-shot | Include input/output examples in the prompt | Control response format and style |
Input quality determines output quality. As language models integrate into more tools and workflows — from code assistants to autonomous agents — the ability to communicate effectively with them becomes a fundamental skill.
It is not about memorizing tricks, but about developing a mental model of how these systems process information and using that understanding to obtain predictable, high-quality results.
Field of computer science dedicated to creating systems capable of performing tasks that normally require human intelligence, from reasoning and perception to language generation.
Autonomous systems that combine language models with reasoning, memory, and tool use to execute complex multi-step tasks with minimal human intervention.
Open protocol created by Anthropic that standardizes how AI applications connect with external tools, data, and services through a universal interface.
Design strategies and patterns for AI agents to select, invoke, and combine external tools effectively to complete complex tasks.
The maximum number of tokens an LLM can process in a single interaction, determining how much information it can consider simultaneously to generate responses.
Key takeaways from Nate B Jones' second brain series — from the original 8 building blocks to Open Brain (Postgres + MCP), the two-door principle, and the implementation gap.
Massive neural networks based on the Transformer architecture, trained on enormous text corpora to understand and generate natural language with emergent capabilities like reasoning, translation, and code generation.
Prompting technique that improves LLM reasoning by asking them to decompose complex problems into explicit intermediate steps before reaching a conclusion.
Tools using LLMs to help developers write, understand, debug, and refactor code, from autocomplete to agents that implement complete features.