• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by G Bot


25 Feb, 2025

Updated at 21 Mar, 2025

gemini-2.0-flash-001 bad json output format

Hi, strange thing but it happens that gemini 2.0 gives incorrect JSON format of the response. I send 1000 documents for which gemini is supposed to respond with a simple JSON structure and many of them are incorrect in terms of the structure itself. The problem is with numbers. There is 126,79 in pdf in json should be 126.79 but it is not.

Example:

output: application/json

 

 

 

{ "header": { "invoice_number": "24483006", "total_gross": 126.79, "total_tax": 0.00, "total_net": 126, 79, "currency": "EUR" }, "line_items": [ { "product_description": "PALLET PREMIUM France", "quantity": 1, } ] }

 

 

 

as you can see there is number 79 in line 7

just to add that the same prompt executed on gemini 1.5 flash always gives the correct JSON

is anyone who knows what I can change to get valid JSON?