Module resources

Prompting and structured output

Checked sources to go further than the lessons. Back to the module.

Recommended learning sequence

Work through these in order.

  1. Prompt Engineering (opens in a new tab)

    Lilian Weng2023Article

    Start with one survey of the ground: zero-shot, few-shot, instruction prompting, self-consistency and chain-of-thought in a single article, so the two lessons have a map.

  2. Prompt engineering overview (opens in a new tab)

    Anthropic2026Documentation

    Official guidance next, with its point that you define success criteria and a way to test against them before you tune a prompt. Repeated on purpose from lesson 1 because it sets the order of work.

  3. Anthropic's Interactive Prompt Engineering Tutorial (opens in a new tab)

    Anthropic2026Repository

    Practise the lesson 1 habits (separating data from instructions, examples, thinking step by step) in exercises before reading the papers. It was written for Claude 3 models (its README uses Claude 3 Haiku), so follow the Prompting best practices page where the two differ. Repeated on purpose: this is where practice belongs in the order.

  4. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models (opens in a new tab)

    Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, et al.2022PaperNeurIPS 2022

    Then read the paper behind chain-of-thought. After the exercises you know what a worked example looks like, so the results are easier to read. Repeated on purpose from lesson 1, because the paper belongs at this point in the order.

  5. Reasoning models (opens in a new tab)

    OpenAI2026Documentation

    Move to reasoning models: what they cost in reasoning tokens and how prompting them differs. This is the bridge from lesson 1 to lesson 2. Repeated on purpose from lesson 2, because it sets up the structured-output step.

  6. Structured outputs (opens in a new tab)

    Anthropic2026Documentation

    Finish with structured output: how a schema constrains the reply, and which limits remain. Then try a library from the items list to validate real replies. Repeated on purpose from lesson 2, as the closing step of the order.

All resources

Official documentation

  • Prompt engineering (opens in a new tab)

    OpenAI2026Documentation

    A second vendor's view of the same craft, including the advice to pin to model snapshots and build evals. Repeated on purpose from lesson 1 so you can compare it with the Claude guidance.

  • JSON Schema reference (opens in a new tab)

    JSON Schema2026Documentation

    The schema language that structured-output features describe your format in. Reading the type and enumerated-value keywords helps you write a schema the lesson 2 options can enforce.

  • Models (opens in a new tab)

    Pydantic2026Documentation

    The validation half of structured output: how to turn a JSON string into a checked object and read every error. Repeated on purpose: lesson 2 names Pydantic as the way to validate output in its validate, retry and fall back loop.

Further reading

Research papers

  • Lost in the Middle: How Language Models Use Long Contexts (opens in a new tab)

    Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, et al.2023PaperTransactions of the Association for Computational Linguistics (TACL)

    Shows that models use information at the start or end of a long input better than information in the middle. It gives evidence for where to place instructions and data in a long prompt. Repeated on purpose from a later module's lessons.

  • Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (opens in a new tab)

    Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, et al.2023PaperNeurIPS 2023 Datasets and Benchmarks Track

    Studies using a strong model to grade other models' answers and lists the biases of that method. Read it before you let a model score your prompt experiments. Repeated on purpose from a later module's lessons.

Hands-on

Courses

  • ChatGPT Prompt Engineering for Developers (opens in a new tab)

    Isa Fulford, Andrew Ng2026Course

    A short video course with code examples on writing clear instructions and iterating on prompts for summarizing, inferring and transforming text, using the OpenAI API. The page says access was free for a limited time and the graded assignment and certificate need a PRO membership.