aiwithgrant
about me
aiwithgrantGuides

Official prompt engineering guides

Curated guides from the teams building the models. 21 guides across 6 providers.

21 guides
Anthropic
Anthropic
Official Docs
Beginner

The Complete Prompt Engineering Guide

Everything from Anthropic's prompt engineering docs in one progressive guide. Clear instructions, multishot examples, chain of thought, XML tags, roles, chaining, long context, extended thinking, and Claude 4 best practices.

Clear promptingMultishot examplesChain of thought+6
Anthropic
Anthropic
Official Docs
Beginner

Be Clear and Direct

How to write clear, specific, and direct prompts that get Claude to do exactly what you want.

Clear instructionsSpecificitySequential steps+3
Anthropic
Anthropic
Official Docs
Beginner

Use Examples (Multishot Prompting)

How to use few-shot examples to dramatically improve Claude's accuracy, consistency, and output quality.

Few-shot promptingExamplesOutput formatting+3
Anthropic
Anthropic
Official Docs
Intermediate

Let Claude Think (Chain of Thought)

Encourage step-by-step reasoning to dramatically improve Claude's accuracy on complex tasks.

Chain of thoughtStep-by-step reasoningStructured thinking+3
Anthropic
Anthropic
Official Docs
Beginner

Use XML Tags to Structure Prompts

Structure your prompts with XML tags for clarity, accuracy, and easy parsing of Claude's output.

XML tagsPrompt structureOutput parsing+3
Anthropic
Anthropic
Official Docs
Beginner

Give Claude a Role (System Prompts)

Use system prompts and role prompting to turn Claude from a general assistant into a domain expert.

System promptsRole promptingPersona+3
Anthropic
Anthropic
Official Docs
Intermediate

Chain Complex Prompts

Break complex tasks into smaller subtasks for better accuracy, clarity, and traceability.

Prompt chainingSubtasksMulti-step workflows+3
Anthropic
Anthropic
Official Docs
Intermediate

Long Context Prompting Tips

Techniques for leveraging Claude's 200K token context window with large documents and data.

Long contextDocument structureXML tags+3
Anthropic
Anthropic
Official Docs
Advanced

Extended Thinking Tips

Advanced strategies for getting the most out of Claude's extended thinking mode on complex problems.

Extended thinkingThinking budgetComplex reasoning+3
Anthropic
Anthropic
Official Docs
Beginner

Prompt Improver

Use Anthropic's automated prompt improver to optimize your prompts with chain-of-thought and XML structure.

Prompt optimizationAutomated improvementChain of thought+3
Anthropic
Anthropic
Official Docs
Intermediate

Claude 4 Best Practices

Specific prompting strategies and best practices for Claude 4 models.

Claude 4 capabilitiesThinking modeExtended thinking+3
Anthropic
Anthropic
Engineering Blog
Advanced

Context Engineering for Agents

How to design effective context for AI agents — memory, tool results, and orchestration.

Agent architectureContext windowsMemory management+3
OpenAI
OpenAI
Official Docs
Beginner

The Complete OpenAI Prompt Engineering Guide

Everything from OpenAI's official prompt engineering docs. Six core strategies with tactics, examples, and real before/after comparisons.

Clear instructionsReference textTask splitting+5
OpenAI
OpenAI
Cookbook
Intermediate

GPT-4.1 Prompting Guide

Prompting techniques specific to GPT-4.1. Covers agentic workflows, 1M token context, literal instruction following, and the planning patterns that boosted SWE-bench by 4%.

Agentic behaviorInstruction followingLong context+3
OpenAI
OpenAI
Help Center
Beginner

Best Practices (Help Center)

OpenAI's concise, no-nonsense best practices. Quick wins for prompt formatting, temperature tuning, few-shot examples, and avoiding common mistakes.

Prompt formattingTemperature settingsToken management+3
Google
Google
Official Docs
Beginner

The Complete Gemini Prompting Guide

Everything from Google's Gemini prompting docs. Four input types, few-shot patterns, multimodal handling, parameter tuning, and agentic workflow strategies.

Multimodal promptingSystem instructionsFew-shot prompting+4
Google
Google
Vertex AI Docs
Intermediate

Gemini 3 Prompting Guide

Gemini 3 specific quirks and techniques on Vertex AI. Temperature gotchas, thinking modes, persona grounding, verbosity control, and multi-source synthesis.

Gemini 3 featuresThinking modeGrounding+3
Google
Google
PDF Guide
Beginner

Workspace Prompt Guide

Prompting Gemini inside Docs, Sheets, Slides, and Gmail. Google's official framework: persona, task, context, and format. Practical patterns for everyday productivity.

Workspace integrationDocument generationData analysis+3
Meta
Meta
Official Docs
Intermediate

Llama Docs & Prompt Guide

Everything you need for Meta's open-source Llama models. Chat templates, system prompts, local deployment with Ollama, fine-tuning with LoRA, and production serving.

Llama setupChat templatesSystem prompts+3
Mistral
Mistral
Official Docs
Intermediate

Prompting Capabilities

Mistral's official prompting guide. System prompt design, JSON mode, function calling, worded rating scales, and the specific anti-patterns to avoid.

Function callingJSON modeGuardrailing+3
Microsoft
Microsoft
Azure Docs
Intermediate

Azure OpenAI Prompt Engineering

Microsoft's enterprise-focused guide for Azure OpenAI. Five prompt components, recency bias exploitation, grounding with citations, and the 'double down' technique.

Azure OpenAISystem messagesFew-shot learning+3