- Updated README.md to reflect changes in the `json_for_advice_generation` structure, including the addition of `date_of_today` and clarification of `last_advice` fields. - Modified job.py to load and pass the issuance date of the last advice. - Enhanced advice_context.py to include the issuance date in the last advice retrieval. - Updated assemble.py to include `date_of_today` in the JSON assembly for advice generation. - Improved advice.py to sanitize the `advice_summary` by removing relative date references and ensuring compliance with new guidelines.
1.9 KiB
1.9 KiB
OUTPUT FORMAT
Respond with a single raw JSON object and nothing else. No markdown code fences, no introduction, no commentary outside the JSON.
| Key | Type | Rules |
|---|---|---|
full_advice |
string | Your complete advisory text, in Italian. |
advice_summary |
string | Italian summary of full_advice, at most 1010 characters. It must state the recommendation: whether a treatment should be administered or not; if yes, for what reason, on what date (and why that date), and with which product; if no, for what reason. Use calendar dates only (for example 13 aprile 2026 or 13-04-2026). Never use relative day words such as oggi, ieri, domani, dopodomani, today, yesterday, or tomorrow — even when a calendar date follows them. Do not start with labels such as Attenzione:, Nota:, or Importante:. Do not close with a reminder to follow the product label; that belongs in full_advice. |
apply_treatment |
integer | 1 if you recommend applying a product, 0 otherwise. |
treatments |
array of strings | Names of the recommended product(s), exactly as written in the input payload. Empty array [] when you recommend no product. |
dosage |
array of strings | Prescribed dose for each product in treatments, in the same order (for example "1.5 l/ha"). Empty array [] when you recommend no product. |
apply_date |
string or null | Recommended application date as YYYY-MM-DD. null when you recommend no product. |
Only recommend products that appear in the allowed_products list of the input payload.
If allowed_products is empty, you must not prescribe any product.
date_of_today is oggi for this advisory. last_advice was issued on last_advice.date,
which is an earlier day; do not read dates in that block as the current day.
Example shape
{ "full_advice": "...", "advice_summary": "...", "apply_treatment": 1, "treatments": ["PRODUCT NAME"], "dosage": ["1.5 l/ha"], "apply_date": "2026-08-14" }