Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Summarize and get response from data store

Hi,

I have a HR support chatbot, it answer questions using Data Store.
If user input more than 256 characters I made summarization and fit to 256 characters using Generators (Gemini 1.0 Pro), it summarize successfully. I want to make query using summarized input I don't know how to trigger Data Store query after summarization. Can you help?

Thanks.

0 1 131
1 REPLY 1

Hi @oozturkplus,

Welcome to Google Cloud Community!

To use the summarized input from your Gemini 1.0 Pro generator to query your Data Store, you'll need to integrate the generator's output into your Dialogflow CX agent's fulfillment. The exact implementation depends on how your Data Store is accessed within the fulfillment. Here's a general approach:

  • Generator Output: Ensure your Gemini 1.0 Pro generator in Dialogflow CX is configured to output the summarized text into a context variable or parameter. This variable will hold the summarized user input, ready for the next step. Let's call this variable summarized_query .
  • Conditional Logic (if using a webhook): If you are using a webhook, your webhook code needs to check if the summarized_query parameter exists. If it does (implying summarization was necessary), it should use this variable to construct the Data Store query instead of the original user input.
  • Inline Fulfillment (if using inline fulfillment): If using inline fulfillment within Dialogflow CX, you will need to use the Dialogflow CX built-in functions to extract the summarized_query parameter and construct the Data Store query dynamically. The specifics of this will depend on your Data Store connector and the exact functions available.
  • Data Store Query: Once you have the summarized_query in your webhook or inline fulfillment, use your existing code or API calls to query the Data Store using the summarized query as input.
  • Response Handling: After retrieving results from the Data Store, structure the response appropriately for Dialogflow CX to return to the user.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.