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:
-
Select the operation on the Anypoint Code Builder or Studio canvas.
-
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.
-
-
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:
<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>