Structured Output, Tool Calling and a First Chat Agent
What you build: Schema and function-call validation tests
lessons
5
lesson hours (estimate)
≈ 15 h
lessons with a public video
5/5
0/5 lessons marked done · Progress is saved in this browser only. No account, nothing is sent to a server.
In review. The curriculum, module overviews and Levels 1–3 lessons are drafts written with AI assistance and reviewed by AI. Human review is still pending. English translation: AI-assisted, not human-reviewed.
Levels 1–3 lessons, exercises and quizzes are published as drafts, in Vietnamese with an AI-assisted English translation. They may change after human review.
What you build: Tests for tool choice, arguments and multi-turn conversation regression
Needs: L1-M05-L04
Key terms (5)
AgentVòng lặp model gọi tool và đọc kết quả
TrajectoryChuỗi tool được gọi
TranscriptBản ghi một cuộc hội thoại
Golden fileOutput đã review, dùng làm oracle
Conversation regressionPhát hiện thay đổi hành vi qua kịch bản nhiều lượt
A. Module overview
Field
Value
Module ID
L1-M05
Level
1 - AI QA Engineer
Description
Testing the structured output and tool use of an LLM feature: JSON Schema; structured outputs and the constraints the API does not enforce; tool definitions, tool_use and tool_result; parameter checks, business rules and approval for tools with side effects; multi-turn conversation regression for a tool-using agent. All labs use the real SDK (anthropic 2.3.0) with a local fake API.
Why this module matters
When model output is used to take action (create a return order, issue a refund), integration defects become real data changes. This is the part that can be tested deterministically.
Target professional competencies
Level 1: "Structured-output validation", "Tool-call and single-agent conversation testing".
Estimated duration
5 lessons (165 + 180 + 180 + 180 + 180 minutes) ≈ 15 hours + module assignment ~14 hours + quiz 0.5 hours ≈ 30 hours for someone new to Python. Estimate, not yet measured with real learners.
Prerequisites
L1-M01 to L1-M04. No API key needed.
Module output
Schema and function-call validation tests for ShopEasy Order Agent v2
Cost
0 VND
B. Learning objectives
ID
Objective
MO1
Write and verify a JSON Schema as an oracle for structured output.
MO2
Verify a structured output integration across every response path.
MO3
Assert the request, tool_use and tool_result against the tool use rules, including parallel calls.
MO4
Verify the layers of protection around tools with side effects.
MO5
Build a multi-turn conversation regression with a reviewed golden transcript.