Gpt-4o breaking JSON responses

Hi I am seeing quite frequent broken JSON responses with gpt-4o for prompts that used to work fine with gpt-4-turbo and gpt-4.

Example response below (used ChatGPT to replace English words with Lorem Ipsum Dolor placeholders to protect privacy).

I’ve seen a few other posts here suggesting the same. I hope OpenAI can comment or update the model to behave properly with JSON responses.


{
    "response": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
    "entry": "#### Lorem Ipsum\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vehicula ex non augue tincidunt, quis vestibulum lorem sollicitudin. Suspendisse in orci at purus vehicula sodales. Duis consectetur urna quis velit fermentum, in tristique velit bibendum. Nulla facilisi. Nunc sed eros id ligula varius tincidunt. Cras fringilla cursus lacus, id gravida enim. Phasellus malesuada tristique velit. Donec bibendum ligula non nisl suscipit, eget cursus metus fringilla.\n\n#### Lorem Ipsum\n\n- 😟 *Lorem*: Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- 😡 *Ipsum*: Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- 😤 *Dolor*: Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- 😩 *Sit*: Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n\n#### Lorem Ipsum Lorem Ipsum Lorem Ipsum\n\nLorem ipsum dolor sit amet:\n\n- " 	,"]Lorem ipsum dolor sit amet." 	
   	: "Lorem ipsum dolor sit amet?" 	
   	,"]" 	
   	: "Lorem ipsum dolor sit amet." 	
   	,"]Lorem ipsum dolor sit amet.\n\nLorem ipsum dolor sit amet: " 	
   	: "Lorem ipsum dolor sit amet." 	
   	
   	
   	,"]#### Lorem Ipsum Lorem Ipsum Lorem Ipsum\n\n*Lorem ipsum dolor sit amet:*\n\n- **🛣️ Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **🗺️ Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **🤔 Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **⏳ Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **🚦Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n\n*Lorem ipsum dolor sit amet:*\n\n- **📱 Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **🎫 Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n\n#### Lorem Ipsum Lorem Ipsum Lorem Ipsum\n\nLorem ipsum dolor sit amet:\n\n- **🌱 Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **🗺️ Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **🚦 Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **💬 Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n- **Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit, ullamcorper efficitur sapien. Integer elementum mi ex, nec sagittis ligula ullamcorper id.\n - Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n - ** 📞 Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n - ** 🔁 Lorem Ipsum** – Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n#### Lorem Ipsum Lorem Ipsum Lorem Ipsum\n\nLorem ipsum dolor sit amet:\n\n" 	
   	: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." 	
   	
   	,"]Lorem ipsum dolor sit amet:\n\n- 😟 *Lorem* – 🔽 Lorem ipsum dolor sit amet.\n- 😡 *Ipsum* – ↔ Lorem ipsum dolor sit amet.\n- 😤 *Dolor* – 🔽 Lorem ipsum dolor sit amet.\n- 😩 *Sit* – ↔ Lorem ipsum dolor sit amet.\n\n#### Lorem Ipsum\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 🛣️"
  	: " }"
  }

I am facing the same issue… JSON responses being sent broken or not closed properly.

I have the same issue in gpt-3.5-turbo also, but locally works fine

Yes, I noticed past models are now having this issue… less frequently than model 4o thought.

Same issue here… JSON response incomplete

I’m also having an issue with JSON, but it’s more along the lines of GPT-4o not putting real line-breaks in.

My issue:

Thanks for the feedback, genuinely. I know it’s annoying when GPT makes dumb mistakes. We’re actively working on improving this for future versions. The more specific feedback and specific examples we get, the more efficient we can be at iterating on these errors.

4 Likes