IBM Developer

Tutorial

Build a virtual personal finance advisor with generative AI

Take advantage of watsonx Assistant, Watson Discovery, and NeuralSeek to build a generative AI powered Virtual Personal Finance Advisor

By Saul Calderon Balan

Virtual assistants are increasingly relevant in both personal and professional settings, providing immediate, personalized, and efficient support. They enhance productivity by automating routine tasks, offering quick access to information, and streamlining processes—all of which save time and resources.

Role of virtual assistants in personal finance

In personal finance, virtual assistants can help users manage budgets, track spending, and plan for financial goals. They make financial management more accessible and less intimidating. With 24/7 availability, these assistants offer consistent support whenever needed, learning and adapting to individual preferences. This ability to deliver tailored advice and solutions is crucial in today’s world, where demand for personalized services is high. Ultimately, virtual assistants improve efficiency, convenience, and user experience across various contexts.

The value of financial literacy

As Money Vehicle highlights:

"... financial literacy is instrumental in enhancing decision-making skills. It enables individuals to weigh their options carefully, understand the potential outcomes of their financial decisions, and navigate the challenges of financial planning and investment. This competency is especially significant in a world where financial options are increasingly complex and abundant."

Financial literacy is essential for personal financial well-being, securing one’s future, and contributing to the overall prosperity of society. It is a life skill that should be nurtured and developed over time.

Building a virtual personal finance advisor is crucial in today’s fast-paced, technology-driven world. It democratizes access to personalized financial guidance, enabling individuals from all backgrounds to make informed financial decisions anytime and anywhere.

Benefits of virtual assistants for Financial Services companies

For financial services companies, a virtual personal finance advisor plays a key role in reducing debt delinquency by offering personalized, real-time guidance based on individual financial situations. These advisors also enhance users’ financial well-being by providing actionable tips and strategies for managing finances.

Companies from the financial services industry, as well as other industries, can reap significant benefits by leveraging virtual assistants, enhancing both operational efficiency and customer experience. Here are some key advantages:

  • 24/7 Customer Support: Virtual assistants provide round-the-clock service, allowing customers to get help with their financial inquiries at any time. This reduces wait times and improves customer satisfaction by offering immediate assistance outside of traditional business hours.
  • Cost Efficiency: Implementing virtual assistants can reduce operational costs associated with customer service. By handling routine inquiries and transactions, virtual assistants can free up human agents to focus on more complex issues, optimizing workforce allocation.
  • Scalability: Virtual assistants can easily scale to handle increasing volumes of customer interactions without the need for proportional increases in staff. This is particularly valuable during peak times, when customer inquiries may surge.
  • Personalized Customer Interactions: By analyzing customer data, virtual assistants can offer tailored advice and product recommendations, enhancing the personalization of services. This can lead to higher customer engagement and better satisfaction as customers feel understood and valued.
  • Improved Customer Experience: Virtual assistants can streamline the customer journey by providing quick and accurate responses, guiding users through processes like account management, loan applications, or investment inquiries. A smooth and efficient experience can lead to higher customer retention rates.
  • Reduced Human Error: Virtual assistants operate with consistent accuracy, reducing the likelihood of errors in handling customer inquiries, processing transactions, or providing information. This reliability can boost customer trust and reduce the costs associated with error correction.
  • Increased Sales Opportunities: Virtual assistants can identify and capitalize on cross-selling and upselling opportunities by analyzing customer profiles and transaction histories. By suggesting relevant financial products or services, they can drive additional revenue for the company.
  • Seamless Integration with Other Services: Virtual assistants can be integrated with other digital platforms, such as mobile apps and websites, providing a consistent and unified customer experience across multiple channels. This enhances the overall digital presence of the company.

By adopting virtual assistants, financial services companies can improve operational efficiency, enhance customer satisfaction, and drive growth, making it a strategic investment in the competitive financial landscape.

This tutorial provides a step-by-step guide to building a virtual personal finance advisor using IBM Cloud's low-code services, including watsonx Assistant, Watson Discovery, and NeuralSeek.

By using natural language understanding (NLU), watsonx Assistant interprets user requests and accesses data from a KnowledgeBase via Watson Discovery. The system then delivers human-like interactions with the help of NeuralSeek Large Language Model (LLM) capabilities.

Prerequisites

To follow this tutorial, ensure you have the following:

Estimated Time

This tutorial should take approximately 1 hour to complete.

Steps

Configuring the Watson Discovery service

  1. Log in to your IBM Cloud account and load the Watson Discovery instance from the Resource List under AI/Machine Learning.

    alt

  2. Copy your API Key and URL to a secure location for later use.

    alt

  3. Click on New project to create a collection.

    alt

    • Enter a Project name and select Conversational Search as the project type, then click Next.

      alt

    • Specify a Collection name, choose your preferred language (the language of the KnowledgeBase), and click Drag and drop files or upload to add your personal finance material (for example, budgeting or expense management best practices).

    • Once the file(s) are uploaded, click Finish.

      alt

      alt

  4. Navigate to Manage Collections from the left-hand menu.

    alt

    • Verify your collection details by clicking on the collection name created in step 3.

      alt

      alt

    • To integrate Watson Discovery with NeuralSeek, you’ll need the Watson Discovery Project ID.

      • In the left-hand menu, select Integrate and Deploy.

        alt

        • Go to the API Information tab, then click Copy to save the Project ID in a secure location.

        alt

Configuring the NeuralSeek service

  1. Log in to your IBM Cloud account and load the NeuralSeek instance from the Resource List under AI/Machine Learning.

    alt

  2. Click Launch to open the NeuralSeek tool.

    alt

  3. Configure NeuralSeek

    1. Basics

      • Enter your company or organization name.

      • Select Output language as "English" (it’s recommended that the output language matches the KnowledgeBase and question language).

      • Click Next.

        alt

    2. Data

      • As the KnowledgeBase will be configured later, click Next.

        alt

    3. Organize

      • Leave the settings unchanged, ensuring the selections match the defaults provided. Click Next.

        alt

    4. Tune

      • In the Which of these looks more like your data section, select Important phrases are surrounded by many lines of text that explain them.

      • In the Choose the option below that best describes your data requirements section, select I want to give lots of information to the LLM, and give it leeway to decide the answer. You can test the other option later to compare results.

      • In the Choose the option below that best describes your data currency section, select All my documents are current and relevant.

      • Click Next.

        alt

    5. Q&A

      • To generate Q&A content for the NeuralSeek instance, click Auto-Generate Questions.

        alt

        alt

      • Review the auto-generated questions and click Submit.

        alt

    6. Finish the Q&A Bootstrap

      • After reviewing the answers generated for the auto-generated questions, you can download the report as a CSV file by clicking Download Report.

        alt

  4. Integrate NeuralSeek with watsonx Assistant. Retrieve API key and OpenAPI file.

    • Select the Integrate tab and copy the API Key to a secure location.

      alt

      • Download the Custom Extension OpenApi File to your preferred location.

        alt

  5. Connect NeuralSeek to the KnowledgeBase. To configure KnowledgeBase connection:

    • In the Configure tab, click KnowledgeBase Connection.

      alt

    • Select Watson Discovery from the KnowledgeBase Type options.

    • Choose English (or your preferred language) under KnowledgeBase Language.

    • Paste the Watson Discovery credentials (Discovery Service URL, API Key, and Project ID) that you saved earlier.

    • Click Save.

      alt

  6. Finalize configuration.

    1. Name and save the version.

      • Enter a name and description for this version of NeuralSeek and click Save.

        alt

    2. Test NeuralSeek.

      • Go to the Seek tab and type a question in the text field (e.g., Why budgeting?), then press Enter to review the answer generated by NeuralSeek.

        alt

        alt

    3. Trace the answer source.

      • Scroll to the KnowledgeBase Context section at the bottom of the screen and click on the document name you uploaded in Watson Discovery (Step 3 of Configuring the Watson Discovery service procedure) to trace where the answer came from.

        alt

        alt

Configure watsonx Assistant and integrate with NeuralSeek

  1. In your IBM Cloud Account, load the watsonx Assistant instance from the Resource List under AI/Machine Learning.

    alt

  2. Write the name of your assistant in the Assistant name field, add a description, and select the language of your assistant.

    alt

  3. Select Web from the Where do you plan on deploying your assistant options, then click Next. The remaining questions are optional and for statistical purposes, so you can skip them.

    alt

  4. Customize the Chat UI. This step is to configure the look and feel of the Virtual Assistant chat. We will skip this step for now. Click Next, then Create, and finally Let’s go.

    alt

    alt

  5. Integrate watsonx Assistant with NeuralSeek. In the left-hand menu, scroll to the bottom and select Integrations.

    alt

  6. Go to the Extensions section and click Build custom extension.

    alt

  7. Click Next, then give your extension a name and optional description.

    alt

    alt

  8. Integrate NeuralSeek with the OpenAPI File. Drag and drop the NeuralSeek OpenAPI file saved from step 4 of the Configuring the NeuralSeek service procedure.

    alt

    alt

  9. Click Next, review the information, then click Finish.

    alt

    alt

  10. Add the NeuralSeek Extension. Find the newly created NeuralSeek custom extension and click Add +. In the dialog window, click Add.

    alt

    alt

  11. Add Credentials.

    alt

  12. Enter the NeuralSeek API key saved from from step 4 of the Configuring the NeuralSeek service procedure. Click Next, and finally click Finish.

    alt

Create a watsonx Assistant Action

  1. In the left-hand menu, select Actions.

    alt

  2. Upload the Action.

    1. Go to the Upload/Download tab.

    2. Download the ejemplo-action.json file from the Github repository.

    3. Drag and drop the ejemplo-action.json file into the interface, then click Upload.

    4. Click Upload and Replace, then click Close to finalize the action upload.

    alt

    alt

    alt

Configure the NeuralSeek Action

  1. Click on the NeuralSeek action.

    1. In the left-hand panel, click on Step 3 (highlighted in red).

    2. At the bottom of the screen, click Edit extension.

    alt

  2. Configure the NeuralSeek Extension.

    1. In the Extension field, select the NeuralSeek extension.

    2. In the Operation field, select Seek an answer from NeuralSeek.

    3. In the Parameters field, set the question to Session variables, then choose query_text.

    4. Click Optional parameters at the bottom of the dialog window.

    alt

    alt

  3. Configure the session_id parameter.

    1. Scroll to the bottom of the parameters list and locate user_session.system.session_id.

    2. Click To, select Enter text, and input any number. For this case, enter 10002, then click Apply.

    alt

    alt

  4. Configure the user_id Parameter. Locate user_session.metadata.user_id, click To, select Enter text, and input any text, then click Apply.

    alt

    alt

  5. After configuring the parameters, click the Apply button in the parameters configuration window.

    alt

Test the Personal Finance Advisor

  1. Save and preview.

    1. Click the Save icon in the upper right corner.

    2. Then, click the Preview button located at the bottom right.

    alt

    alt

  2. Test a Query.

    1. Try asking something like: "What are the benefits of saving, and can you give me a couple of tips to start saving, please?"

    2. Review the response provided by the virtual assistant to ensure everything is functioning as expected.

    alt

Optional: Personalize the user interface (UI)

  1. In the left-hand menu, select Preview.

    alt

  2. Click the Change background + button.

    alt

  3. Choose your preferred option (either by entering a URL or uploading an image).

  4. Once selected, click the Continue button to apply your changes.

    alt

Demonstration video

Watch the demontration video of the Personal Finance Advisor:

Summary and reference information

This tutorial provided a step-by-step guide on building a Virtual Personal Finance Advisor using IBM Cloud services such as watsonx Assistant, Watson Discovery, and NeuralSeek. It covered the configuration of these services, integration of AI tools, and setting up personalized interactions with natural language understanding. The tutorial also included optional steps to customize the user interface for a tailored experience. By following these instructions, you can create a scalable and efficient virtual assistant to help manage personal finance tasks.

See the following reference information - The role of technology in improving financial literacy.