10Topic 10 of 15

Prompting

Better prompts, system prompts, chaining, RAG, and fewer hallucinations.

8 plates · 28 min to read them all


  1. 10.01 How to Write Better AI Prompts (A Framework) A prompt framework that still holds: role, task, context, format — plus the long-input ordering rule Anthropic measures at up to 30% better answers. 3 min
  2. 10.02 How to Write a System Prompt That Steers a Model System prompt structure: role, rules with reasons, exact output format, tagged examples. Set it in the API system parameter and test it by breaking it. 3 min
  3. 10.03 How to Reduce AI Hallucinations With Prompts Ground the answer in pasted source text, allow "not stated", demand a quote per claim, and lower temperature — the prompt habits that cut invented facts. 4 min
  4. 10.04 How to Chain Prompts to Solve a Big Task Prompt chaining splits a task into separate API calls you can inspect — the draft, review, refine loop — and when a modern model handles it in one call. 3 min
  5. 10.05 RAG Explained Simply (and When You Need It) RAG retrieves relevant chunks, then generates. With 1M-token context windows and hosted file_search tools, here is when it still beats pasting the file. 3 min
  6. 10.06 Prompt Evals with promptfoo: One YAML, One Matrix Install promptfoo, write a config with two prompts, three test cases and real assertions, run it, and read the pass/fail grid. 4 min
  7. 10.07 LLM-as-Judge Evals: Rubric and Verdict Grade model outputs with a judge model: a copy-paste rubric prompt, a structured verdict, a Python scoring loop, and the biases that fake good scores. 4 min
  8. 10.08 Prompt Injection Defense for Tool-Using Agents Six defenses that actually reduce blast radius — privilege separation, allowlists, fenced tool results, approval gates, output filtering, and tests. 4 min

Keep going

Other topics

All 105 plates →
  1. 01 Install & set up 5
  2. 02 First steps 4
  3. 03 Claude Code commands 9
  4. 04 Workflows 6
  5. 05 MCP 8
  6. 06 Claude 2
  7. 07 ChatGPT 6
  8. 08 Cursor 3
  9. 09 Local LLMs 12
  10. 11 Choosing tools 5
  11. 12 AI images 7
  12. 13 Everyday tasks 7
  13. 14 Other coding agents 5
  14. 15 Building with the API 18

↑↓ move↵ openalt+↵ copy first command

Keyboard

⌘/ctrl+K or /
Search all guides
alt+↵
In search: copy the guide's first command
j / k
Move through a list of guides
c
On a guide: copy its first command
t
Toggle light / dark
?
This list