Ecommerce product catalog search embeddings problem with price

Hi,
I’m trying to create an ecommerce product catalogue search using OpenAi Embeddings.
For each product I’m creating an embedding with the product data
{ “description”: “samsung zflip 512gb”, “price”: “$200”}
Then I’m storing all the embeddings/vectors in mongodb atlas vector database.
Then for the search prompt “show me products under $300” I’m converting this prompt again to embedding vector and executing vector database search using MongoDb Atlas.
The problem is that it displays products that have price higher than 300 in the first place…
How is it possible to debug where the problem is?
Thanks in advance.

1 Like

Embeddings can’t perform any sort of calculations. You should be using a typical database for these types of objects.

A quick understanding

Is your data unstructured? Use embeddings
Is your data structured? Use a relational database

1 Like