This Guidance demonstrates a prescriptive approach to gathering and storing human feedback on generative artificial intelligence (AI) applications, allowing businesses to estimate the value of their AI investments by collecting user satisfaction data. It implements a feedback collection mechanism for custom-built chatbots on AWS and Amazon Q Business chatbots. Decision-makers can easily access and visualize key performance indicators (KPIs) derived from user ratings and comments on chat responses, which provide valuable insights into the performance and effectiveness of their generative AI applications.

Please note: [Disclaimer]

Architecture Diagram

Download the architecture diagram PDF 
  • For Amazon Q Business Chatbot
  • This architecture diagram shows how to enhance observability of user interactions with an Amazon Q Business chatbot. For the custom generative AI chatbot built on AWS, open the other tab.

  • For Custom Chatbot
  • This architecture diagram shows how to enhance observability of user interactions with a custom generative AI chatbot built on AWS. For the Amazon Q Business chatbot, open the other tab.

Well-Architected Pillars

The AWS Well-Architected Framework helps you understand the pros and cons of the decisions you make when building systems in the cloud. The six pillars of the Framework allow you to learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems. Using the AWS Well-Architected Tool, available at no charge in the AWS Management Console, you can review your workloads against these best practices by answering a set of questions for each pillar.

The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.

  • Lambda functions process and handle incoming requests and events, enabling operational excellence through serverless computing. EventBridge seamlessly routes feedback data emitted by Amazon Q, while API Gateway serves as the secure entry point, minimizing operational overhead. AWS handles provisioning, scaling, and maintenance, allowing you to focus on application logic. This reduces operational burden and ensures efficient, reliable operations.

    Read the Operational Excellence whitepaper 
  • Sensitive user feedback data is securely stored in Amazon S3, with encryption managed by AWS KMS. Access control is implemented through API Gateway's custom authorizers, providing a secure entry point. This comprehensive approach to data protection, access control, and secure communication safeguards customer information and application integrity.

    Read the Security whitepaper 
  • This Guidance uses AWS Cloud Development Kit (AWS CDK), which enables infrastructure as code deployment and promotes consistent, repeatable deployments that reduce the risk of human error.

    Serverless Lambda functions handle data processing and business logic with serverless components that automatically scale and recover from failures transparently, ensuring a reliable posture. The services in this Guidance contribute to reliability by providing fault tolerance, scalability, and automated recovery.

    Read the Reliability whitepaper 
  • EventBridge ingests events from Amazon Simple Queue Service (Amazon SQS), while API Gateway ingests feedback events from custom AI chatbots. EventBridge can process and deliver high volumes of events with low latency, and API Gateway is a scalable, high-performance API management service. These services can handle varying workloads and traffic without compromising performance.

    Read the Performance Efficiency whitepaper 
  • Amazon S3 provides cost-effective data storage and charges only for the amount of data stored. Lambda avoids idle compute costs by automatically scaling and charging only for execution duration. Athena enables ad-hoc SQL querying of data stored in Amazon S3 without provisioning dedicated infrastructure, so that you pay only for queries executed.

    Read the Cost Optimization whitepaper 
  • Serverless services like Lambda and API Gateway enhance sustainability by automatically scaling up and down based on demand. When there are no events to process, these components remain idle, optimizing resource usage and minimizing wasted resources. This approach reduces the environmental impact of the Guidance to its effective usage, aligning with sustainable practices.

    Read the Sustainability whitepaper 

Implementation Resources

A detailed guide is provided to experiment and use within your AWS account. Each stage of building the Guidance, including deployment, usage, and cleanup, is examined to prepare it for deployment.

The sample code is a starting point. It is industry validated, prescriptive but not definitive, and a peek under the hood to help you begin.

[Content Type]


This [blog post/e-book/Guidance/sample code] demonstrates how [insert short description].


The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.

References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.

Was this page helpful?