This is a cache of https://developer.ibm.com/tutorials/awb-enhance-chatbot-performance-rag/. It is a snapshot of the page as it appeared on 2025-11-21T04:28:16.192+0000.
Updating the knowledge base of a RAG DA chatbot - IBM Developer
Retrieval-Augmented Generation (RAG) is a powerful architecture for chatbots, blending real-time document retrieval with generative responses to create more accurate and contextually relevant answers. IBM cloud has a DA (Deployable Architecture) which includes deployment of a sample chatbot using watsonx Assistant and AI. This guide walks through the process of updating the RAG DAchatbot’s knowledge base with new documents so it can be adapted to other domains.
Objective
The objective of this blog post is to provide a step-by-step guide on updating the knowledge base of a RAG-based chatbot to transition from home loans to life insurance knowledge base. By walking through the process, users will learn how to seamlessly update their chatbot's knowledge base, ensuring that it adapts to provide accurate and timely responses to customer inquiries in other domains.
Prerequisites
Deploy the RAG Deployment Architecture (DA) in the IBM cloud Red Hat OpenShift (ROKS) environment using ElasticSearch Platinum with ELSER2 (Elastic Learned Sparse EncodeR). For detailed instructions, see the Deploying RAG Solutions with ElasticSearch Platinum and OpenShift tutorial.
The RAG Deployment Accelerator (DA) uses Elasticsearch as the chatbot’s knowledge base repository. It initializes a keyword index with sample bank loan data.
Variations in RAG DA: Basic and Standard
Basic variation:
Uses IBM cloud Elasticsearch Enterprise edition.
Adding or updating content requires:
Transforming documents into text.
Manually creating or updating the index directly in the Elasticsearch instance.
The index is then linked to the chatbot via the watsonx Assistant UI.
Standard variation:
Uses IBM cloud Elasticsearch Platinum edition.
Enables document updates directly through the watsonx Assistant UI.
watsonx Assistant automates:
Document transformation.
Index creation or updates.
configuration of an ELSER2 vector index for advanced semantic search and retrieval.
Note: The steps outlined in this guide are specific to the Standard variation using Elasticsearch Platinum edition.
Steps to access the application and how to upload new artifacts to the RAG chatbot
Step 1: Navigate and open the application
Depending on whether your application is hosted on IBM cloud code Engine or ROKS, follow one of the two paths outlined below to navigate to the application.
Using code Engine
Expand the Navigation Menu (A) and hover over containers (B), then select Projects (c).
On the Overview dashboard, select your project (A) (e.g., prefix-Generative_AI_Sample_App_cI_Project).
Switch to the Applications (A) tab and click Open URL (B) to relaunch the application.
Using ROKS
Open the Navigation Menu (A) and select Projects (B).
choose your project.
Go to the configuration (A) tab, expand your project, and select Workload – Sample RAG App configuration (B).
Find the sample_app_public_url and click to open the application.
Step 2: Interact with the home loan virtual assistant
Open the virtual agent chat window in the bottom right-hand corner (A).
Ask the virtual assistant questions regarding home loans. Here are some example questions.
What is a conventional loan?
What is arm?
What loan should I get for an expensive property?
How much does it cost to get a bank loan?
Ask the following questions regarding life insurance and observe how the virtual assistant is not able to answer the questions. As currently configured, the virtual assistant’s knowledge base is centered around home loans, rendering it unable to provide accurate or relevant information on life insurance.
What are the different life insurance policies?
When should I buy life insurance?
What does life insurance cover?
In the next section, we will guide you through the step-by-step process of updating the chatbot's knowledge base to life insurance.
Step 3: Access AI resources in your IBM account
Go to the Resource List (A) in your IBM cloud account.
If necessary, filter by a specificresource group (B).
Expand the AI / Machine Learning (c) section in the resource list.
Select watsonx Assistant (D).
Step 4: Launch the assistant
click Launch Assistant (A) to open the main dashboard of your chatbot project.
Step 5: Verify project selection
Ensure you are working on the correct project (A) by checking the project name. It should resemble (prefix)-gen-ai-rag-sample-app-assistant.
Step 6: Update assistant architecture
In the Assistant Architecture section, locate conversational Search and click change (A).
Select Draft (A) as the environment for making changes, then click confirm (B).
Step 7: configure Elasticsearch for document retrieval
Select Elasticsearch (A) as the retrieval method to access the document knowledge base.
In the Settings (A) tab, choose Upload documents to a new index in your Elasticsearch instance (B), then click Save (c).
Step 8: Add new documents
Go to the Documents (A) tab and click Upload (B).
Upload the new documents. Please go to this GitHub respository to find 5 sample life insurance documents that can be uploaded.
Step 9: Relaunch the chatbot to apply changes
To ensure the chatbot integrates the updated documents into its responses, you’ll need to relaunch the chatbot application. Follow Step 1 to relaunch the application.
Ask the life insurance questions again and observe the improvement in answers.
What are the different life insurance policies?
When should I buy life insurance?
What does life insurance cover
Summary
RAG based chatbots rely heavily on the information stored in their knowledge base. By updating the index with new documents, you are able to update the knowledge base of the chatbot. For example, the default home loan chatbot shipped as part of the RAG DA can be easily adapted to answer life insurance inquiries.
Through this updating process, your chatbot will be able to retrieve recent and relevant information in real time, making interactions more effective.
About cookies on this siteOur websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising.For more information, please review yourcookie preferences options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.