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

Assistance Required for Enhancing Feedback Sub-Agent Integration in Chatbot

Dear GCP Team,
We are currently working on a project involving the creation of a chatbot using the @Agent Builder. Our architecture includes a main agent and several sub-agents, with seamless coordination between them. As part of this project, we have implemented a sub-agent specifically designed to collect user feedback (referred to as the "Feedback" sub-agent)

The Feedback sub-agent is triggered when users use phrases like "thanks," "thank you," or "bye." It then presents a set of feedback questions such as:
1. How would you rate your experience with the bot on a scale of 0–10?
2. Follow-up questions based on the user's rating. When tested in isolation, the sub-agent functions perfectly. However, after integrating it into the main playbook, we encountered an issue: when users trigger the Feedback sub-agent (e.g., by saying "thank you"), the bot also greets them back, which is unintended behavior.

We would greatly appreciate your guidance on the following:
1. Resolving the unintended behavior: How can we ensure that the Feedback sub-agent collects feedback without invoking greetings or other conflicting responses from the main agent or other sub-agents?
2. Storing feedback data: What is the best practice for saving the user's rating and feedback in a structured format (e.g., a database, JSON, or CSV)?

Solved Solved
0 1 106
1 ACCEPTED SOLUTION

Hi @Omkar11,

Welcome to Google Cloud Community!

It seems that your main agent is still processing the user's "thank you" intent even after the Feedback sub-agent is triggered. This is likely causing the unintended greeting response. 

Here are some potential solutions to prevent the main agent from interfering with the Feedback sub-agent:

1. Intent Prioritization:

  • Agent Builder Configuration: Ensure that the Feedback intent has a higher priority than the greeting intent. This will make the Feedback sub-agent take precedence when triggered.
  • Context Management: Use context management to signal to the main agent that the Feedback sub-agent is active. The main agent can then suppress its default responses.

2. Early Termination:

  • Agent Builder Configuration: Configure the Feedback sub-agent to terminate the conversation early after collecting feedback. This will prevent the main agent from processing further user inputs.

3. Conditional Responses:

  • Agent Builder Logic: Use conditional responses to determine whether the main agent should respond based on the current context. If the Feedback sub-agent is active, the main agent can be instructed to remain silent.

Here are the several options for storing user feedback:

1. Dialogflow CX Built-in Features:

  • Webhooks: Use webhooks to send feedback data to an external system, such as a database or analytics tool.
  • Logging: Enable detailed logging to capture user interactions and feedback. You can then analyze these logs to gain insights into user behavior and satisfaction. You can check this article/blog that covers Dialogflow CX response logging which could be helpful for you.

2. External Databases:

  • Relational Databases: Use a relational database like PostgreSQL or MySQL to store structured feedback data.
  • NoSQL Databases: Use a NoSQL database like MongoDB or Firebase to store semi-structured or unstructured feedback data.

3. Cloud Storage:

  • Google Cloud Storage: Store feedback data as JSON or CSV files in Google Cloud Storage for easy access and analysis.

Additional Considerations:

  • User Privacy: Ensure that you handle user feedback data in compliance with relevant privacy regulations (e.g., GDPR, CCPA).
  • Data Security: Implement appropriate security measures to protect user data, such as encryption and access controls.
  • Data Analysis: Use data analysis techniques to extract valuable insights from user feedback. This can help you improve your chatbot's performance and user experience.

You can also check this document that allows developers to create chat experiences using natural language instructions and structured data.

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.

View solution in original post

1 REPLY 1

Hi @Omkar11,

Welcome to Google Cloud Community!

It seems that your main agent is still processing the user's "thank you" intent even after the Feedback sub-agent is triggered. This is likely causing the unintended greeting response. 

Here are some potential solutions to prevent the main agent from interfering with the Feedback sub-agent:

1. Intent Prioritization:

  • Agent Builder Configuration: Ensure that the Feedback intent has a higher priority than the greeting intent. This will make the Feedback sub-agent take precedence when triggered.
  • Context Management: Use context management to signal to the main agent that the Feedback sub-agent is active. The main agent can then suppress its default responses.

2. Early Termination:

  • Agent Builder Configuration: Configure the Feedback sub-agent to terminate the conversation early after collecting feedback. This will prevent the main agent from processing further user inputs.

3. Conditional Responses:

  • Agent Builder Logic: Use conditional responses to determine whether the main agent should respond based on the current context. If the Feedback sub-agent is active, the main agent can be instructed to remain silent.

Here are the several options for storing user feedback:

1. Dialogflow CX Built-in Features:

  • Webhooks: Use webhooks to send feedback data to an external system, such as a database or analytics tool.
  • Logging: Enable detailed logging to capture user interactions and feedback. You can then analyze these logs to gain insights into user behavior and satisfaction. You can check this article/blog that covers Dialogflow CX response logging which could be helpful for you.

2. External Databases:

  • Relational Databases: Use a relational database like PostgreSQL or MySQL to store structured feedback data.
  • NoSQL Databases: Use a NoSQL database like MongoDB or Firebase to store semi-structured or unstructured feedback data.

3. Cloud Storage:

  • Google Cloud Storage: Store feedback data as JSON or CSV files in Google Cloud Storage for easy access and analysis.

Additional Considerations:

  • User Privacy: Ensure that you handle user feedback data in compliance with relevant privacy regulations (e.g., GDPR, CCPA).
  • Data Security: Implement appropriate security measures to protect user data, such as encryption and access controls.
  • Data Analysis: Use data analysis techniques to extract valuable insights from user feedback. This can help you improve your chatbot's performance and user experience.

You can also check this document that allows developers to create chat experiences using natural language instructions and structured data.

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.