Advanced Prompting in Prompt Engineering
Lessons in this section
- Step-by-Step Prompting
Break big tasks into steps: numbered steps in one prompt, showing each result, prompt chaining with checks between steps, planning a chain, and the game play pattern.
- Chain of Thought Prompting
Ask the model to reason before it answers: why chain of thought works, zero-shot and few-shot CoT, a fixed answer line, checking steps in code, and when CoT is worth the cost.
- Tree of Thoughts
Explore several lines of reasoning: generate distinct options, score them with weighted criteria, keep the best with a beam search, and a single-prompt version for everyday use.
- Self-Consistency Prompting
Ask several times and trust the most common answer: sampling with temperature, extracting answers, majority votes, agreement as confidence, accuracy versus cost.