Many of our customers have already been using generative AI (GenAI) technologies to get or generate information. However, if you want to get the information about your company’s private policies, which can be maintained in internal PDF documents, you might not be able to get that correct information. The large language model (LLM) can also hallucinate, generating responses that are nonsensical, factually incorrect, or disconnected from your question.
In most of the cases, the base LLM that powers these generative AI chatbots have been trained earlier on old public data, so it doesn’t have the knowledge about any restricted information, such as your company’s internal PDF documents. Re-training the base LLM with new data is a very resource- and time-consuming process.
This blog post shows how you can develop a solution to this problem using Oracle Cloud Infrastructure (OCI) Digital Assistant and OCI Generative AI Agents services. This solution enables developers to perform GenAI retrieval-augmented generation (RAG) on custom PDF documents, stored in OCI Object Storage, using the OCI Generative AI Agent service. It provides you with the following capabilities:
- Connect from OCI Digital Assistant chatbot, which can be hosted in an OCI Visual Builder web application, to OCI Generative AI Agent.
- Get responses to questions in natural language from your custom PDF documents.
GenAI RAG solution overview

This solution involves configuration of the following OCI Services:
- OCI Object Storage: Configure OCI Object Storage and create buckets. You can then upload your own unstructured PDF manuals and documents in the Object Storage buckets.
- OCI Generative AI Agent: Create and configure knowledge bases and agents. You can then ingest and perform RAG on your PDF documents in OCI Object Storage using OCI Generative AI Agent.
- OCI Digital Assistant (ODA): Create an ODA instances and skills. Then, connect from ODA skill to OCI Generative AI Agent using the OCI GenAI REST APIs.
- OCI Visual Builder: Create a Visual Builder instance and embed the ODA chatbot in the Visual Builder web application. Then you can get responses from your PDF manuals and documents using the web application.
Configuring OCI Object Storage
OCI Object Storage is an internet-scale, high-performance storage platform that offers reliable and cost-efficient data durability. Object Storage can store an unlimited amount of unstructured data of any content type, including analytic data and rich content, like images and videos. The service enables you to create buckets. After the buckets are created, you can upload your unstructured PDF manuals and documents in them.
For details about creating buckets and uploading your PDF documents in your Object Storage buckets, refer to the OCI Object Storage documentation
Configuring OCI Generative AI Agents
OCI Generative AI Agents is a fully managed service that combines the power of LLMs with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API.
The service enables you to create a knowledge base. As part of the knowledge base creation, you can select Object Storage as the data source and point to the Object Storage bucket that you created earlier. After the knowledge base is created, you can create the GenAI agent and point to the knowledge base. Using the OCI Generative AI Agent console, you can also test the created components by chatting with the agent.
For details about creating Generative AI Agents components, see Generative AI Agents documentation.
Configuring OCI Digital Assistant
Digital assistants are virtual devices that help users accomplish tasks through natural language conversations, without having to seek out and wade through various apps and websites. Each digital assistant contains a collection of specialized skills. When a user engages with the digital assistant, the digital assistant evaluates the input and routes the conversation to and from the appropriate skills.
OCI Digital Assistant is a platform that allows you to create and deploy digital assistants, which are AI-driven interfaces that help users accomplish various tasks in natural language conversations. Using the ODA console, you can add a REST API configuration and point to your OCI GenAI Rest API endpoints. Then in the ODA skill’s visual dialog flow, you can use the built-in call REST service component to call the REST configuration. So, from the ODA Chatbot, you can pass the user’s question to OCI Generative AI Agents and get the response and citations from the agent.
To expose the ODA chatbot to a client web application, create a channel of type Oracle Web, which you can then connect to the OCI Visual Builder web application. The ODA client SDK for Oracle Web provides you with a widget that enables you to run a skill in a Visual Builder web page.
For details about configuring the ODA skill and channel and REST service, see Oracle Digital Assistant documentation.
Configuring the OCI Visual Builder application
OCI Visual Builder can provide a frontend web application for an ODA chatbot. It lets you create and deploy web and progressive web applications visually. You can then use the ODA client SDK for Oracle Web to connect your Visual Builder web application to the ODA chatbot.
For details about OCI Visual Builder, refer to Oracle Visual Builder. To learn about creating the OCI Visual Builder web application, see the Visual Builder documentation.
Conclusion
Oracle Digital Assistant makes it easy for you to create a conversational interface for your users that enables them to communicate in their own natural language (text or voice) using different channels. ODA enables you to have seamless connectivity with Generative AI Agents and get responses to your question in natural language based on your internal PDF documents and manuals.
If you’re new to Oracle Cloud Infrastructure, try Oracle Cloud Free Trial, a free 30 day trial with US $300 in credits.
For more information, see the following resources:
