Dear All,
In this blog, we will learn how to create a Generative AI Agent within OCI. We will be creating a Retrieval-Augmented Generative (RAG) Agent.
We will be using Llama 3, as the preferred Large Language Model (LLM).
The AI Agent will interact with the LLM and produce a more accurate and contextually-relevant response using the data defined in the knowledge base.
As part of the agent creation process, we will be creating an Endpoint, which will be used to communicate with the Agent.
Create Generative AI Agent
From the navigation menu, click on Analytics & AI > Generative AI Agents.
Click on the Agents tab. Make sure you select the compartment where you want to create the agent. In this case, I’m creating the agent in the root compartment.
In the Agents list page, click on Create agent.
In the Basic information page, provide a meaningful Name for the agent. Chose the correct compartment from the compartment list. Enter a Description for the agent.
Type in a Welcome message. When users start the chat with the agent, they would be greeted by this message.
This is optional. If you don’t enter a custom Welcome message, a default Welcome message is displayed.
Note: You can add/create multiple Tools as part of the next step, you can add Routing instructions, which will affect the behavior of the agent.
For example, you can say “Always invoke the RAG Tool first”. For this example, since we will create just the RAG Tool for the agent, we will leave this field blank.
Click Next.
Next step is to create the tool(s). Note that the tools are created after you create the agent. Click on Create tool.
You can select from the pre-built tools – RAG, SQL, Custom tool. For this blog, since we are creating a RAG Agent, we will select RAG.
In the RAG Configuration section, provide a meaningful Name to the RAG tool. Enter a Description. In the Custom instructions field, you can enter an instruction in natural language for the agent’s responses. For the purpose of this blog, we will leave it blank.
In the Add knowledge bases section, select the Compartment from the compartment list. Then, select the knowledge base that we had created in the previous post. If you have not gone through that post, please visit “Creating a Knowledge Base for creating Oracle GenAI RAG Agent”.
Now click Create tool.
Next step is to Setup the endpoint. In the Setup agent endpoint page, select the checkbox Automatically create an endpoint for this agent. This will create an endpoint when the agent is created.
In the Guardrails section, I keep the Enable human in the loop option disabled.
In the Content moderation section, for both for input (user prompt) and output (generated response), I chose to Block any toxic and violent contents. These are Oracle recommended options.
I chose Block for Prompt injection (PI) protection, to identify and protect the response to be manipulated by malicious inputs.
I chose the recommended options to Block Personally identifiable information (PII) protection for input (user prompt) and output (generated response).
Click Next.
Review the setup. I
all looks good, click on Create agent.
Once you click on submit button, the agent will be created. You can check the status below.
Thanks,
Srini










































