---
schema_version: "1"
id: 7b4b2df2d8b2804f3f5f88366f7577218313a8802d1f72261c29cececbc7f581
title: Configuring RAG Operations for Einstein AI Connector 2.0
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/einstein-ai-connector/latest/configuring-rag-operations.md
canonical_url: https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-rag-operations
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 1a163fd7019112e09ba701494914c3cc309efd8705824540f45e412c2405f126
description: MuleSoft Documentation Site
release: "2.0"
latest: true
---
---
product: Einstein AI Connector
version: 2.0
is-latest-version: true
---

# Configuring RAG Operations for Einstein AI Connector 2.0

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Retrieval-Augmented Generation (RAG) is a technique for enhancing AI-generated outputs by retrieving
relevant content, and using it to augment AI prompts with additional context. By grounding LLMs with
this additional information, they can provide more accurate and reliable responses.

## Configure the RAG Adhoc Load Document Operation

The **RAG adhoc load document** operation retrieves information based on a plain text prompt from an
in-memory embedding store.

To configure the **RAG adhoc load document** operation:

1.  Select the operation on the Anypoint Code Builder or Studio canvas.

2.  In the **General** properties tab for the operation, enter these values:

    - **Prompt**

      The prompt to send to the LLM and the embedding store to respond to. This field is required.

    - **Input Stream**

      Document content to ingest into the embedding store.

3.  In **Additional properties**, select the values for:

    - **Embedding Name**

    - **File Type**

      Type of document to ingest. Values are **PDF**, **TEXT**, and **CSV**.

    - **Option Type**

      How to split the document before embedding. Values are **FULL** and **PARAGRAPH**.

    - **Model API Name**

      Name of the API model that interacts with the LLM.

    - **Probability**

      Probability of the model API staying accurate

    - **Locale**

      Localization information, which can include the default locale, input locale(s), and expected
      output locales

This is the XML configuration for this operation:

```xml
<ms-einstein-ai:rag-adhoc-load-document
  doc:name="Rag adhoc load document"
  doc:id="edaea124-a8aa-4d4a-8f85-0f32ee4c9858"
  config-ref="Einstein_AI"
  optionType="PARAGRAPH">
  <ms-einstein-ai:prompt>#[payload.prompt]</ms-einstein-ai:prompt>
  <ms-einstein-ai:input-stream>#[payload]</ms-einstein-ai:input-stream>
</ms-einstein-ai:rag-adhoc-load-document>
```

## See Also

- [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb)

- [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)

- [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/latest/)

- [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference)

- [Salesforce Help](https://help.salesforce.com)
