Assistant misunderstand json file

I’ve an Assistant that must answers questions based on a faq loaded in a json file.
The json file is a collection like this:

[
"39171":{
	"id": 39171,
	"Question": "Some question",
	"Answer": "Some answer",
	"data_ult_mod": "2023-10-23T07:24:23.457Z",
	"is_valid": true
},
"39172":{
	"id": 39172,
	"Question": "Some question",
	"Answer": "Some answer",
	"data_ult_mod": "2023-10-23T07:24:23.457Z",
	"is_valid": false
}
]

The assistant works pretty good, when a user asks something it retrieves alwasy the most relevant answer from the FAQ.
The problem is that it seems to have some problem to check the “is_valid” field. It always take the same faq even if is marked as invalid, because it confuse the “is_valid” field with the one of the next or previous json object.
It understands the error, and it explained to me what’s was confusing it, but even given a more detail instruction on how to take care of the “is_valid” field, it fails.
image

As you can see, the green area is the right faq but it ends with no “is_valid” field, that in this case it’s false, and it evaluate the previous faq “is_valid” field. It seems to have some problem to understand json object, but if ask it to retrieve that object by its id it works like a charm.

Any suggestion on this issue?

Hopefully pretty soon the Assistants will support the JSON format natively. Then I would expect it not to be and issue.

1 Like

Anyway It seems to be able to understand json format pretty well.
Consider this example


It retrieves the right object and it also tells me (in italian, my language) that it’s not valid anymore!!!

:roll_eyes: