Prompting
6 cheat sheets
Prompting#
Foundational prompt engineering patterns, RAG, evals, few-shot, chain-of-thought, and structured output — the techniques that make LLM behavior reliable, measurable, and production-ready regardless of which model or SDK you use.
What’s in this section#
| Page | Topics |
|---|---|
| Prompt Patterns | Role prompts, prefilling, XML structure, system vs user, P-T-C-O, vision, prompt caching |
| RAG Checklist | Ingestion, embedding, retrieval, vector DBs, hybrid search, observability, eval |
| Evaluations | Golden datasets, LLM-as-judge, rubrics, statistical significance, regression detection |
| Few-Shot Prompting | Example selection, count tuning, dynamic retrieval, many-shot ICL, fine-tuning trade-off |
| Chain-of-Thought | Zero-shot / few-shot CoT, self-consistency, tree of thoughts, reasoning models |
| Structured Output | JSON mode, tool use as schema channel, Pydantic / Zod validation, retry loops |
Sections#
- Prompt Engineering Patterns — Repeatable techniques: role prompts, CoT, few-shot, XML structure, output schemas, vision, prefilling, and extended thinking.
- RAG Implementation Checklist — End-to-end checklist covering document ingestion, chunking strategies, embedding models, retrieval tuning, hybrid search, and evaluation.
- LLM Evaluations — Golden datasets, LLM-as-judge, rubrics, statistical significance, regression detection, evals vs tests.
- Few-Shot Prompting — In-context learning fundamentals, example selection, format design, dynamic retrieval, and order effects.
- Chain-of-Thought Prompting — Zero-shot and few-shot CoT, self-consistency, tree of thoughts, and reasoning-model comparison.
- Structured Output — Tool use as a schema channel, Pydantic/Zod pairing, JSON mode, and validator retry loops.
no sheets match the selected filters