CoursesBuilding AI Applications

Structured Outputs and Function Calling

Get a shape back instead of prose, run the tool loop from the application's side, handle results and errors without losing the thread, and validate everything before it touches your data.

Lessons
6
Exercises
34
Minutes
36

Start Asking for a Shape

  1. 1

    Asking for a Shape

    After this lesson you can ask a model for a typed object instead of prose, keep the schema small enough to be reliable, and know why the answer still gets validated.

    DebugFill blankMultiple choice
    5 exercises
    5 min
  2. 2

    The Tool Loop From the App Side

    After this lesson you can run the function-calling loop: the model asks for a tool by name and arguments, your code runs it, and the result goes back as a message until the model answers.

    DebugMultiple choiceTrace
    5 exercises
    6 min
  3. 3

    Results, Errors and Parallel Calls

    After this lesson you can return a tool failure as a result the model can act on, handle several calls in one turn, and stop the loop before it costs you.

    DebugMultiple choiceTrace
    5 exercises
    5 min
  4. 4

    Validate, Then Repair

    After this lesson you can put a validator between the model and your data, feed its error back for one repair attempt, and know where validation stops and human review starts.

    Code orderMultiple choiceTrace
    5 exercises
    5 min
  5. 5

    Checkpoint: Shapes and ToolsCheckpoint

    Schemas, the tool loop, results and validation in fresh situations.

    Fill blankMultiple choice
    6 exercises
    6 min
  6. 6

    Boss: The Support Triage BotBoss

    One bot from schema to escalation: a shape, a tool loop, an error, a parallel call, an injection attempt, and the line a bot must not cross.

    DebugFill blankMultiple choiceTrace
    8 exercises
    9 min