Why do we still trust LLMs to output raw JSON or dates?

by•

I had my agent hallucinate the wrong day of the week three times in a row simply because I let it calculate timestamps on its own instead of using a basic system script. Moving all structured data generation like JSON fields file paths and dates away from the model and into deterministic Python scripts completely fixed our pipeline stability.

LLMs are great for writing plain text and copy but terrible at programmatic math. Do you still let your agents handle raw config values or do you lock those down with scripts?

8 views

Add a comment

Replies

Best

same here.. our agents stamp every run into a handoff file and it only stayed right once the job ran date first and copied that in. the part that still caught me was the timezone, the machine is on IST and the agent read the times as london. do you pass the zone in too or just the date?

  yes, pass a full timezone name like Europe/London rather than IST, which can refer to India, Ireland or Israel

The agent parsed legacy timestamps into JSON, choked on leap days, and clamped them to the start of the month without throwing an error. The schema check passed and the run finished green while the historical records were completely scrambled.