Ask Questions and Receive Answers Based on Current Enterprise Data with a Generative AI Agents RAG Action
Oracle Cloud Infrastructure Generative AI Agents RAG combines the power of large language models (LLMs) and retrieval-augmented generation (RAG) with your enterprise data, enabling you to query diverse enterprise knowledge bases and receive context-specific answers based on the current data.
Capabilities
OCI Generative AI Agents RAG is an AI service that provides answers to your questions or requests based on your enterprise data through a natural language interface. OCI Generative AI Agents RAG provides a way to optimize the responses from an LLM without modifying the underlying model itself; the responses are based on the latest data and can be specific to a particular organization or industry. This enables the generative AI system to provide more contextually appropriate answers to your queries as well as base those answers on the current data. It lets you query diverse enterprise knowledge bases and receive up-to-date information. Oracle Integration supports using OCI Generative AI Agents RAG in an integration with the generative AI agents RAG action.
Prerequisites
See Prerequisites for information on the prerequisites you must satisfy in the Oracle Cloud Infrastructure Console.
Invoke Oracle Cloud Infrastructure Generative AI Agents RAG from an Integration
- Add a Generative AI Agents RAG action to an integration in either of the following ways:
- On the side of the canvas, click Actions
and drag the OCI Generative AI Agents RAG action to the appropriate location.
- Click
at the location where you want to add the OCI Generative AI Agents RAG action, then select OCI Generative AI Agents RAG.
- On the side of the canvas, click Actions
- Enter a name and optional description.
- To chat with the Generative AI system, you need an agent endpoint (that contains the knowledge base), you need to create a session, and then enable chat. To know which agent endpoints are available for use, you can use the List agent endpoints action in this step and then specify the compartment (that has the AI agent you want to use) in Step 5. Select the action you want to perform.
Element Description Action - List agent endpoints: Lists the endpoints that you can use.
- Create session: Creates a session with the Generative AI Agents RAG service using the ID (knowledge base Id) obtained by performing the List agent endpoints action.
- Chat: Enables the chat functionality using the ID (knowledge base Id) obtained by performing the List agent endpoints action and the session Id obtained by performing the Create session action.
Note:
- If you are not aware of the agent endpoints that are available, you can use the List agent endpoints action to obtain the list of agent endpoints that are available. Agent endpoints are endpoints that contain the knowledge bases that you want to query and receive responses.
- For every new chat that you want to perform, you need to specify the agent you want to use, create a session, and enable chat.
- If you started a chat and want to continue your chat using the same session and agent, then you can use the same session and agent. You need the agent (Ociagent Id) and session (Session Id) details to use the same chat session and agent.
- Click Continue.
- Select the following information, then click Continue.
Element Description Region Select the region you want to use.
Note: Ensure you select the region in which OCI is provisioned for you.
Compartment This field is displayed only when you select the List agent endpoints action.
Select the Oracle Cloud Infrastructure compartment in which your Oracle Integration is installed.
Note: Ensure you select a compartment where the AI agent is available.
- On the Summary page, click Finish.
-
Open the mapper and complete the configuration for Create session and Chat actions.
For the Create session action, perform the following steps:- Expand the response node in the Sources section and map Id (that is within Response Wrapper) to Ociagent Id within the request node in the Target section.
- Specify values for Description and Display Name using the Expression Builder.
For the Chat action, perform the following steps:- Map the User Prompt element from the Sources section to the User Message element in the Target section.
- Map the Id element from the Sources section to the Session Id element in the Target section.
- Map the Ociagent Id element from the Sources section to the Ociagent Id element in the Target section.
- Set the Should Stream target element to false in the expression builder.
- Exit the mapper.
The generative AI agents RAG action is now configured.
When you activate and run the integration, the AI agent provides a response to your request/question based on the knowledge base you had specified.
See Approve Invoices Using OCI AI Services for a recipe use case that uses the Generative AI Agents RAG action.