DeepResearch extends the Ask feature with a structured, multi-turn investigation process. Instead of producing a single response, DeepResearch sends multiple rounds of retrieval and generation, each building on the findings of the previous one. The process ends when the AI produces a final conclusion — or after five iterations, whichever comes first. This makes DeepResearch well suited to open-ended architectural questions that benefit from sustained exploration rather than a quick lookup.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AsyncFuncAI/deepwiki-open/llms.txt
Use this file to discover all available pages before exploring further.
The three stages of a DeepResearch session
Every DeepResearch session moves through three distinct stage types, rendered as separate panels in the UI:- Research Plan (
type: 'plan') — the first iteration, where the AI outlines its approach, identifies key areas to investigate, and produces initial findings based on RAG retrieval - Research Updates (
type: 'update') — intermediate iterations (up to three) where the AI revisits the codebase, incorporates what it has already found, and deepens the analysis - Final Conclusion (
type: 'conclusion') — the last iteration, where the AI synthesizes all prior findings into a comprehensive, self-contained answer
researchStages array and lets you navigate between them using previous/next controls, so you can trace how the AI’s understanding evolved.
How it works under the hood
DeepResearch reuses the samePOST /chat/completions/stream endpoint as Ask. The difference is a [DEEP RESEARCH] tag prepended to the user message. When the backend detects this tag, it selects a different system prompt for each iteration:
- Iteration 1 —
DEEP_RESEARCH_FIRST_ITERATION_PROMPT: instructs the model to produce a research plan - Iterations 2–4 —
DEEP_RESEARCH_INTERMEDIATE_ITERATION_PROMPT: instructs the model to build on prior findings - Iteration 5 —
DEEP_RESEARCH_FINAL_ITERATION_PROMPT: instructs the model to write a conclusive summary
research_iteration = assistant messages + 1) to determine which prompt the backend will use. Automatic continuation is triggered until researchComplete is set to true or five iterations have run.
Running a DeepResearch session
Enable the Deep Research toggle
Find the Deep Research switch in the Ask interface and toggle it on before typing your question. The toggle sets a
deepResearch flag in the React component state.Enter a research question
Type a complex, open-ended question — for example, “How does the authentication system interact with the database layer?” or “What are all the places where rate limiting is applied?”
Submit and watch the plan appear
DeepWiki sends the first request and streams the Research Plan. The panel title shows “Research Plan” and displays the AI’s investigation strategy and initial findings.
Automatic continuation
DeepResearch automatically triggers the next iteration after each response. You will see new Research Update panels appear as the AI digs deeper. No manual action is required between iterations.
Ask vs. DeepResearch
- Ask
- DeepResearch
Best for quick, targeted questionsUse Ask when you want a direct answer to a specific question about the codebase.Example scenarios:
- “What does the
prepare_retrieverfunction do?” - “Which file handles WebSocket connections?”
- “What environment variables does this project require?”
- Single retrieval pass → single response
- Fastest time to answer
- Conversation history maintained for follow-ups
- Well-suited to narrow, factual questions