Back to Prompt Library
planning
Define Pydantic Models for Output Structures
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Agent for Ethical, Personalized Content Recommendation
Format
Text-first
Lines
1
Sections
1
Linked challenge
Agent for Ethical, Personalized Content Recommendation
Prompt source
Original prompt text with formatting preserved for inspection.
1 lines
1 sections
No variables
0 checklist items
Using Pydantic, define two robust data models: `ArticleSummary` and `RecommendationItem`. `ArticleSummary` should include fields like `title`, `key_points` (list of strings), and `sentiment`. `RecommendationItem` should contain `article_id`, `title`, `relevance_score` (float), and `reason`. These models will enforce the structure of your agent's outputs. Provide the Python code for these Pydantic models.
Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Preserve the role framing, objective, and reporting structure so comparison runs stay coherent.
Tune next
Swap in your own domain constraints, anomaly thresholds, and examples before you branch variants.
Verify after
Check whether the prompt asks for the right evidence, confidence signal, and escalation path.