Ask Feature Guide
The Ask feature is a powerful RAG (Retrieval Augmented Generation) system that enables natural language conversations with your code documentation. It combines advanced retrieval techniques with AI to provide accurate, contextual answers about your codebase.What is the Ask Feature?
The Ask feature transforms your static documentation into an interactive knowledge base where you can:- Ask natural questions about your code, APIs, and documentation
- Get contextual answers with relevant code snippets and explanations
- Maintain conversation history for follow-up questions
- Access real-time streaming responses for immediate feedback
- Query programmatically via API for integration into other tools
RAG Architecture
The Ask feature uses Retrieval Augmented Generation (RAG) to combine the best of both worlds: precise information retrieval from your docs with the natural language capabilities of large language models.
How RAG Works with Code
1. Document Indexing
When your wiki is generated, DeepWikiOpen creates semantic embeddings of your documentation:2. Query Processing
When you ask a question, the system:- Converts your question into a semantic embedding
- Searches the vector database for relevant documentation chunks
- Retrieves contextual information from multiple sources
- Generates a comprehensive answer using the retrieved context
Using the Ask Interface
Basic Question Interface
The Ask feature provides an intuitive chat interface in your generated wiki:
Conversation Flow
1
Ask Your Question
Type your question in natural language in the Ask input field
2
Real-time Processing
Watch as the system processes your query with streaming responses
3
Receive Answer
Get a comprehensive answer with code examples and source references
4
Follow-up Questions
Continue the conversation with contextual follow-up queries
Types of Questions That Work Best
✅ Excellent Question Types
How-To Questions
Examples:
- “How do I set up authentication?”
- “How to handle errors in the API?”
- “How do I deploy this application?”
What-Is Questions
Examples:
- “What is the UserService class?”
- “What does the config.json file contain?”
- “What are the available endpoints?”
Code Location Questions
Examples:
- “Where is the database connection configured?”
- “Where are the API routes defined?”
- “Which file contains the main application logic?”
Best Practice Questions
Examples:
- “What’s the recommended way to handle validation?”
- “Best practices for error handling?”
- “How should I structure my tests?”
❌ Less Effective Question Types
Example Questions and Responses
API Documentation Questions
- Question
- Response
User: “How do I authenticate requests to the API?”
Code Structure Questions
- Question
- Response
User: “What’s the structure of the database models?”
Conversation History and Context
Context Retention
The Ask feature maintains conversation context throughout your session:Follow-up Question Examples
Initial Question: API Endpoints
Initial Question: API Endpoints
Q: “What API endpoints are available?”A: Lists all available endpoints with descriptions…Follow-up: “How do I use the user endpoint?”
Follow-up: “What’s the rate limiting for these endpoints?”
Follow-up: “Are there any authentication requirements?”
Initial Question: Error Handling
Initial Question: Error Handling
Q: “How does error handling work?”A: Explains the error handling strategy with examples…Follow-up: “What about async errors?”
Follow-up: “How do I log these errors?”
Follow-up: “Are there custom error types?”
Streaming Responses and Real-time Interaction
Streaming Implementation
The Ask feature provides real-time streaming responses for immediate feedback:Visual Feedback

- Search progress with animated loading states
- Token-by-token streaming for real-time response building
- Source highlighting as references are found
- Completion status when the response is finished
API Usage for Programmatic Q&A
REST API Endpoints
API Response Format
Best Practices for Effective Questions
🎯 Writing Better Questions
Be Specific
Instead of: “How does this work?”Try: “How does user authentication work in the login endpoint?”
Provide Context
Instead of: “Fix this error”Try: “How do I handle the ‘Database connection failed’ error when starting the server?”
Ask About Documented Features
Good: “What configuration options are available for the email service?”Less Good: “How do I integrate with an undocumented third-party service?”
Use Examples
Better: “How do I format a POST request to create a new user with email and password fields?”vs: “How do I create users?”
📝 Question Templates
- How-To Template
- What-Is Template
- Where-Find Template
- Best-Practice Template
💡 Advanced Query Techniques
Multi-part Questions
Multi-part Questions
Break complex questions into parts:Instead of: “How do I set up the database, configure authentication, and deploy to production?”Try:
- “How do I set up the database for development?”
- “How do I configure JWT authentication?” (follow-up)
- “What’s the deployment process for production?” (follow-up)
Reference Previous Context
Reference Previous Context
Build on previous answers:After asking about authentication:
- “How do I test these authentication endpoints?”
- “What error codes does this authentication return?”
- “How do I refresh expired tokens mentioned earlier?”
Ask for Examples
Ask for Examples
Request concrete examples:Good questions:
- “Can you show me an example of making a POST request to create a user?”
- “What does a typical error response look like?”
- “Can you provide a sample configuration file?”
Limitations and Troubleshooting
Known Limitations
Common Issues and Solutions
No Relevant Results Found
No Relevant Results Found
Symptoms: The AI responds with “I couldn’t find relevant information”Solutions:
- Check if your question relates to documented features
- Try rephrasing with different terminology
- Ensure your documentation was properly indexed
- Ask more specific questions about documented components
- ❌ “How do I use advanced features?”
- ✅ “How do I configure the email notification system?”
Inaccurate or Incomplete Answers
Inaccurate or Incomplete Answers
Symptoms: The response doesn’t match your actual codebaseSolutions:
- Verify your documentation is up-to-date
- Re-index your documentation if you’ve made recent changes
- Provide more context in your question
- Ask follow-up questions for clarification
Slow Response Times
Slow Response Times
Symptoms: Questions take a long time to processSolutions:
- Check if you’re asking very broad questions (try being more specific)
- Verify your internet connection for streaming responses
- Consider if your documentation is very large (may require longer processing)
- Use the API with appropriate timeout settings
Context Not Maintained
Context Not Maintained
Symptoms: Follow-up questions don’t reference previous conversationSolutions:
- Ensure you’re using the same conversation session
- Check that cookies/session storage is enabled
- For API usage, pass the same
conversation_id - Start a new conversation if context becomes confusing
Performance Optimization Tips
- Question Optimization
- API Usage
- Conversation Management
Optimize your questions for better performance:
Debug Mode
Enable debug mode to troubleshoot issues:Need Help?
Still having issues?
- Check the API Documentation for detailed endpoint information
- Review Common Patterns for question examples
- Contact support with specific error messages and question examples
- Join our community Discord for real-time help