Create a RAG Task

Updated 

A RAG (Retrieval-Augmented Generation) Task enables an AI Agent to retrieve information from configured knowledge sources and generate responses based on that content. By combining retrieval and response generation within a single task, RAG Tasks simplify the configuration of knowledge-driven conversations.

When a user submits a query, the AI Agent retrieves relevant content from the connected knowledge sources and uses it to generate a response.

Steps to Create a RAG Task

  1. Click the New Tab icon.
  2. Under Sprinklr Service, select AI Agent Builder.
  3. Open the AI Agent where you want to create the task.
  4. From the left navigation pane, click Build.
  5. Click Tasks.
  6. Click the caret icon next to Create Task and select Create Task.
  7. In the Create New Task window, enter the following details:

    • Name
    • Task Category
    • Description
  8. Under Task Details, configure the task prompt.

    • Use the default prompt editor to define task instructions.
    • Click Create Prompt to create a new prompt.

Configure Tools

You can configure workflow tools for the task using the Select Tools option.

Supported tools include:

  • Handover Tool
  • Route to Agent Tool
  • End Conversation Tool

These tools enable the AI Agent to transfer conversations, route users to agents, or end conversations when required.

Configure Additional Settings

Under Additional Settings, enable the required options for the task.

Enable Grounded Responses

Turn on Grounded Responses to generate answers using content retrieved from configured knowledge sources.

When enabled:

  • Responses are generated using retrieved knowledge.
  • Answers are grounded in source content.
  • Follow-up questions can continue using the same knowledge context.
  • Responses are generated only when supporting content is available.

Grounded responses help improve response accuracy and reduce unsupported answers.

Publish References and Source Content

You can display the sources used to generate responses.

Available options include:

  • Reference Links – Displays links to articles, documents, or resources used in the response.
  • Citations – Displays the source content used during answer generation.
  • Referenced Images – Displays images associated with the cited content, when available.

These options allow users to review the source material used to generate the response.

Configure the Model

Under Configure LLM Provider and Model, configure the following settings:

  • Guardrail: Select a guardrail to apply safety, compliance, and response controls to user inputs and AI-generated responses.

  • PII Masking Template: Select a PII masking template to identify and mask sensitive information within conversations.

  • LLM Provider: Select the language model provider used to generate responses.

  • Model: Select the model that the AI Agent uses to generate responses.

  • Save the Task: Click Save to create the task.

How RAG Tasks Work

When a user submits a query, the RAG Task:

  1. Receives the user query.
  2. Retrieves relevant content from the configured knowledge source.
  3. Generates a response using the retrieved content.
  4. Returns the generated response to the user.

This approach eliminates the need to configure separate retrieval and response-generation workflows.