Prompting Tips and Examples
Producing JSON
You can efficiently specify the shape of JSON objects you’d like your LLM to produce with the following recipe:
Note the code fencing used here to add descriptions for the key-value pairs so the model knows what to extract.
We also provide a default value so we can handle that downstream in our system rather than getting inconsistent values from the LLM when the data is not found.