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
These types of questions may not yield optimal results:
- Vague questions without context (βHow does this work?β)
- Questions about code not in your documentation
- Highly specific implementation details not documented
- Questions requiring real-time data or external information
Example Questions and Responses
API Documentation Questions
User: βHow do I authenticate requests to the API?β
Code Structure Questions
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
π‘ 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
Current limitations of the Ask feature:
- Documentation Scope: Only searches indexed documentation and code files
- Real-time Data: Cannot access live databases or external APIs
- Code Execution: Cannot run or test code, only explain existing code
- Version Specificity: May not distinguish between different versions of your code
- Complex Logic: May struggle with highly complex business logic without clear documentation
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
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