Integrating Synonyms with Datastore Agent for Enhanced Retrieval

Hello Community,

I am currently working with a datastore agent that retrieves information from a primary website and its numerous branches. I’ve encountered an issue where users input abbreviations that the system does not recognize because they aren't predefined as synonyms on the website.

To address this, I've defined these synonyms within entities and created intents that include trained phrases linked to these entities. However, I’m struggling to configure the datastore agent to recognize these synonyms based on the intents. I understand that generators might be used in this context, but I haven't been able to figure out how to link generators with the datastore agent in my setup.

Has anyone encountered a similar challenge or does anyone have insights on how to effectively integrate synonym recognition with a datastore agent? Any advice or suggestions would be greatly appreciated.

Thank you in advance for your help!

3 3 155
3 REPLIES 3

to achieve that, you can retrieve data from your data store using a webhook instead, in that webhook you can apply all those synonyms rules.

You can also use a Generative Playbook to address that.

Best,

Xavi

Thank you for the response @xavidop . Considering there are hundreds of web pages involved, implementing a webhook seemed challenging to me because of the scale. However, I'm interested in the idea of using a Generative Playbook. Could you perhaps share some insights on how to incorporate the synonym logic within a Google Playbook?

in a generative playbook, you can just add something like:

- if the user says AAAAA, please transform it to BBBBB

for the webhook, it is just a prompt + data store, you can use langchain and set data store: https://python.langchain.com/docs/integrations/retrievers/google_vertex_ai_search/

should be pretty easy too.

Best,

Xavi