Five decision shapes in five days — Literal, list[str], Pydantic model, runtime-built Literal, and a two-agent refiner. How does this set feel together?
Like a menu. Pick the type shape that matches the decision the agent is making, and the code falls out of the type choice.
That is the right frame. The quiz probes the shapes — which result_type fits which problem, how .model_dump() fits, and what the reviser call looks like.
Anything I should watch for?
One question asks when Literal beats BaseModel and vice versa. Another asks about the difference between the drafter and reviser system_prompt. Read each option before answering.
Five decision shapes, all on the same Agent(model, result_type=...) pattern:
decide_action — result_type=Literal[...] for a closed-set labelplan_steps — result_type=list[str] for a typed list with agent-chosen lengthagent_observe — Pydantic Observation class; .model_dump() to dictselect_best_url — runtime-built Literal[tuple(urls)] so the agent cannot inventrefine_once — two agents with different system_prompt; draft then reviseRule of thumb: use the narrowest type that captures the decision.
Five decision shapes in five days — Literal, list[str], Pydantic model, runtime-built Literal, and a two-agent refiner. How does this set feel together?
Like a menu. Pick the type shape that matches the decision the agent is making, and the code falls out of the type choice.
That is the right frame. The quiz probes the shapes — which result_type fits which problem, how .model_dump() fits, and what the reviser call looks like.
Anything I should watch for?
One question asks when Literal beats BaseModel and vice versa. Another asks about the difference between the drafter and reviser system_prompt. Read each option before answering.
Five decision shapes, all on the same Agent(model, result_type=...) pattern:
decide_action — result_type=Literal[...] for a closed-set labelplan_steps — result_type=list[str] for a typed list with agent-chosen lengthagent_observe — Pydantic Observation class; .model_dump() to dictselect_best_url — runtime-built Literal[tuple(urls)] so the agent cannot inventrefine_once — two agents with different system_prompt; draft then reviseRule of thumb: use the narrowest type that captures the decision.
Create a free account to get started. Paid plans unlock all tracks.