So I’m making a chat assistant for a client where end users can ask about thousands - millions of products. The data I’m sourcing is from an external api returned as JSON.
The two options I’ve kinda come up with are as follows:
- Use assistants API and function calling.
-
For example if the user asks about a certain category of products, then a function would be called to retrieve the data relevant to the requested category. Then the data would be added as a file to open ai, then attached to the assistant for retrieval.
-
For seen problems: cleaning up of unused files and token count.
- Using embeddings to do search and retrieve information.
- Essentially I would load all the data onto a vector db and retrieve it as needed based off of user prompts.
-For seen problems: from what I’ve read, semantic searches aren’t great with JSON data, so I’m worried about accuracy with it.
I’m leaning towards option one and that’s probably what I’ll do if I don’t get a response back haha.
But anyways, what would you recommend in this situation. Or if theres a better way of going about it that I haven’t even thought about, pleas let me know! Thanks.