
What Makes Khoj Chat Special
Context-Aware
Automatically retrieves relevant information from your documents using semantic search
Multi-Turn Conversations
Maintains context across messages for natural, flowing discussions
Source Citations
Shows exact references from your notes that informed each response
Online or Offline
Choose between cloud-based or local AI models based on your needs
Getting Started
Open Khoj Chat
- Web
- Obsidian
- Emacs
- Desktop
Navigate to app.khoj.dev/chat in your browser
Ask Your Question
Type naturally - Khoj understands context and nuance. Try:
- “What did I learn about machine learning last week?”
- “Summarize my meeting notes from yesterday”
- “Help me draft an email about project updates”
Slash Commands
Control how Khoj responds by prefixing your message with these commands:/notes - Use Only Your Documents
/notes - Use Only Your Documents
Forces Khoj to answer exclusively using your knowledge base, ignoring general knowledge.Example:
/notes What did my dentist say about my treatment plan?/general - Use Only AI Knowledge
/general - Use Only AI Knowledge
Prevents Khoj from searching your documents, relying only on the model’s training.Example:
/general Explain quantum entanglement/default - Automatic Choice
/default - Automatic Choice
Lets Khoj decide whether to use your notes or general knowledge (default behavior).Example:
/default What are the best practices for documentation?/online - Search the Internet
/online - Search the Internet
Researches current information online and incorporates it into the response.Example:
/online What's the latest news on AI regulation?Learn more about Online Search →/image - Generate Images
/image - Generate Images
Creates images based on your text description.Example:
/image A serene mountain landscape at sunsetLearn more about Image Generation →/diagram - Create Diagrams
/diagram - Create Diagrams
Generates visual diagrams using Excalidraw format.Example:
/diagram Show the architecture of a microservices system/code - Execute Python Code
/code - Execute Python Code
Generates and runs Python code for calculations or data analysis.Example:
/code Calculate compound interest on $10,000 at 5% for 10 yearsLearn more about Code Execution →/research - Deep Research Mode
/research - Deep Research Mode
Performs comprehensive research with multiple sources and deeper analysis.Example:
/research What are the implications of quantum computing on cryptography?/help - Get Assistance
/help - Get Assistance
Shows available commands and tips for using Khoj effectively.
File Filters
Limit which documents Khoj searches for relevant context.Using the Sidebar (Web)

Using Query Filters
Add filter syntax directly in your message:How It Works
Retrieval (RAG)
Khoj searches your knowledge base using semantic similarity, finding contextually relevant passages even if they don’t contain exact keywords
RAG (Retrieval-Augmented Generation) means Khoj first retrieves relevant information, then uses it to generate more accurate, grounded responses.
Best Practices
Be Specific with Context
Be Specific with Context
Instead of: “Tell me about the meeting”Try: “What decisions were made in yesterday’s product planning meeting?”
Use File Filters for Focused Searches
Use File Filters for Focused Searches
When you know which documents are relevant, filter to just those files for faster, more accurate results.
Iterate and Refine
Iterate and Refine
Follow up with clarifying questions. Khoj maintains conversation context:
- “Summarize my notes on machine learning”
- “What did I learn about neural networks specifically?”
- “Show me examples I saved”
Combine Commands
Combine Commands
Use multiple techniques in sequence:
- Start with
/researchfor comprehensive information - Ask
/notesto see what you already know - Use
/codeto perform calculations
Advanced Features
Vision Support
Khoj can analyze images you share in the conversation:Vision capabilities require compatible chat models (GPT-4V, Claude 3, Gemini Pro Vision, etc.)
Multi-Modal Conversations
Combine text, voice, and images in a single conversation:Self-Hosting Configuration
Configure Chat Models
Configure Chat Models
Self-hosted users can customize which AI models to use.See Setup Guide →
Adjust RAG Settings
Adjust RAG Settings
Fine-tune how many documents are retrieved and relevance thresholds.Navigate to:
http://localhost:42110/server/admin/database/searchmodelconfig/Troubleshooting
Khoj isn't finding my documents
Khoj isn't finding my documents
- Ensure documents are synced (check the data sources page)
- Try more specific queries
- Use
/notesto force document search - Verify file filters aren’t excluding relevant documents
Responses seem generic
Responses seem generic
- Use the
/notescommand to focus on your knowledge - Add file filters to narrow the search scope
- Provide more context in your question
Slow response times
Slow response times
- Check your internet connection (for cloud models)
- Consider using faster models in settings
- Reduce the number of documents being searched with filters
Next Steps
Create Custom Agents
Build specialized AI assistants for different tasks
Try Voice Chat
Have spoken conversations with Khoj
Automate Research
Schedule recurring chats and receive insights via email
Share Conversations
Create public links to your chat sessions
