Advanced Reasoning in Prompt Engineering

Lessons in this section

  1. ReAct Prompting

    Let the model reason and use tools: the Thought, Action, Observation loop, parsing actions in code, building a safe calculator and search tool, step limits, and tool safety.

  2. Meta Prompting

    Use prompts to work on prompts: generate a prompt from a goal, critique it against a checklist, extract the rewrite in code, compare versions, and let tests decide which wins.

  3. Generate Knowledge Prompting

    Ask for facts before the answer: the single-prompt and two-step versions, splitting facts from the answer in code, flagging facts to check, and how it differs from grounding.

  4. Prompt Evaluation and Optimization

    Test prompts properly: build a test set, check outcomes in code, score and compare versions, find regressions and flaky cases, weight criteria, and set a release bar. Includes a graded challenge.