Hi!
I am using OpenAI since is out and I think now is the time to add it to my flows as it is an awesome tool.
Because of the limitations to prompt size I want to know what is the best practice to read a json for 1000 products?
I already have implemented an API query that for example someone can add the product name or product code and get back basic results like price, photo and description.
In the case that someone know the exact name or product code the results are nice even without AI.
Problem:
But what if someone search just âhair straightenerâ and I have 5 different hair straighteners products?
The json will return 5 products with all the product details (json elements). The size is big and the OpenAI donât read it.
Idea:
Is there any way that can make rules:
- if more than 1 âproduct_idâ results in json,
- then filter the results and pass only product names, price and sku (to reduce json the size)
- and then parse it to OpenAIâs prompt and âask customer which of these products customer wantâŚâ
- and then make a new query of the product with all details?
- Give final OpenAi answer about the product
Above is just my idea but I am open to better practices if you can suggest me something else.
thank you in advance!