The output must be valid JSON with 'question' and 'answer' fields. HTML is required for formatting, paragraphs limited to 3 lines, and lists used for clarity. TeX must be correctly delimited and escaped. Tables need specific styling, and graphs require Chart.js implementation.