#Create a custom model with custom data
32 messages · Page 1 of 1 (latest)
Hard to advise on this without more details
Do you understand what the GPT API does?
Basic questions here are: Do you want a summary of all the products combined? Certain subsets of the entire set of products? A summary of each individual product? The solution would look very different for each of those
Yes, I've used openai api.
I want to ask like, is this product on the list and return yes or no.
I want to ask what are the chips and return all the chips in the list.
Thanks
Yeah that's something you could do with GPT for sure
Might be expensive, depending on how often you are doing this
Here's how I would do it if I were you: make up an arbitrary number of "categories" that you wish to search by. Then go through each item, and use GPT to categorize each item into your previously created categories. Save that in your database. Now, when someone asks "list all the X" (with X being a category), you can retrieve every item from your database with that category
You can additionally use GPT to prompt someone that is asking for items in a category - to determine which category they are interested in
This would mean you would make >200,000 calls to the GPT API, which would be a static cost, and then you would only pay for 1 GPT call every single time someone wants to retrieve items of the category. You could clump the calls together as well, if that helps at all.
I already have the categories for each product
Okay, then just skip to the last step.
You may want to use GPT function calling? Depends on how your implementation works
Whathever is better I'll take
You want to give GPT some sort of context like "You are determining which category the user is requesting. This is the list of categories: A, B, C, et cetera"
Add to the prompt as necessary, and do a lot of testing.
Ok, I can do that with the normal api. But there is not way or isn't it good to make a fine tuned model?
Because I tried a while ago fine tuning but no luck
Try function calling
Ok
How will be the structure.
Lets say the user asks which chips are on the list, then what should I send to chatGPT I cant send all the data because is massive
You're not using the GPT api for that. You're going to use a search algorithm
You don't need to build that yourself, it's basic functionality in almost any programming language, there's definitely a library for it if it isn't in the standard one
a "find all" sort of thing
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter this maybe?
Thanks
You need to use embeddings and some form of vector search. Without knowing the structure of the data you might also define other index structures but I would start with exploring embeddings.
If you need to iterate over a long list for search, that will be difficult
What I did is used string similarity to get the best products and send them to chatgpt to get me more acurrate