I work on a catalog enrichment tool in which the model raw product descriptions and outputs records structured data fields such as title, brand and category. The output then goes directly into a database pipeline, so that it must be perfectly consistent or the whole breaks. So far I have tried to provide the model very explicit instructions in the system request and to display some formatted examples in the user request. It works well most of the time, but I still get random problems such as extra in the answer or formatting that is not valid. Has anyone found a reliable approach for this? Do you only refuse to design a quick design or is it better to combine with a kind of post -processing or repair step?
prompts·1 min read9.9.2025
Best way to prompt for consistent JSON outputs?
Source: Original