UiPath Documentation
test-cloud
latest
false
Test Cloud admin guide

Using DeepRAG

Configure and use DeepRAG in Test Cloud to enable agents to perform multi-document synthesis and produce citation-backed, enterprise-grade answers.

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:

  4. 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.
  5. 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 lets you access the entire response without truncation.

Writing effective prompts for DeepRAG​

DeepRAG automatically generates verified citations that point to the exact pages in the source documents where supporting evidence is found. You do not need to request citations or specify how they should be formatted—this happens by default. In fact, adding citation or formatting instructions can interfere with results and should be avoided.

To get reliable, high-quality outputs, focus your prompt on role clarity, task specificity, and concrete requirements.

Use the following pattern:

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.

The good example clearly defines the role, sets a specific task, and outlines concrete requirements, allowing DeepRAG to retrieve and ground its response effectively, while automatically handling citations behind the scenes.

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​

The following examples show business scenarios for DeepRAG, grouped by industry. Each example lists the documents to index and a sample prompt to adapt to your own data. For guidance on structuring prompts, refer to Writing effective prompts for DeepRAG.

Healthcare and medical​

Medical record summarization​
  • Input documents: Patient files of 200–400 pages from a hospital visit, including day-by-day information
  • Prompt example: "Generate a summary with a brief patient profile, chief complaint, home medication and dosages. For each day of hospitalization give a daily synopsis, overview of patient condition, vital signs, lab results, X-rays and medication administered."
Insurance prior authorization review​
  • Input documents: Patient medical history, insurance policy documents, clinical guidelines, provider notes, and lab results
  • Prompt example: "Analyze authorization request against policy criteria. Summarize: medical necessity justification, coverage determination, applicable policy clauses, clinical evidence supporting treatment, and any missing documentation required for approval."
Contract comparison analysis​
  • Input documents: Vendor contracts, master service agreements, amendments, statements of work (SOWs), and pricing schedules
  • Prompt example: "Compare all contracts identifying: key terms variations, liability clauses, termination conditions, pricing structures, SLA commitments, and intellectual property provisions. Highlight conflicting terms between documents and recommend standardization opportunities."
Mergers and acquisitions due diligence review​
  • Input documents: Financial statements, legal agreements, intellectual property (IP) portfolios, employee contracts, litigation history, and customer contracts
  • Prompt example: "Synthesize due diligence findings covering: material risks, contract obligations, IP assets/liabilities, litigation exposure, employee retention risks, and customer concentration. Flag deal-breakers and quantify financial impact where possible."
Regulatory and compliance review​
  • Input documents: Audit reports, regulatory filings, and standard operating procedures (SOPs)
  • Prompt example: "Review all regulatory filings and summarize compliance status, identifying non-conformities."

Financial services​

Loan application assessment​
  • Input documents: Credit reports, bank statements, tax returns, employment verification, property appraisals, and existing debt obligations
  • Prompt example: "Generate comprehensive creditworthiness assessment including: debt-to-income ratios, payment history analysis, collateral valuation, risk score calculation, and loan recommendation with supporting evidence for each factor."
Investment research synthesis​
  • Input documents: Analyst reports, earnings transcripts, Securities and Exchange Commission (SEC) filings, industry reports, competitor analysis, and news articles
  • Prompt example: "Create investment thesis covering: financial performance trends, competitive positioning, growth catalysts, risk factors, valuation metrics, and analyst consensus. Include bull/bear case scenarios."
Credit agreement analysis​
  • Input documents: Credit agreements
  • Prompt example: "Analyze all credit agreements and extract financial terms, covenants, and default provisions."

Manufacturing and operations​

Quality incident root cause analysis​
  • Input documents: Quality reports, production logs, equipment maintenance records, supplier certificates, inspection data, and customer complaints
  • Prompt example: "Trace quality issues to root causes. Document: defect patterns, timeline correlation, equipment/supplier involvement, impact assessment, corrective actions taken, and preventive measures needed. Link findings to specific batch numbers and production runs."

Real estate and construction​

Property portfolio analysis​
  • Input documents: Lease agreements, property valuations, maintenance records, tenant correspondence, market comparables, and zoning documents
  • Prompt example: "Synthesize portfolio performance including: occupancy trends, rental income analysis, maintenance cost patterns, tenant satisfaction issues, market positioning, and renovation priorities. Calculate ROI by property with supporting documentation."

Human resources​

Employee performance review synthesis​
  • Input documents: Performance reviews, 360-degree feedback, project outcomes, training records, goal achievements, and peer feedback
  • Prompt example: "Create comprehensive performance assessment covering: strengths/development areas pattern analysis, goal achievement rates, skill progression, feedback themes, and career path recommendations. Support conclusions with specific examples and metrics."

Research and development​

Patent landscape analysis​
  • Input documents: Patent filings, prior art searches, competitor patents, technical specifications, and licensing agreements
  • Prompt example: "Map intellectual property landscape covering: white space opportunities, infringement risks, licensing possibilities, competitor strategies, and filing recommendations. Classify patents by technology domain and commercial relevance."

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated