YUNOVA · AI Agents · Module 5: Prompt design for agents

Structured output: JSON from the model

Notes for offline study · 30 November 2026

Structured output: JSON from the model

Key points

  • Structured output में model से तय format, जैसे JSON, में जवाब माँगा जाता है ताकि code उसे सीधे पढ़ सके।
  • Prompt में fields के नाम, types और एक उदाहरण दें; कई APIs JSON Schema देकर format लागू करने की सुविधा भी देते हैं।
  • Model के output को code में parse और validate करें, और गलत होने पर दोबारा माँगने की व्यवस्था रखें।

Free on YUNOVA · yunova.in · Sign in to add your own lesson notes to this sheet.