Have you ever found yourself searching through extensive documentation for specific MySQL or HeatWave features? The recently released HeatWave Chat can simplify that process. In this blog post, we will explore how the new chatbot, equipped with available reference manuals and documentation, can guide you through your MySQL and HeatWave tasks. This example demonstrates the chat capability, showing how users can customize it to suit their needs and build a custom chatbot.

Figure 1: HeatWave Chat GUI in Visual Studio Code.
Background
HeatWave has recently introduced a plethora of new AI and GenAI capabilities. One of the latest additions is HeatWave Chat, which enables you to build and use a chat-like interface to explore and retrieve information from your document ingested to HeatWave GenAI. The chatbot can readily answer general questions using its internal LLMs and because it keeps the history of your conversation, it can also reference back to what you have already discussed. The chatbot is accessible via MySQL Shell for VS-Code with HeatWave Chat GUI, or any MySQL SQL client via the terminal. Moreover, using the HeatWave Chat capabilities, you can create custom chatbots tailored to your needs and application.
In the rest of this blog post, we present how you can create your own chatbot that is able to assist you with MySQL or HeatWave questions. We do so by leveraging HeatWave GenAI with vector store to ingest latest documentation and reference manuals fo MySQL and HeatWave. These will then be used to generate answers to the given questions. You can use the same approach to create your own chatbot that serves your application by ingesting unstructured data like PDF or HTML files into HeatWave GenAI with Vector Store.
Creating Custom Chatbots
To create your own custom chatbot, all you need to do is to ingest relevant sources of information into HeatWave and utilize its vector store capabilities. These sources of information can be any type of unstructured data such as PDF, docx, or pptx files. HeatWave Chat will automatically consume the information ingested into vector store to answer your questions. Additionally, you can customize the chatbot to search within specific schemas, tables, or particular documents stored in the vector store.
System Setup
As we want this chatbot to be an expert on MySQL and HeatWave, we used the MySQL 8.4 reference manual and HeatWave user guide in PDF format and loaded them HeatWave GenAI with vector store capability. We uploaded those two files into our bucket on the OCI object storage and then created a Pre-Authenticated Request (PAR) to be used for ingesting the documents.

Figure 2: Creating a PAR for accessing documents stored in the OCI object storage.
Question Answering
Now that you have your documents ingested, let’s move to how you can use new chat capability. HeatWave Chat is directly accessible in the popular code editor VS-Code through the MySQL Shell plugin, and you can interact with it using the HeatWave Chat GUI. Here is an example question to ask from our newly built chatbot:

Figure 4: HeatWave Chat GUI is directly accessible in Visual Studio Code via the MySQL Shell Plugin.
You can follow up on previously asked questions. For example, we can ask if HeatWave—which was the subject of the first question—can be used with machine learning models and workloads, without explicitly mentioning its name. As seen in the figure, there is an interplay between chatting history and retrieval of information for the next question. These answers are all obtained with a Retrieval Augmented Generation (RAG) model, while using the ingested documents in the vector store.
HeatWave Chat is also accessible via the shell and `sys.heatwave_chat` is the gateway to this capability. This interface takes the question as an input string and responds with an answer to your given question. The following figure shows a similar question being asked through this interface:

Figure 5: HeatWave Chat is also accessible via the shell through the sys.heatwave_chat interface.
Our chatbot is able to come up with these accurate and on-point answers thanks to the ingested documents in the vector store. In fact, you can track which segments of which documents have been used to generate the very last answer using the same session variables we mentioned before, `chat_options`. The following shows a snippet of the top segments that matched one of the questions we asked earlier:

Figure 6: HeatWave Chat can provide citations and present detailed information on how it came up with a given answer.
Conclusion
HeatWave GenAI suite of capabilities enable you to a quickly and easily build solutions tailored to your needs. HeatWave Chat is your personal chatbot that not only can answer your general questions, but also it can widen its knowledge base to specific domains with the help of the built-in vector store capabilities and ingestion of unstructured data sources. HeatWave Chat, with its history tracking, citation, and customization capabilities, along with its accessibility through multiple interfaces, offers limitless potential for integration into your AI solutions.
HeatWave Chat Demo
Additonal Resources

