Skip to main content

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.

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.

The three stages of a DeepResearch session

Every DeepResearch session moves through three distinct stage types, rendered as separate panels in the UI:
  1. 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
  2. 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
  3. Final Conclusion (type: 'conclusion') — the last iteration, where the AI synthesizes all prior findings into a comprehensive, self-contained answer
The frontend stores each stage in the 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 same POST /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 1DEEP_RESEARCH_FIRST_ITERATION_PROMPT: instructs the model to produce a research plan
  • Iterations 2–4DEEP_RESEARCH_INTERMEDIATE_ITERATION_PROMPT: instructs the model to build on prior findings
  • Iteration 5DEEP_RESEARCH_FINAL_ITERATION_PROMPT: instructs the model to write a conclusive summary
The frontend counts prior assistant turns (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

1

Open the Ask panel

Navigate to any generated wiki and open the Ask panel.
2

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.
3

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?”
4

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.
5

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.
6

Review the Final Conclusion

After the last iteration, a Final Conclusion panel appears with the AI’s synthesized answer. You can navigate back through the earlier stages to see how the conclusion was reached.

Ask vs. 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_retriever function do?”
  • “Which file handles WebSocket connections?”
  • “What environment variables does this project require?”
Characteristics:
  • Single retrieval pass → single response
  • Fastest time to answer
  • Conversation history maintained for follow-ups
  • Well-suited to narrow, factual questions

Build docs developers (and LLMs) love