Summary
How can customer data become context for a RAG chatbot?
The example connects Oracle Autonomous Database 23ai, AI Vector Search and OCI Generative AI. It starts with customer, plan, contract, billing and satisfaction tables. Views prepare text and metadata; the sp_elt_insert_into_docs procedure splits the content, generates embeddings and stores it in DOCS for retrieval.
The walkthrough reviews DBMS_VECTOR, DBMS_VECTOR_CHAIN, UTL_TO_CHUNKS and JSON_TABLE, along with industry, case and view parameters. It prepares access policies, Autonomous and its wallet, an API Key, a VCN and a Windows OCI Compute instance. The chatbot is then installed; NGINX is presented as an optional configuration.
The demo compares selected profiles and cases to observe changes in retrieved context. It also generates test customers, updates their embeddings and queries the information through the chat. The walkthrough ends by inspecting DOCS, metadata, views and the procedure in Autonomous.
Start
The presenter introduces a chatbot connected to Oracle Autonomous Database 23ai with AI Vector Search. The walkthrough combines customer data preparation, embeddings generation and RAG queries.
Use Case and architecture for client data
The architecture centralizes customer information in Autonomous Database 23ai and uses OCI Generative AI for embeddings. A virtual machine can host the chatbot that queries this content. The DBMS_VECTOR and DBMS_VECTOR_CHAIN packages are introduced for vector data, alongside network access and permissions for the example users.
Relational model, views and metadata
The model starts with customer, plan, contract, billing and satisfaction survey tables. Views combine these tables into a customer identifier, context text and metadata. The metadata supports retriever search filters. A procedure then consumes the views to convert text into embeddings and store it in DOCS.
The procedure for generating and storing embeddings
The sp_elt_insert_into_docs procedure and its insertion into DOCS are reviewed. The structure contains an identifier, industry, case, text, embedding and metadata. Values come from views sharing a common structure of customer identifier, text content and metadata. The target table includes a vector field to store the text representation.
text fragmentation with UTL_TO_CHUNKS
UTL_TO_CHUNKS splits view text into chunks using configurable criteria such as words, size, overlap and splitting type. JSON_TABLE then converts the result into rows. The walkthrough identifies each chunk identifier, starting position, length and content, preparing input for embeddings generation.
Generation of embeddings with OCI Generative AI
The chunked text becomes embeddings through OCI Generative AI, using previously prepared credentials and a multilingual model. JSON_TABLE converts the results into an identifier, text and vector structure for insertion into DOCS. The query includes a condition that adds values not yet present in the example table.
Access policies for OCI Generative AI
The access policies required for OCI Generative AI are reviewed. The presenter explains that these are already configured in the environment before continuing with Autonomous creation and the rest of the integration.
Creation of Autonomous Database 23ai and walk
An Autonomous database is created using the data warehouse workload and the example version 23ai. The name, capacity and password are set, and provisioning is allowed to finish. The wallet is then downloaded, a password protects the ZIP file, and the file is kept for the application connection.
Creation of API Key and OCI configuration
An API Key is created from the user profile to connect the application to OCI. The key and generated configuration are saved for preparing the environment files later. The walkthrough connects these credentials with the permissions of the user running the integration.
Creation of the Virtual Cloud Network
The VCN creation wizard is introduced with configurable name and network range. The presenter uses an existing network and reviews the laboratory ports: 3389 for Remote Desktop and 3002 for application access. This prepares the selected network for the chatbot host instance.
Creation of OCI Compute instance
An OCI Compute instance is created using a Windows image and the prepared VCN. Once provisioned, its IP address is used for Remote Desktop access. The generated password is changed at first login, and the machine is ready for application component installation.
Optional NGINX and firewall configuration
NGINX is introduced as an optional step for publishing the local application service. The server is downloaded and extracted, its configuration is replaced with the example configuration, and forwarding associated with port 3002 is reviewed. NGINX is then restarted, and a Windows firewall rule is prepared for the application port.
Installation and configuration of the chatbot
The project is copied, the wallet is added and OCI configuration is prepared with the key path. Conda is then installed, and Autonomous, wallet and development user connection variables are completed. The number of test customers to generate is also configured.
The installation process creates the environment and dependencies, prepares the user and permissions, vector credentials, case tables, DOCS, views and the embeddings procedure. It then processes content, adds an index and makes the chatbot available through its local address or the configured published endpoint.
Demo RAG: Profiles, cases and customer queries
The demo starts with a test customer and a question with no case selected; the chatbot retrieves no information about that customer. Selecting a case supplies context for a response. The profile is then changed to Product Manager, which has more cases in the example, and a response uses information from several views.
Generation of new customers and upgrade of embeddings
Generate Data adds a test customer and inserts records into the related tables. The procedure then converts view content into embeddings. The profile and cases are selected to query the new customer, and a list of available customers is requested. The test shows new information reaching the context retrieved by the chatbot.
Revision of DOCS table and vectors
The development schema is opened in Database Actions to query DOCS. Industry, case, text, metadata and embeddings are reviewed in relation to filters and vector searches. A view is then inspected: it contains the customer identifier, metadata and context text before the embeddings transformation performed by the procedure.
Dynamic procedure by industry, case and hearing
The procedure structure is opened and connected to the query reviewed at the start of the video. Industry, case and view parameters allow processing to be reused over different example sources. The closing presents this preparation as the basis for a chatbot connected to Autonomous Database 23ai.
Resources related
- AI Vector Search Chatbot - Project code and guide
- Oracle AI Vector Search - Embeddings and similarity search
- DBMS_VECTOR_CHAIN - Fragmentation and generation of embeddings
- OCI Generative AI - Models and capabilities
- LangChain - Oracle AI Vector Search integration
- NGINX for Windows - Optional configuration