AWS Machine Learning Blog 05月14日 23:20
Build a financial research assistant using Amazon Q Business and Amazon QuickSight for generative AI–powered insights
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了如何利用Amazon Q Business与QuickSight的集成,构建一个由生成式AI驱动的金融研究助手。该助手能够处理结构化和非结构化数据,如股票价格、行业报告和公司财务报表,为金融分析师提供快速、一致的投资建议。通过自然语言查询,分析师可以即时生成投资组合可视化、风险评估和可操作的建议,将分析时间从数小时缩短到数分钟,从而提高决策效率和把握投资机会。

💡Amazon Q Business是一款由生成式AI驱动的对话助手,旨在帮助企业更好地利用其企业数据,解决传统上非结构化数据(如PDF、HTML页面和文档)与结构化数据(如数据库、数据湖和实时报告)之间的数据孤岛问题。

🔗Amazon Q Business集成了QuickSight,使得结构化数据源能够连接到Amazon Q Business应用程序,为最终用户提供统一的对话体验。QuickSight提供了超过20个结构化数据源连接器,包括Amazon S3、Amazon Redshift等。

📊通过Amazon Q Business和QuickSight构建的金融研究助手,可以自动处理股票价格等结构化数据,以及新闻和季度报表中的非结构化数据,通过自然语言查询生成投资组合可视化、风险评估和可操作的建议,从而大大缩短分析时间。

According to a Gartner survey in 2024, 58% of finance functions have adopted generative AI, marking a significant rise in adoption. Among these, four primary use cases have emerged as especially prominent: intelligent process automation, anomaly detection, analytics, and operational assistance.

In this post, we show you how Amazon Q Business can help augment your generative AI needs in all the abovementioned use cases and more by answering questions, providing summaries, generating content, and securely completing tasks based on data and information in your enterprise systems.

Amazon Q Business is a generative AI–powered conversational assistant that helps organizations make better use of their enterprise data. Traditionally, businesses face a challenge. Their information is split between two types of data: unstructured data (such as PDFs, HTML pages, and documents) and structured data (such as databases, data lakes, and real-time reports). Different types of data typically require different tools to access them. Documents require standard search tools, and structured data needs business intelligence (BI) tools such as Amazon QuickSight.

To bridge this gap, Amazon Q Business provides a comprehensive solution that addresses the longstanding challenge of siloed enterprise data. Organizations often struggle with fragmented information split between unstructured content—such as PDFs, HTML pages, and documents—and structured data stored in databases, data lakes, or real-time reports. Traditionally, these data types require separate tools: standard search functionalities for documents, and business intelligence (BI) tools like Amazon QuickSight for structured content. Amazon Q Business excels at handling unstructured data through more than 40 prebuilt connectors that integrate with platforms like Confluence, SharePoint, and Amazon Simple Storage Service (Amazon S3)—enabling businesses to consolidate and interact with enterprise knowledge through a single, conversational interface. Amazon QuickSight is a comprehensive Business Intelligence (BI) environment that offers a range of advanced features for data analysis and visualization. It combines interactive dashboards, natural language query capabilities, pixel-perfect reporting, machine learning (ML)–driven insights, and scalable embedded analytics in a single, unified service.

On December 3, 2024, Amazon Q Business announced the launch of its integration with QuickSight. With this integration, structured data sources can now be connected to Amazon Q Business applications, enabling a unified conversational experience for end users. QuickSight integration offers an extensive set of over 20 structured data source connectors, including Amazon S3, Amazon Redshift, Amazon Relational Database (Amazon RDS) for PostgreSQL, Amazon RDS for MySQL, and Amazon RDS for Oracle. This integration enables Amazon Q Business assistants to expand the conversational scope to cover a broader range of enterprise knowledge sources.

For end users, answers are returned in real time from your structured sources and combined with other relevant information found in unstructured repositories. Amazon Q Business uses the analytics and advanced visualization engine in QuickSight to generate accurate answers from structured sources.

Solution overview

In this post, we take a common scenario where a FinTech organization called AnyCompany  has financial analysts who spend 15–20 hours per week manually aggregating data from multiple sources (such as portfolio statements, industry reports, earnings calls, and financial news) to derive client portfolio insights and generate recommendations. This manual process can lead to delayed decision-making, inconsistent analysis, and missed investment opportunities.

For this use case, we show you how to build a generative AI–powered financial research assistant using Amazon Q Business and QuickSight that automatically processes both structured data such as stock prices and trend data and unstructured data such as industry insights from news and quarterly statements. Advisors can use the assistant to instantly generate portfolio visualizations, risk assessments, and actionable recommendations through straightforward natural language queries, reducing analysis time from hours to minutes while maintaining consistent, data-driven investment decisions.

This solution uses both unstructured and structured data. For the unstructured data, it uses publicly available annual financial reports filed with the Securities and Exchange Commission (SEC) for the leading technology companies in the S&P 500 index. The structured data comes from stock price trend information obtained through the Alpha Vantage API. This solution uses Amazon Q Business, a generative AI conversational assistant. With the integration of QuickSight, we can build a financial assistant that can summarize insights, answer industry data–related questions, and generate charts and visuals from both structured and unstructured data.

The following figure shows how Amazon Q Business can use both unstructured and structured data sources to answer questions.

Prerequisites

To perform the solution in this walkthrough, you need to have the following resources:

These components help to verify the proper functionality of the Amazon Q Business and QuickSight integration while maintaining secure access and data management capabilities.

Considerations

Amazon QuickSight and Amazon Q Business must exist in the same AWS account. Cross account calls aren’t supported at the time of writing this blog.

Amazon QuickSight and Amazon Q Business accounts must exist in the same AWS Region. Cross-Region calls aren’t supported at the time of writing this blog.

Amazon QuickSight and Amazon Q Business accounts that are integrated need to use the same identity methods.

IAM Identity Center setup is required for accessing AWS managed applications such as Amazon Q Business and helps in streamlining access for users.

Create users and groups in IAM Identity Center

To create users:

    On the IAM Identity Center console, if you haven’t enabled IAM Identity Center, choose Enable. If there’s a pop-up, choose how you want to enable IAM Identity Center. For this walkthrough, select Enable with AWS Organizations and choose Continue.
    On the IAM Identity Center dashboard, in the navigation pane, choose Users. Choose Add user. Enter the user details for John-Doe, as shown in the following screenshot:
      Username: john_doe_admin Email address: john_doe_admin@gmail.com. Use or create a real email address for each user to use in a later step. First name: John Last name: Doe Display name: John Doe
    Skip the optional fields and choose Next to create the user. On the Add user to groups page, choose Next and then choose Add user. Follow the same steps to create other users for your Amazon Q Business application. Similarly, create user groups like Admin, User, Author, Author_Pro for Amazon Q Business and QuickSight, as shown in the  following screenshot. Add the appropriate users into your user groups.

Create an Amazon Q Business application

To use this feature, you need to have an Amazon Q Business application. If you don’t have an existing application, follow the steps in Discover insights from Amazon S3 with Amazon Q S3 connector to create a Amazon Q Business application with an Amazon S3 data source. Upload the unstructured document(s) to Amazon S3 and sync the data source. The steps outlined below are required to create the Amazon Q Business application and are detailed in the above referenced blog post.

This image is a screenshot of the setup page for the Amazon Q Business application.

In this step, you create an Amazon Q Business application that powers the conversation web experience:

    On the Amazon Q Business console, in the Region list, choose US East (N. Virginia). On the Getting started page, select Enable identity-aware sessions. When it’s enabled, a notification that Amazon Q is connected to IAM Identity Center should be displayed. Choose Subscribe in Q Business. On the Amazon Q Business console, choose Get started. On the Applications page, choose Create application. On the Create application page, enter Application name and leave everything else with default values. Choose Create, as shown in the following screenshot.
    Navigate to your data sources and select Add an index, as shown in the following screenshot. We named our index Yearly-Financial-Statements.

The index creation process may take a few minutes to complete.

    Meanwhile, create an S3 bucket and add the PDF files. The following images illustrate the S3 bucket creation process. We followed the same steps outlined in the blog post Discover insights from Amazon S3 with Amazon Q S3 connector, and the screenshots below reflect that process.

The following screenshot shows the PDF files we added to our S3 bucket. We added the PDF files of the yearly filings of the top 12 tech companies obtained from the SEC filing website.

    After you’ve added your data to the S3 bucket, go back to the Amazon Q Business application named Market-Bot. Select Add Data Sources and choose S3, and complete the configuration steps. This process is illustrated in the screenshot below.

As part of the configuration, make sure to set the Sync mode to “New, modified, or deleted content sync” and the Sync run schedule to “Run On-Demand.

After adding the data sources, choose Sync now to initiate the synchronization process, as shown in the following screenshot.

Create a QuickSight account and topic

You can skip this section if you already have an existing QuickSight account. To create a QuickSight account, complete the following steps. Query structured data from Amazon Q Business using Amazon QuickSight provides more in-depth steps you can follow to set up the QuickSight account.

    On the Amazon Q Business console, in the navigation pane of your application, choose Amazon QuickSight. Choose Create QuickSight account, as shown in the following screenshot.
    Under QuickSight account information, enter your account name and an email for account notifications. Under Assign QuickSight Admin Pro users, choose the IAM Identity Center group you created as a prerequisite. The following screenshot shows Admin has been selected. A user becomes a QuickSight Admin by being added to an IAM Identity Center group mapped to the QuickSight Admin Pro role during integration setup. (The admin must configure datasets, topics, and permissions within QuickSight for proper functionality of Amazon Q Business features.) Choose Next.
    Under Service access, select Create and use a new service role. Choose Authorize, as shown in the following screenshot.

This will create a QuickSight account, assign the IAM Identity Center group as QuickSight Admin Pro, and authorize Amazon Q Business to access QuickSight.

You can now proceed to the next section to prepare your data.

Configure an existing QuickSight account

You can skip this section if you followed the previous steps and created a new QuickSight account.

If your current QuickSight account isn’t on IAM Identity Center, consider using a different AWS account without a QuickSight subscription to test this feature. From that account, you create an Amazon Q Business application on IAM Identity Center and go through the QuickSight integration setup on the Amazon Q Business console that will create the QuickSight account for you in IAM Identity Center.

Add data in QuickSight

In this section, you create an Amazon S3 data source. You can instead create a data source from the database of your choice or perform a direct upload of .csv files and connect to it. Refer to Creating a dataset from a database for more details.

To configure your data, complete the following steps:

    Sign in to your QuickSight account with the admin credentials. When you sign in as the admin, you have access to both the Amazon Q Business and QuickSight application.
    Select the QuickSight application to add your data to the QuickSight index.
    On the QuickSight console, in the navigation pane, choose Datasets.
    Under Create a Dataset, select Upload a file, as shown in the following screenshot.

We are uploading a CSV file containing stock price data for the top 10 S&P technology companies, as illustrated in the image below.

    Generate topics from your dataset and to do this, select your dataset, click the Topics tab in the navigation menu on the left, and then choose Create new topic.

Creating a topic from a dataset in Amazon QuickSight enables natural language exploration (such as Q&A) and optimizes data for AI-driven insights. Topics act as structured collections of datasets tailored for Amazon Q, giving business users the flexibility to ask questions in plain language (for example, “Show sales by region last quarter”). Without a topic, Amazon Q can’t interpret unstructured queries or map them to relevant data fields. For more information, refer to Working with Amazon QuickSight Q topics.

Integrate Amazon Q Business with QuickSight

We must also enable access for QuickSight to use Q Business. The following screenshots detail the configuration steps.

    Click the user profile icon in the top-right corner of the QuickSight console, then choose Manage QuickSight.
    Under Security and permissions, give access to Amazon Q Business application by selecting the Amazon Q Business application you created.
    Open your Amazon Q Business application and in the navigation pane, choose Amazon QuickSight. To enable your application to access QuickSight topic data, choose Authorize Amazon Q Business.
    You should now be able to observe the datasets and topics available to Amazon Q for answering queries using your Amazon Q Business application.

We have successfully established integration between Amazon Q Business and QuickSight, enabling us to begin interacting with the Q Business application through the web experience interface.

Query your Amazon Q Business application

To start chatting with Amazon Q Business, complete the following steps:

    On the Amazon Q Business console, choose your Amazon Q Business application. Choose the link under the deployed URL.

The examples below demonstrate user interactions with Amazon Q Business through its integration with Amazon QuickSight. Each example includes the user’s query and Q Business’s corresponding response, showcasing the functionality and capabilities of this integration.

Prompt:
Can you give me an overview of Amazon's financial performance for the most recent quarter? Include key metrics like revenue, income, and expenses.

The next screenshot shows the following prompt with the response.

Prompt:
How was AMZN’s stock price performed compared to its peers like GOOGL and TSM in 2024?

The next screenshot shows the response to the following prompt.

Prompt:
Summarize Amazon's key financial metrics for Q3 2024, such as revenue, net income, and operating expenses. Also, show a line chart of AMZN's stock price trend during the quarter.

The next screenshot shows the following prompt with the response.

Prompt:
What were Amazon’s fulfillment and marketing expenses in Q3 2024?

The next screenshot shows the following prompt with the response.

Prompt:
How did AMZN’s stock price react after its Q3 2024 earnings release?

Cleanup

To avoid incurring future charges for resources created as part of this walkthrough, follow these cleanup steps:

    Deactivate Amazon Q Business Pro subscriptions:
      Verify all users have stopped accessing the service Unsubscribe from the Amazon Q Business Pro subscriptions if the application is no longer in use. Remove Amazon Q Business resources: Delete the Amazon Q Business application. This automatically removes associated Amazon Q Business indexes. Confirm deletion on the AWS Management Console
    Clean up QuickSight resources:
      Delete QuickSight topics to prevent ongoing index costs Verify removal of associated datasets if they’re no longer needed Monitor AWS billing to make sure charges have stopped

Conclusion

In this post, we demonstrated how financial analysts can revolutionize their workflow by integrating Amazon Q Business with QuickSight, bridging the gap between structured and unstructured data silos. Financial analysts can now access everything from real-time stock prices to detailed financial statements through a single Amazon Q Business application. This unified solution transforms hours of manual data aggregation into instant insights using natural language queries while maintaining robust security and permissions. The combination of Amazon Q Business and QuickSight empowers analysts to focus on high-value activities rather than manual data gathering and insight generation tasks.

To learn more about the feature described in this use case and learn about the new capabilities Amazon Q in QuickSight provides, refer to Using the QuickSight plugin to get insights from structured data.

Check out the other new exciting Amazon Q Business features and use cases in Amazon Q blogs.

To learn more about Amazon Q Business, refer to the Amazon Q Business User Guide.

To learn more about configuring a QuickSight dataset, refer to Manage your Amazon QuickSight datasets more efficiently with the new user interface.

Check out the other new exciting Amazon Q in QuickSight feature launches in Revolutionizing business intelligence: Amazon Q in QuickSight introduces powerful new capabilities.

QuickSight also offers querying unstructured data. For more details, refer to Integrate unstructured data into Amazon QuickSight using Amazon Q Business.


About the Authors

Vishnu Elangovan is a Worldwide Generative AI Solution Architect with over seven years of experience in Applied AI/ML. He holds a master’s degree in Data Science and specializes in building scalable artificial intelligence solutions. He loves building and tinkering with scalable AI/ML solutions and considers himself a lifelong learner. Outside his professional pursuits, he enjoys traveling, participating in sports, and exploring new problems to solve.

Keerthi Konjety is a Specialist Solutions Architect for Amazon Q Developer, with over 3.5 years of experience in Data Engineering, ML and AI. Her expertise lies in enabling developer productivity for AWS customers. Outside work, she enjoys photography and tech content creation.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Amazon Q Business QuickSight 生成式AI 金融分析
相关文章