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 enterprise data stores, 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 enterprise data. 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

  1. Add a Generative AI Agents RAG action to an integration in either of the following ways:
    • On the side of the canvas, click Actions Integration actions icon and drag the OCI Generative AI Agents RAG action to the appropriate location.
    • Click Add icon at the location where you want to add the OCI Generative AI Agents RAG action, then select OCI Generative AI Agents RAG.
  2. Enter a name and optional description.
  3. Click Continue.
  4. 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

    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.

    Endpoints

    This drop-down list shows the agent endpoints that are available in the selected compartment. Agent endpoints are endpoints that contain the knowledge bases that you want to query and receive responses.

    Select an agent endpoint to use.

    Note:

    For every new chat that you want to perform, the OCI Generative AI Agents RAG action creates a session, uses the knowledge base that's available in the agent endpoint you specify, and then enables chat.
  5. On the Summary page, click Finish.
  6. Open the mapper and complete the configuration.

    1. Map the source User Prompt element to the target User Message element.

      You need to specify your question/request in the request payload body.

    2. Map the source Session Id element (of a previous response) to the target Session Id element if you want to continue the chat in the same session (session of a previous response).

      Note:

      If you want to continue your chat using the same session of a previous response, then you can specify the Session Id of that previous response in the request payload and perform the above mapping in the mapper. To get the Session Id of a previous response, check the information returned for the previous response as it will contain the Session Id. If you don't specify a Session Id in the request payload and don't perform the above mapping, then the OCI Generative AI Agents RAG action creates a new Session Id.
    3. Set the target Should Stream element to false in the expression builder.
  7. 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.