Prompting GPT Models to Return JSON
August 2024 Update: Now a solved problem. Use Structured Outputs.
Large language models (LLMs) return unstructured output. When we prompt them they respond with one large string. This is fine for applications such as ChatGPT, but in others where we want the LLM to return structured data such as …
