2 ms·
I noticed that, at least with the models I tested (gpt 3.5, 4o and llama 3.1 8b), to get a response with just the JSON and then have it follow the exact structu
by arthurtakeda 2y ago
I noticed that, at least with the models I tested (gpt 3.5, 4o and llama 3.1 8b), to get a response with just the JSON and then have it follow the exact structure so it correctly renders the topic and subtopics was the hardest part.
Ended up having to prompt I think twice (at the beginning and the end) so it finally followed the exact JSON structure.
- airstrike 2y agoYou can use structured outputs to tell ChatGPT-4o to create specific JSON matching a schema: https://platform.openai.com/docs/guides/structured-outputs/introduction https://platform.openai.com/docs/guides/structured-outputs/i... It's a bit annoying because the schema has some limitations but it works with enough elbow grease
- arthurtakeda 2y agointeresting, didn’t know about that feature, thanks for sharing!