automation-cloud
latest
false
UiPath logo, featuring letters U and I in white

Automation Cloud admin guide

Last updated Dec 11, 2025

Using DeepRAG

DeepRAG (Deep Research–Augmented Generation) is a Context Grounding and synthesis layer that enables agents to analyze and connect information across multiple documents, producing citation-backed, enterprise-grade answers. You use it to build agents that perform deep research, investigative analysis, and evidence-based reasoning at scale. To learn more about agents, refer to the Agents user guide.

DeepRAG operates in three phases:

  1. Planning – Analyzes your question, identifies sub-tasks, and defines research scope.
  2. Iterative research loop – Queries indexed data, extracts relevant evidence, and consolidates findings.
  3. Synthesis – Integrates all evidence into a cohesive, citation-backed response.

Each result includes traceable references to the original source, ensuring auditability and compliance across enterprise data backend.

Key capabilities

Here are the key capabilities of DeepRAG:

  • Multi-document synthesis – Synthesizes information across up to 1,000 pages in a single query.
  • Citation-backed answers – Includes document names, page numbers, and timestamps for every key finding.
  • Agentic reasoning – Plans, researches, and adapts during execution, rather than only retrieving results.
  • Enterprise scale – Processes structured and unstructured data from multiple sources through a single index.
  • Traceability and compliance – Maintains complete audit trails of sources used in synthesis.

When to use DeepRAG

Use DeepRAG when your agents needs to:

  • Analyze multiple documents to answer a complex question.
  • Generate a comprehensive summary across diverse data sets.
  • Validate findings with high-fidelity citations.
  • Perform regulatory, medical, or legal research requiring traceability.

Use Semantic Search for quick fact lookups, and DeepRAG for detailed analysis or synthesis across document sets. For details on using context in agents, refer to the Agents user guide.

Table 1. DeepRAG vs. other approaches
FeatureSemantic searchDeepRAG
PurposeFind relevant chunksSynthesize multiple docs
Document limitUnlimited1,000 pages
ProcessingInstantMinutes
OutputSnippetsComprehensive synthesis
CostLowMedium
CitationsBasicDetailed

Configuring DeepRAG

Before using DeepRAG, ensure you meet the following prerequisites:

  • Your data is stored in the correct file format: native PDFs or TXT files, up to 512 MB per file.
  • You have AI Units for ingestion and query execution. For details, refer to Context Grounding licensing.

Next, complete the following actions:

Step 1 – Prepare documents

  1. Use well-organized folders and clear naming conventions.
  2. Include document metadata and page numbers.
  3. Avoid duplicates and ensure files are OCR-applied if scanned.
Note: For high accuracy, use native PDFs and structure documents by category or identifier.

Step 2 – Create an index

In Agent Builder:

  1. Select the Context node and select Create new. Here is a sample configuration for an index:
    1. Name: Medical_Records_2025
    2. Description: Aggregated patient records for review
    3. Ingestion mode: Advanced.
  2. Upload your documents and wait for ingestion to complete.
    • Ingestion cost: 0.2 AIU × number of pages. For example, 1,000 pages = 200 AIU.

Step 3 – Configure the agent

Configure your agent. Here is an example:

  • Agent name – Medical Record Summarizer
  • Description – Analyzes patient medical records with full citations
  • Context – Configure the context. For example:
    • Index: Medical_Records_2025;
    • Search strategy: DeepRAG
    • Search strategy prompt – Write an effective prompt, such as: "Analyze all medical records and provide a comprehensive summary including: Diagnoses and treatments, Medical history, Medications, Lab results."
  • Specify the output format – For example: "Structured summary with citations". Always include detailed output format instructions and conflict-handling instructions in your prompt.
Note: If the DeepRAG-generated summary exceeds the output size limit, retrieve the complete summary externally. Use the DeepRAG ID (from traces) together with the Context Grounding Summary – DeepRAG GenAI activity to fetch the full synthesized output outside the agent run. This allows you to access the entire response without truncation.

Writing effective prompts for DeepRAG

Use the following prompt pattern for reliable results:

ROLE:

You are a [domain expert] reviewing [document type].

TASK:

Analyze all documents and [specific goal].

REQUIREMENTS:

  1. [Requirement 1]
  2. [Requirement 2]
  3. [Requirement 3]

OUTPUT FORMAT:

[Structured output format]

Good prompt example: You are a medical professional reviewing patient records. Create a comprehensive summary including diagnoses, history, medications, and lab results.

Poor prompt example: Summarize the patient’s records.

Optimizing DeepRAG performance

Use the following information to optimize your context's performance:

ScenarioTypical durationOptimization tips
≤ 200 pages< 10 minsUse focused questions and native PDFs.
500–800 pages<20 minsSplit large files and refine prompt scope.
1,000 pages< 30 minsRemove duplicates

Cost model

  • Ingestion = 0.2 AIU × pages

  • DeepRAG query = 0.20 AIU per 30K tokens (0.2–0.4 AIU per 500 pages)

Troubleshooting

IssueCauseSolution
No valid files to use for DeepRAGWrong file format or Basic ingestion mode selectedUse only PDF/TXT
Timeout (60 min)Too large corpus or complex promptSplit documents; simplify queries.
Missing citationsWeak prompt or unstructured sourcesVerify PDFs have consistent numbering.
Low-quality summariesGeneric prompt or poor document qualityImprove prompt specificity; clean document hierarchy.

Use cases for DeepRAG

Here are some real-life business scenarios where DeepRAG can be useful:

Medical record summarization: Analyze 200–400 page patient files to extract diagnoses, treatments, medications, and labs with citation-backed summaries.

  • Prompt example: Analyze all patient medical records and generate a clinical summary including chief complaints, diagnoses, medications, and treatment recommendations.
  • Result: 5–10× faster review and 70–90% accuracy in healthcare implementations

Contract analysis: Review multiple agreements to identify principal terms, covenants, and default clauses.

  • Prompt example: Analyze all credit agreements and extract financial terms, covenants, and default provisions.
  • Result: Enables risk analysis with full audit trail for compliance and legal workflows.

Regulatory and compliance review: Summarize audit reports, filings, and SOPs to highlight compliance gaps with page-level references.

  • Prompt example: Review all regulatory filings and summarize compliance status, identifying non-conformities with citations.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo
Trust and Security
© 2005-2025 UiPath. All rights reserved.