OCI Enterprise AI Agents
OCI has introduced Enterprise AI Agents in OCI Generative AI
as a managed way to build, run, and host agentic applications. Generative AI
adoption is moving from simple prompt based experimentation to enterprise ready
AI assistants that can answer questions using approved business knowledge. In
this article we are going to create a knowledge base using business documents
and then create OCI Gen AI agents followed by a chatbot. Here we achieve in
getting answers from our own documents, policies, architecture notes, runbooks
and internal knowledge. The goal of this article is to show how OCI can be used
to build a governed enterprise knowledge assistant without writing application
code.
1)
Create OCI Object storage bucket
2)
Upload the documents into Object storage bucket
3)
Create a Knowledge base
4)
Create an Agent
6) Create a RAG tool
7)
Launch Chat and Query.
The assistant will use a set of documents uploaded into OCI
Object Storage. These documents are added to a knowledge base. The knowledge
base is then connected to an OCI Generative AI Agent through a RAG tool. When we
raise prompt in chat, the agent retrieves relevant information from the
knowledge base and generates a response using the selected LLM.
Create OCI Object storage bucket
In OCI Console:
Navigation menu → Storage → Object Storage & Archive
Storage → Buckets
Create the bucket with default settings.
Once bucket is created, Upload documents to Object storage. These
documents may be PDFs, text files, architecture notes, or other supported file
types. The documents stored in the bucket become the source content for the
knowledge base.
Create a Knowledge Base
As the next step create a Knowledge Base, in OCI Console:
Navigation menu → Analytics & AI → Generative AI Agents
A knowledge base is the collection of source data that the
agent can use for retrieval. In this article, the knowledge base points to the
documents stored in OCI Object Storage. The knowledge base does not answer
questions directly. Instead, it provides the searchable enterprise context that
the RAG tool can retrieve from when the user asks a question.
In the OCI console, we could see three options that we discussed
earlier. As first step, create a Knowledge base and then Agents using that
Knowledge base and then initiate Chat.
For Knowledge base creation specify the Bucket having the
documents.
Either all documents in the bucket can be chosen or any
specific documents.
Once documents are chosen click Create button to create the
knowledge base.
The knowledge base creation will take few minutes to
complete. We need to be patient. We can’t alter or delete the creation until it
completes.
Once Knowledge Base is created move to creating Agent.
Create Agent
An agent is the main reasoning layer. It receives our prompts
and decides how to use the available tool and generates the final response. The
agent can be guided using routing instructions so that it responds in a
specific style and follows enterprise rules.
To create Agent, specify Name and then Routing instructions.
Instructions required to specify how to respond to chat prompts. In this article,
we instruct the agent to answer only from the knowledge base, avoid guessing,
provide concise responses, and escalate security or production-impacting
decisions to a human owner.
In this exercise we choose detail Routing LLM type Llama.
After Basic information, the next step is Add RAG tool. A
RAG tool allows the agent to search the knowledge base, retrieve relevant
content and then use that retrieved content to generate a better answer. This
is important because it helps the agent answer based on approved documents
instead of relying only on the model’s general knowledge.
We need to specify name and Routing description. The
description specifies how the tool should work with documents.
In the Add Tool we go with Default LLM (Llama)
The next step is setting up Agent endpoint. An agent
endpoint is the access point used to interact with the deployed agent. Once the
agent and its tools are configured, the endpoint allows users or applications
to send questions to the agent. Guardrails are safety and compliance controls
for the AI interaction. They help reduce risk by applying checks such as
content moderation, prompt injection protection, and personally identifiable
information protection. We will go with default settings for Guardrails.
Lets review the inputs and create agent.
Chat
Agent is ready, the next step is initiating chat.
Choose the created Agent and Endpoint.
Submit the prompts in chatbox and observe the chatbox
responses.
No comments:
Post a Comment