AWS Machine Learning Blog

Build a financial research assistant using HAQM Q Business and HAQM QuickSight for generative AI–powered insights

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 HAQM 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.

HAQM 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 HAQM QuickSight.

To bridge this gap, HAQM 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 HAQM QuickSight for structured content. HAQM Q Business excels at handling unstructured data through more than 40 prebuilt connectors that integrate with platforms like Confluence, SharePoint, and HAQM Simple Storage Service (HAQM S3)—enabling businesses to consolidate and interact with enterprise knowledge through a single, conversational interface. HAQM 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, HAQM Q Business announced the launch of its integration with QuickSight. With this integration, structured data sources can now be connected to HAQM 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 HAQM S3, HAQM Redshift, HAQM Relational Database (HAQM RDS) for PostgreSQL, HAQM RDS for MySQL, and HAQM RDS for Oracle. This integration enables HAQM 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. HAQM 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 HAQM 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 HAQM 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 HAQM 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:

  • An active AWS account to access HAQM Q Business and QuickSight features.
  • AWS IAM Identity Center must be configured in your preferred Region. For this walkthrough, we used US East (N. Virginia). For more information, refer to Configure HAQM Q Business with AWS IAM Identity Center trusted identity propagation.
  • The necessary users and groups for HAQM Q Business and QuickSight access with at least one HAQM Q Business Pro user with administrative privileges. Users or groups can also be sourced from an identity provider (IdP) integrated with IAM Identity Center.
  • An IAM Identity Center group designated for QuickSight Admin Pro role for users who will manage and configure QuickSight.
  • QuickSight must be configured in the same AWS account and Region as HAQM Q Business.
  • If a QuickSight account exists, it needs to be in the same AWS account and AWS Region as HAQM Q Business, and it needs to be configured with IAM Identity Center.
  • Ability to upload data using .csv or .xls files. An alternative is using an accessible database that QuickSight can connect to. The database must have proper permissions for table creation and data insertion.
  • Sample structured and unstructured data ready for import.

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

Considerations

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

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

HAQM QuickSight and HAQM 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 HAQM Q Business and helps in streamlining access for users.

Create users and groups in IAM Identity Center

To create users:

  1. 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.
  2. On the IAM Identity Center dashboard, in the navigation pane, choose Users.
  3. Choose Add user.
  4. Enter the user details for John-Doe, as shown in the following screenshot:
    1. Username: john_doe_admin
    2. Email address: john_doe_admin@gmail.com. Use or create a real email address for each user to use in a later step.
    3. First name: John
    4. Last name: Doe
    5. Display name: John Doe
  5. Skip the optional fields and choose Next to create the user.
  6. On the Add user to groups page, choose Next and then choose Add user. Follow the same steps to create other users for your HAQM Q Business application.
  7. Similarly, create user groups like Admin, User, Author, Author_Pro for HAQM Q Business and QuickSight, as shown in the  following screenshot. Add the appropriate users into your user groups.

Create an HAQM Q Business application

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

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

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

  1. On the HAQM Q Business console, in the Region list, choose US East (N. Virginia).
  2. On the Getting started page, select Enable identity-aware sessions. When it’s enabled, a notification that HAQM Q is connected to IAM Identity Center should be displayed. Choose Subscribe in Q Business.
  3. On the HAQM Q Business console, choose Get started.
  4. On the Applications page, choose Create application. On the Create application page, enter Application name and leave everything else with default values.
  5. Choose Create, as shown in the following screenshot.
  6. 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.

  1. 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 HAQM S3 with HAQM 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.

  1. After you’ve added your data to the S3 bucket, go back to the HAQM 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 HAQM Q Business using HAQM QuickSight provides more in-depth steps you can follow to set up the QuickSight account.

  1. On the HAQM Q Business console, in the navigation pane of your application, choose HAQM QuickSight.
  2. Choose Create QuickSight account, as shown in the following screenshot.
  3. Under QuickSight account information, enter your account name and an email for account notifications.
  4. 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 HAQM Q Business features.)
  5. Choose Next.
  6. Under Service access, select Create and use a new service role.
  7. 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 HAQM 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 HAQM Q Business application on IAM Identity Center and go through the QuickSight integration setup on the HAQM 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 HAQM 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:

  1. Sign in to your QuickSight account with the admin credentials. When you sign in as the admin, you have access to both the HAQM Q Business and QuickSight application.
  2. Select the QuickSight application to add your data to the QuickSight index.
  3. On the QuickSight console, in the navigation pane, choose Datasets.
  4. 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.

  1. 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 HAQM 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 HAQM Q, giving business users the flexibility to ask questions in plain language (for example, “Show sales by region last quarter”). Without a topic, HAQM Q can’t interpret unstructured queries or map them to relevant data fields. For more information, refer to Working with HAQM QuickSight Q topics.

Integrate HAQM Q Business with QuickSight

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

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

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

Query your HAQM Q Business application

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

  1. On the HAQM Q Business console, choose your HAQM Q Business application.
  2. Choose the link under the deployed URL.

The examples below demonstrate user interactions with HAQM Q Business through its integration with HAQM 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 HAQM'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 HAQM'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 HAQM’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:

  1. Deactivate HAQM Q Business Pro subscriptions:
    • Verify all users have stopped accessing the service
    • Unsubscribe from the HAQM Q Business Pro subscriptions if the application is no longer in use.
    • Remove HAQM Q Business resources:
    • Delete the HAQM Q Business application. This automatically removes associated HAQM Q Business indexes.
    • Confirm deletion on the AWS Management Console
  2. 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 HAQM 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 HAQM 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 HAQM 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 HAQM Q in QuickSight provides, refer to Using the QuickSight plugin to get insights from structured data.

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

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

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

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

QuickSight also offers querying unstructured data. For more details, refer to Integrate unstructured data into HAQM QuickSight using HAQM 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 HAQM 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.