# How to get 100% valid JSON answers?

**URL:** <https://community.openai.com/t/how-to-get-100-valid-json-answers/554379>\
**Category:** Prompting\
**Tags:** gpt-4, gpt-35-turbo, chatgpt, api\
**Created:** [December 11, 2023, 8:13pm UTC](https://community.openai.com/t/how-to-get-100-valid-json-answers/554379 "2023-12-11T20:13:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Foxalabs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/foxalabs/32/738355_2.png) [@Foxalabs](https://community.openai.com/u/Foxalabs)\
**Post date:** [December 11, 2023, 11:07pm UTC](https://community.openai.com/t/how-to-get-100-valid-json-answers/554379/4 "2023-12-11T23:07:54Z")

</div>

You might get 99.99999% performance with traditional deterministic code, but there are likely edge cases that will reduce that number down to 99.99% or lower.

With a statistically influenced model such as an LLM, there is no way to ensure that. There are no systems that offer single attempt perfection, you can approximate it with repetition and proper error checking and result testing.

---

_[View the full topic](https://community.openai.com/t/how-to-get-100-valid-json-answers/554379)._
