I’m trying with the AI agent with the google sheets as tools but it retrieves the wrong dates and only compare outputs randomly even if i described in detail in the prompts how it should compare.
I don’t know how to get reliable comparisons.
Should I store the output in a vector DB to get more consistent results and if so how?
Should I use an AI agent or create an AI workflow?
How would you approach it?
ps: it would be cool to highlight significant differences in the text too
Hi there, from what i see here, what you are doing is not comparing it semantically, in order for a text to be compared semantically they first need to be embedded into vectors and then to compare them, you use something like this
You calculate the similarity between the two vectors.
Thank you so much for the detailed answer Fahmi.
But I wanted to ask if you think it would perform better if I create directly a Vector database to have a more solid knowledge base to compare output or for this usecase is better to just do cosine similarity on the go?
the choice only depends if you want to persist the data later on or no
if you want to persist the data then you use a database for that, if not then you dont need to store it in db
n usually when you store the data in the vector db, you’re just not storing the vectors, but also the metadata to identify it like the docs name, docs ids, etc.
which i dont think you need in the workflow that you want to achieved, because what you want to achieve is just comparing 2 things that you already know from where to get