deepSearch
Runs a multi-agent research workflow over one or more RAG datasets. Builds a LangGraph state machine composed of a researcher agent, a tools node (wrapping vectorSearch and rerank), an advisor agent that scores research quality and identifies evidence gaps, and a synthesize node that extracts structured facts. The graph iterates — researcher → tools → advisor → researcher — until the advisor scores quality ≥ 0.9 with no evidence gaps, or max_research_iterations is reached.
Dataset resolution: if collection_id is provided and dataset_ids is not, the node calls getCollection to resolve dataset IDs. If neither is provided, a ValueError is raised.
Parameters
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | Research question. Minimum length: 1 |
dataset_ids | integer[]? | No | null | Dataset IDs to search. Takes priority over collection_id |
collection_id | integer? | No | null | Collection to resolve dataset IDs from, when dataset_ids is not provided |
max_research_iterations | integer | No | 3 | Maximum iteration cycles. Range: 1–10 |
max_concurrent_agents | integer | No | 3 | Maximum concurrent research agents. Range: 1–10 |
allow_clarification | boolean | No | false | Ask clarifying questions before research |
max_tool_calls_per_iteration | integer | No | 10 | Maximum tool calls per iteration. Range: 1–30 |
research_model | string | No | "gpt-4o-mini" | LLM model for researcher and advisor agents |
research_provider | string? | No | null | LLM provider. Auto-detected from model when not set |
summarization_model | string? | No | null | LLM model for summarization. Falls back to research_model |
final_report_model | string? | No | null | LLM model for the final report. Falls back to research_model |
search_k | integer | No | 10 | Documents retrieved per RAG search call. Range: 1–50 |
embedding_model | string | No | "BAAI/bge-m3" | Embedding model for vector search |
embedding_provider | string | No | "runpod" | Embedding provider |
max_documents_per_agent | integer | No | 20 | Maximum documents each agent can analyze. Range: 1–100 |
report_format | string | No | "detailed" | One of: summary, detailed, comprehensive |
Output
| Field | Type | Description |
|---|---|---|
extracted_facts | ExtractedFact[] | Structured facts extracted by the synthesis LLM |
citations | Citation[] | Unique citations deduplicated by DOI |
research_summary | string | Free-text summary produced by the synthesis LLM |
evidence_gaps | string[] | Gaps in evidence identified by the advisor |
total_documents_analyzed | integer | Count of unique documents analyzed across all iterations |
total_iterations | integer | Number of researcher→tools→advisor cycles completed |
research_quality_score | float | Final quality score assigned by the advisor (0.0–1.0) |
execution_time_seconds | float | Wall-clock time in seconds |
Each ExtractedFact:
| Field | Type | Description |
|---|---|---|
fact | string | Extracted fact |
confidence_score | float | Confidence (0.0–1.0) |
supporting_citations | integer[] | Citation id values supporting this fact |
relevance_score | float | Relevance to the query (0.0–1.0) |
Each Citation:
| Field | Type | Description |
|---|---|---|
id | integer | Sequential citation ID |
title | string | Paper title |
doi | string | DOI |
subject_area | string | Subject area or field |
Example
{
"id": "research",
"type": "deepSearch",
"data": {
"label": "Deep Search",
"isExecuted": false,
"handles": ["inputs", "outputs"],
"schema": {},
"params": {
"query": { "value": "{{ $input.question }}", "isExpression": true, "isAttachedToInputNode": false },
"collection_id": { "value": 42, "isExpression": false, "isAttachedToInputNode": false },
"max_research_iterations": { "value": 4, "isExpression": false, "isAttachedToInputNode": false },
"research_model": { "value": "gpt-4o-mini", "isExpression": false, "isAttachedToInputNode": false },
"search_k": { "value": 25, "isExpression": false, "isAttachedToInputNode": false },
"report_format": { "value": "detailed", "isExpression": false, "isAttachedToInputNode": false }
},
"inputs": [], "outputs": [], "errors": []
},
"position": { "x": 0, "y": 0 },
"isSelected": false,
"isDragging": false
}