We are building a simple customer support agent for ACME Inc, a company that issues pet insurance policies for pet owners. We'll use the RAG tool to answer questions about pet insurance policies.
- Knowledge base and pdf file ingestion
- Agent flow no-code canvas
- RAG tool
- Agent flow playground
-
Go to OCI console > Storage > Buckets.
-
Select a compartment and click on “Create bucket”.
-
Give the bucket a name (i named mine acme-insurance-policies). Leave all other config params untouched.
-
Click on that bucket link and click on “Upload Objects”.
-
Drop the insurance pdf files from the data/ folder. Click Next and click Upload Objects”. Click on Close button after all files are uploaded. Double-check that the files are in the bucket by clicking on the “Objects” tab of the bucket.
-
Go back to your AIDP Workbench instance.
-
Create a new external volume in a new schema or in the same schema you used in Agent 2. Select the compartment of your newly created bucket as well as the bucket.
-
Check that the policy files are in the volume.
-
Now create a new knowledge base which includes the ACME insurance policies. In the same schema, under “knowledge bases”, click on “+” to create a new knowledge base. Give your knowledge base a name and a description. Leave the advanced settings parameters untouched for now.
-
Once the kb is created successfully, click on the kb. In the “Data source” tab, click on the “+” and add the external volume you created earlier.
File ingestion will start right away. Follow the progress in the History tab of the kb. It should take less than 1 min to complete succesfully.
-
Go to Agent flows and create a new agent flow with the visual flow authoring mode.
-
Drag the agent node to the canvas. Select us-ashburn-1 region and the xai.grok-4-fast-reasoning model.
-
Add the following agent instructions:
You are an AI support agent responsible for accurately answering questions about pet insurance policies issued by ACME Inc. You have access to a Retrieval-Augmented Generation (RAG) tool connected to a knowledge base containing detailed ACME Inc. pet insurance policy information.
Instructions:
Use the RAG tool to retrieve the most relevant, up-to-date information from the ACME Inc. insurance policy knowledge base for every user query.
Provide clear, concise, and accurate responses based strictly on the information found in the knowledge base.
If the policy details do not cover the user’s question, inform the user politely and suggest contacting ACME Inc. customer support for further assistance.
Do not provide advice or make assumptions beyond the knowledge base content.
Adhere to compliance, privacy, and security standards at all times.
Example opening response:
“Thank you for your question about ACME Inc. pet insurance. Based on our policy information, here’s what I found:”
-
Leave the model parameters and safety guardrails untouched.
-
Drag and drop the RAG tool in the canvas
-
Configure your RAG tool with a descriptive name and a complete description to give the agent proper context about what the tool does. Here’s an example:
Tool name: acme_insurance_policies_retrieval
Description: Retrieval augmented generation tool (RAG) connected to a knowledge base of ACME Inc insurance policies. The RAG tool performs natural language queries over the insurance policies.
-
In the RAG tool config window, select the knowledge base you created for the insurance policies. Set the limit of docs retrieved to 5. Leave the query box empty.
-
Attach your knowledge base to an AI compute. If you don't already have an AI compute, create a new one.
-
Test your tool with a sample query in the “Playground” tab. An example could be:
For Bella, what’s the annual coverage limit?
You created an external volume, uploaded pdf documents to that volume, and created a knowledge base. You then connected an agent to that knowledge base by creating a simple RAG tool.