Assistant doesn't count nor search information of entries in JSON

Hello,

While testing the capabilities of Assistants in the playground, I tried uploading a simple JSON file which included basic information about 48 prestashop categories. However, after asking it to count the number of categories inside that JSON, it consistently returns an incorrect number of entries (sometimes it returns 56, others 60 others 98, etc.).

Not only this count is incorrect, but when asking the Assistant to list all categories, it, correctly, lists 48, as it is expected. Why does it list the categories correctly, but can’t count them even after toggling the code interpreter?

Another similar issue arises when telling it to search for specific information of the categories. For example, when asking it to list all categories whose names contain the word “Cables”, it incorrectly lists 2 when there should be 4 and even after telling it that there are 4, so it should search again, it still returns 2.

I can’t really upload the whole JSON, for privacy reasons, but its structure is as follows:
{
“products_count”: Number of products directly associated to the category,
“id_category”: ID of the category,
“id_parent”: ID of the parent category,
“active”: Whether the category is displayed in the shop or not,
“NAME”: Name of category,
“description”: Brief description of category,
}

When uploading a small JSON, containing under 10 categories, it appears to be able to count and search the information correctly, but the larger the JSON is, the worse it gets. Is there any way to fix this? I’ve tried tweaking the temperature and the top P but nothing seems to work.

Thank you.

1 Like

Hello, exactly the same thing happens to me.

I’m trying to understand what is said in this post since the problem is the same, in case it helps you: https://community.openai.com/t/assistant-can-not-search-the-whole-file-using-file-search/739661

According to the post and my understanding, it seems that this behavior of the assistant is normal and that the solution for structured data types is implement function-calling.