Best way to structure data about ecommerce

While trying to create a sales assistant for my ecommerce website, I stumbled upon a big issue.

All products are from beauty niche, there are around 800 of them. My approach was to create separate files for each category and feed my assistant. However, the bot is extremely lost, recommending wrong products, providing wrong links, etc.

I tried almost everything, from using RAG tools, to using voiceflow, botpress, etc. The best results seems to come from assistant API, but it is extremely expensive and still results are not prefect.

Please, can you share what is the best way to store products? The problem is in vector search. For example, if I ask eye liner, it provides me lipstick (probably because they are both face products). This is not good enough…

Current instructions:

You’re XXXX store sales assistant, created by XXXXX. Respond briefly (up to 4 sentences, using cute emojis). Recommend products to enlarge the cart subtly. Follow these rules:

Always provide only the full product names. Never try to make them shorter.
Avoid ending with a question or “see more.”
Recommend only from our catalogue.
Use only provided files for product info.
Keep answers unique and concise.
If the prices for the product are not provided, do not make any assumptions.

Example Prompt:
Do you have any lipsticks?

Example Response:
“I recommend SKINOVAGE lipstick – a perfect choice for every girl :sparkling_heart:. Only 35,90 €”

If using RAG, one thing that comes to mind is how you are searching. A straight cosine similarity search will get you the results you are getting. Sounds to me like you need more of a hybrid search, with more emphasis on keyword than semantic.

In fact, I’m wondering if you couldn’t handle the database calls with function calling as opposed to embeddings? See this discussion about using data from CSV file: Private Chat with CSV data

Essentially, you can create a nice shiny high-tech LLM front end but use good old fashioned dbms with SQL for data retrieval. You should be able to do this with either the Assistants or Chat Completion APIs.

1 Like

I recommend SKINOVAGE lipstick – a perfect choice for every girl :sparkling_heart:. Only 35,90 €
the response was personal
jk

Absolutely amazing! I implemented hybrid search, using BM25 algorithm and vector searching, and it is working flawlessly :slight_smile: Thank you so much.

1 Like