LLMs Technical Reviews

How is interactive Q&A / chat implemented?

Chat over the repo; deep-research mode; streaming; conversation memory; MCP exposure.

Verdict

OpenDeepWiki has the most complete chat: an agent that reads both the wiki and the source, stored sessions, and an MCP server for IDE agents. deepwiki-rs and readmeX have no chat at all (not applicable). They are batch generators.

Agent chat over docs and source. OpenDeepWiki streams typed SSE events (content, thinking, tool_call, tool_result, done). The agent reads generated pages with ReadDoc and source with ReadFile, Grep and ListFiles, and sessions are saved in the database. It runs a global MCP endpoint and one per repository. The per-repo SearchDoc is a literal SQL LIKE, so full-sentence questions often find nothing. openDeepWiki (Go) streams over WebSocket and sends the last 20 messages as history. The agent can read_doc a page or read raw source with the file tools. The git_log and git_show tools in its config do not exist and are silently dropped. Its MCP server has five read-only tools, and search is a substring scan capped at 20 hits.

Retrieval chat. deepwiki-open runs chat over /ws/chat on the same top-20 FAISS path as page generation. The client sends the history, because the server stores none. Deep Research is a five-step prompt sequence driven by the frontend, and Codemap builds a step-by-step code guide. There is no MCP server. RepoWiki offers a terminal REPL and an SSE endpoint, both with TF-IDF top-5 chunks, line-range sources and six turns of history. The paraphrase boost is not wired up. RepoAgent has an optional single-turn Gradio demo with multi-query retrieval, an LLM rerank and a final gpt-4o answer. It has no history and no streaming.

No chat. deepwiki-rs uses chat history only inside its own tool loops. readmeX uses its retrieval only to build page prompts.

Pick: OpenDeepWiki for chat from an IDE agent or across many repos. Pick: deepwiki-open for guided Deep Research on a single-user setup. Pick: RepoWiki for a lightweight terminal chat with no embedding service.

Per-project answers

AsyncFuncAI/deepwiki-open

answered

Interactive Q&A over a repository is implemented through a WebSocket-based chat system. The frontend's Ask component (src/components/Ask.tsx) provides the UI, with three modes: Fast, Deep Research, and Codemap. When a user submits a question, the frontend opens a WebSocket to /ws/chat (src/utils/websocketClient.ts, line 64), sends a ChatCompletionRequest as JSON, and receives streaming text chunks. On WebSocket failure, it falls back to HTTP POST at /api/chat/stream (src/app/api/chat/stream/route.ts).

The backend endpoint is handle_websocket_chat() in api/routers/chat.py (line 20). It delegates to research_chat() (api/services/research.py), which: (1) prepares or loads the FAISS RAG index for the repo, (2) retrieves relevant document chunks, (3) loads conversation history from the Memory class into XML-style <turn> blocks, (4) picks the appropriate iteration prompt, and (5) streams the LLM response via ChatStreamer.respond_stream(). If the prompt exceeds 7500 tokens, RAG context is dropped and the model answers from its training data alone (line 146-148).

Deep Research mode (api/prompts.py lines 60-151) runs up to 5 automated iterations: iteration 1 produces a research plan, iterations 2-4 investigate deeper aspects, and iteration 5 produces a final conclusion. Each iteration builds on the previous conversation history. The frontend's Ask.tsx auto-continues through iterations (line 620-637), extracting research stages from the response (## Research Plan, ## Research Update N, ## Final Conclusion) and displaying a stage navigator. A max of 5 iterations is hard-coded (research.py line 219), with force-complete logic on the frontend (Ask.tsx line 501-508).

Codemap mode (api/services/codemap.py) is a separate multi-phase pipeline: RAG retrieval → two-step JSON generation (skeleton + enrich with Mermaid diagrams) → citation grounding against real source files → NDJSON streamed over /ws/codemap. Results are displayed as structured step-by-step guides with a side-by-side CodeViewer for cited source files.

Conversation history is maintained client-side in the conversationTurns array (Ask.tsx line 92), with model/provider selection exposed through a modal. Unlike the wiki generation pipeline, Q&A does not cache results on the server.

Editor's note. Correction: the server keeps no chat history. The client sends the conversation with each request, and the Memory class the answer mentions is not what persists it.

AIDotNet/OpenDeepWiki

answered

Chat over the repo. The chat assistant is served through ChatAssistantEndpoints (src/OpenDeepWiki/Endpoints/ChatAssistantEndpoints.cs:14). The primary endpoint is POST /api/v1/chat/stream (line 150), which accepts a ChatRequest containing message history, model ID, and a DocContextDto (owner, repo, branch, language, current document path, catalog menu). The response is Server-Sent Events (SSE) with text/event-stream content type and X-Accel-Buffering: no to disable nginx buffering.

Streaming implementation. ChatAssistantService.StreamChatAsync() (src/OpenDeepWiki/Services/Chat/ChatAssistantService.cs:372) creates an agent session via Microsoft.Agents.AI. It uses agent.RunStreamingAsync() to yield token-by-token SSE events of types: content (text chunks), thinking (reasoning tokens from models that support it, e.g. DeepSeek R1), tool_call (with incremental or complete arguments), tool_result, done (final token counts), and error. The tool-call handling supports both OpenAI streaming format (StreamingChatCompletionUpdate with ToolCallUpdates, line 590–664) and Anthropic streaming format (RawMessageStreamEvent with content_block_start/delta/stop events, line 666–803), including thinking_delta and input_json_delta for extended thinking models.

Agent tools. The chat agent receives ReadDoc (line 503) for reading generated wiki pages with line ranges, ReadFile/ListFiles/Grep from GitTool (line 479) for source code access when the repository clone is available, plus configurable MCP tools and Skill tools. The system prompt (line 963–1138) instructs a structured workflow: Understand → Gather (using tools) → Analyze → Respond, with source-code verification required when docs are unclear.

Conversation memory. Session state is tracked in the database via ChatSessionImpl and SessionManager (src/OpenDeepWiki/Chat/Sessions/). Messages are persisted through a DatabaseMessageQueue with dead-letter handling. Usage accounting records token consumption via AiUsageAccounting per session.

Deep-research mode. The system prompt includes internal_thinking instructions (line 998–1022) that encourage the agent to reason step-by-step before responding, using tags for structured deliberation.

MCP exposure. The chat is also available through MCP endpoints (/api/mcp and /api/mcp/{owner}/{repo}, per README), where the same agent tools are exposed via the MCP protocol. Repository-scoped MCP endpoints bind the tool context to a specific repo. The McpToolConverter (src/OpenDeepWiki/Services/Chat/McpToolConverter.cs) converts MCP provider configs into AI tools at request time.

OpenBMB/RepoAgent

answered

Interactive Q&A is implemented through the chat-with-repo sub-package, activated by pip install repoagent[chat-with-repo] and launched via repoagent chat-with-repo (main.py:224-239).

Startup flow (chat_with_repo/main.py:9-43): The RepoAssistant is initialized with API credentials and the path to project_hierarchy.json. It then:

  1. Extracts all markdown content and metadata from the JSON via JsonFileProcessor.extract_data() (json_handler.py:20-48)
  2. Creates a ChromaDB vector store from these documents using VectorStoreManager.create_vector_store() (vector_store_manager.py:31-116)
  3. Launches a Gradio web interface (GradioInterface, gradio_interface.py:7-195)

Chat flow (rag.py:84-176): The respond() method receives user message and optional instruction. The pipeline:

  1. Formats a prompt and extracts 1–3 code keywords via TextAnalysisTool.keyword() (using gpt-4o-mini)
  2. Generates 3 query variants via generate_queries() (gpt-4o-mini)
  3. Queries the Chroma vector store (OpenAI text-embedding-3-large embeddings, top-5) (vector_store_manager.py:117-132)
  4. Reranks results by LLM-gated relevance scores and passes to a first-pass RAG response (gpt-4o-mini) (rag.py:58-63)
  5. Extracts class/function names from both user and bot text via nerquery() (text_analysis_tool.py:42-55), then looks up actual source code from the JSON database
  6. Runs a final RAG-AR call using gpt-4o (rag.py:74-82), feeding it both the retrieved documentation chunks AND the raw source code, producing the final answer

Deep-research mode: No deep-research / multi-step reasoning mode exists in the codebase. The pipeline is a fixed single-pass sequence.

Streaming: The Gradio interface does NOT use streaming. The submit button produces the full response text at once (gradio_interface.py:180-192).

Conversation memory: There is no conversation memory or history tracking. Each invocation of respond() is stateless — the prompt and instruction textbox are sent fresh, and the output is rendered as markdown. The Gradio UI has a "record" button that is never wired to any backend handler.

MCP exposure: No MCP (Model Context Protocol) server or tool is implemented. The chat-with-repo feature is a standalone Gradio app, not an MCP service.

In summary, chat-with-repo is a demo-quality prototype: a single-turn RAG pipeline over pre-generated documentation, with no conversation history, no streaming, no multi-turn refinement, and no agentic capabilities beyond the fixed retrieval + generation sequence.

he-yufeng/RepoWiki

answered

Q&A is available both in the terminal (repowiki chat .) and via a FastAPI streaming endpoint (/api/project/{id}/chat). Both paths follow the same pattern: ingest the repo, build/load the TF-IDF index, retrieve relevant chunks, and prompt an LLM with the context.

CLI chat (src/repowiki/cli.py:488-575): after indexing, it enters a REPL loop. The user's question goes through _answer_question() (cli.py:562-575), which calls rag.retrieve(question, top_k=5) and build_chat_prompt() to construct messages. The prompt (src/repowiki/llm/prompts.py:178-211) includes a system instruction to answer from the code and reference specific files/line numbers, the conversation history (capped at 6 most recent turns, prompts.py:175), and the relevant code chunks. Sources are printed as a file:start-end footer after each answer (cli.py:555-559).

Web chat (src/repowiki/server/routers/chat.py:18-94): the same retrieval pipeline runs, but adds a ModuleIndex boost for paraphrased questions (chat.py:43-49). The response is server-sent events (SSE): first a data: event with references (file path + line range + snippet), then streamed content tokens via LLMClient.stream(), then a {"done": true} event (chat.py:84-94). Conversation history is passed by the client as a list of ChatTurn objects and inserted into the prompt (chat.py:81-82).

The project does not implement a dedicated "deep-research" mode (multi-turn autonomous exploration) or expose its chat via MCP. The server does provide the full wiki content, file content, and dependency graph at REST endpoints (/api/project/{id}/wiki, /api/project/{id}/file/{path}, /api/project/{id}/graph) (server/routers/wiki.py:12-100), which could serve as building blocks for external integration.

Editor's note. Correction: the web chat does not apply the ModuleIndex boost in practice (it reads a non-existent wiki.modules), so both CLI and web chat use the same lexical top-5 retrieval.

weibaohui/openDeepWiki

answered

Interactive Q&A is implemented over WebSocket. A session is created via POST /api/repositories/:id/chat/sessions, then the frontend upgrades to a WebSocket at /repositories/:id/chat/sessions/:session_id/stream. The client sends JSON {"type":"message","content":"..."} and the server streams back event types: thinking_start, content_delta (streaming text chunks), tool_call, and assistant_end. The chat agent in chat_handler.go (the runAgent method) injects repo metadata (name, URL, branch, commit, description) plus a full document list with DocIDs into the system message. The agent can call read_doc(doc_id) to retrieve full document content — this is the primary retrieval mechanism. Conversation history (last 20 messages) is sent as context. Streaming is achieved by iterating the Eino ADK runner's event stream and forwarding each content_delta to the client. Tool calls are streamed to the frontend in real-time and saved to the database. Message limit is 1000 per session. The MCP server (mcp/server.go) provides a parallel external-facing interface with search_documents, read_document, get_document_summary, list_repositories, and get_repository tools — this is how external AI tools (Claude Code, etc.) query the wiki. No deep-research mode was found in the codebase.

Editor's note. Correction: besides read_doc, the chat agent can read raw source via list_dir, read_file and search_files; the git_log and git_show tools listed in chat_assistant.yaml do not exist in ToolProvider and are silently dropped.

sopaco/deepwiki-rs

not applicable

DeepWiki-rs does not implement interactive Q&A, chat, or conversational features. There is no streaming endpoint, no MCP server, no conversation memory for user interaction, and no deep-research chat mode. The ReAct executor in src/llm/client/react.rs uses chat history internally for multi-turn tool-calling within a single agent call (tracking tool call→response cycles), but this is an internal mechanism for the LLM to use file_explorer/file_reader tools during generation — not exposed to users. The SummaryReasoner similarly replays the ReAct chat history to produce a final summary when the agent hits its max turn limit. These are internal implementation details, not interactive chat features. The tool is a batch documentation generator only.

aibox22/readmeX

not applicable

This repository does not implement any interactive Q&A, chat, or conversation features. It is a pure batch documentation generator — it reads a project, generates README.md or an MkDocs website, and exits. There is no streaming, no chat loop, no conversation memory, and no MCP exposure. The code_rag.py module's semantic_search() and generate_enhanced_prompt() are used exclusively to augment LLM prompts during page generation, not for end-user querying. The ModelClient.get_answer() method is a simple one-shot LLM call with retry logic and no conversation history. A typical Q&A feature would require a different architecture entirely (interactive loop, session state, web UI), none of which is present.

← How are model providers configured?