Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

Update README.md

LearningCircuit27539371e7d2
diff --git a/README.md b/README.md
index 68baecbbb5..e967cc2231 100644
--- a/README.md
+++ b/README.md
@@ -1,51 +1,37 @@
# Local Deep Research
-A powerful local research tool that performs deep, iterative analysis using AI and web searches, running entirely on your machine.
+A powerful AI-powered research assistant that performs deep, iterative analysis using multiple LLMs and web searches. The system can be run locally for privacy or configured to use cloud-based LLMs for enhanced capabilities.
## Features
-- 🔍 Automated deep research with intelligent follow-up questions
-- 🤖 Local AI processing - choose models based on your hardware
-- 📊 Comprehensive research findings in formatted_output.txt (main output)
-- 🔄 Iterative analysis with tracked sources and citations
-- 📝 Additional report formats (work in progress)
-- 🔒 Complete privacy: runs entirely on your machine
-- 🌐 Integration with DuckDuckGo for web searches (automated search queries will be shared with duck duck go)
-## Research Document Example
-
-The tool generates a comprehensive research document (`formatted_output.txt`) structured like this:
-
-```
-SEARCH QUESTIONS BY ITERATION:
-
-Iteration 1:
-1. What are the key foundational advancements in neural networks and algorithms that are driving current AI innovation?
-2. How can ethical considerations and transparency be effectively integrated into AI systems?
-3. What are the most transformative industry applications of AI?
-
-DETAILED FINDINGS:
-================================================================================
-PHASE: Initial Analysis
-================================================================================
-
-CONTENT:
-The analysis of current AI innovations highlights several key areas:
-
-1. Machine Learning and Deep Learning: These form the backbone of many AI
- applications, enabling machines to learn from data without explicit programming.
-
-2. Natural Language Processing (NLP): Advances like GPT-3 have transformed
- human-AI interactions, making NLP a pivotal area due to its widespread
- applications in chatbots and virtual assistants.
-
-[Additional findings...]
-
-SOURCES USED IN THIS SECTION:
-1. Top Foundations and Trends in Machine Learning for 2024
- URL: https://example.com/source1
-2. Neural Network Development Trends
- URL: https://example.com/source2
-```
+- 🔍 **Advanced Research Capabilities**
+ - Automated deep research with intelligent follow-up questions
+ - Citation tracking and source verification
+ - Multi-iteration analysis for comprehensive coverage
+ - Full webpage content analysis (not just snippets)
+
+- 🤖 **Flexible LLM Support**
+ - Local AI processing with Ollama models
+ - Cloud LLM support (Claude, GPT)
+ - Supports all Langchain models
+ - Configurable model selection based on needs
+
+- 📊 **Rich Output Options**
+ - Detailed research findings with citations
+ - Comprehensive research reports
+ - Quick summaries for rapid insights
+ - Source tracking and verification
+
+- 🔒 **Privacy-Focused**
+ - Runs entirely on your machine when using local models
+ - Configurable search settings
+ - Transparent data handling
+
+- 🌐 **Enhanced Search Integration**
+ - DuckDuckGo integration for web searches
+ - Full webpage content retrieval
+ - Source filtering and validation
+ - Configurable search parameters
## Installation
@@ -60,38 +46,106 @@ cd local-deep-research
pip install -r requirements.txt
```
-3. Install Ollama https://ollama.ai and choose your model based on your hardware:
+3. Install Ollama (for local models):
```bash
# Install Ollama from https://ollama.ai
-ollama pull deepseek-r1:14b # Or mistral:7b for lighter hardware
+ollama pull deepseek-r1:14b # Default model - many work really well
+```
+
+4. Configure environment variables:
+```bash
+# Copy the template
+cp .env.template .env
+
+# Edit .env with your API keys (if using cloud LLMs)
+ANTHROPIC_API_KEY=your-api-key-here # For Claude
+OPENAI_API_KEY=your-openai-key-here # For GPT models
```
-## Quick Start
+## Usage
+
+### Quick Start
Run the research tool:
```bash
python main.py
```
-Enter your research query when prompted. The system will generate detailed research findings in `formatted_output.txt`.
+You'll be prompted to choose between:
+1. Quick Summary (Generated in a few minutes)
+2. Detailed Research Report (In-depth analysis, may take several hours)
+
+Enter your research query when prompted. The system will generate:
+- For Quick Summary: A concise analysis in the console
+- For Detailed Report: A comprehensive report.md file
-## Model Options
+### Configuration
-Choose your model based on available computing power:
+Key settings in `config.py`:
```python
-# Lightweight option
-self.model = ChatOllama(model="mistral:7b", temperature=0.7)
+# LLM Configuration
+DEFAULT_MODEL = "deepseek-r1:14b" # Change based on your needs
+DEFAULT_TEMPERATURE = 0.7
+MAX_TOKENS = 8000
+
+# Search Configuration
+MAX_SEARCH_RESULTS = 40
+SEARCH_REGION = "us-en"
+TIME_PERIOD = "y"
+SAFE_SEARCH = True
+SEARCH_SNIPPETS_ONLY = False
+```
+
+### Model Options
-# More powerful (default)
-self.model = ChatOllama(model="deepseek-r1:14b", temperature=0.7)
+Choose your model based on available computing power and needs:
+
+```python
+# Local Models (via Ollama):
+- "deepseek-r1:7b" # Default, balanced performance
+- "mistral:7b" # Lighter option
+- "deepseek-r1:14b" # More powerful
+
+# Cloud Models (requires API keys):
+- "gpt-4" # OpenAI's GPT-4
+- "claude-3-opus" # Anthropic's Claude 3
```
+## Project Structure
+
+- `main.py` - Main entry point and CLI interface
+- `search_system.py` - Core research and analysis system
+- `citation_handler.py` - Manages citations and source tracking
+- `report_generator.py` - Generates comprehensive research reports
+- `config.py` - Configuration settings
+- `utilities.py` - Helper functions and utilities
+
+## Output Files
+
+The system generates several output files:
+
+1. `report.md` - Comprehensive research report (when using detailed mode)
+2. `research_outputs/formatted_output_{query}.txt` - Detailed findings and analysis
+3. Cached search results and intermediate analysis (in research_outputs/)
+
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
-- Built with [Ollama](https://ollama.ai)
-- Search powered by DuckDuckGo
+- Built with [Ollama](https://ollama.ai) for local AI processing
+- Search powered by [DuckDuckGo](https://duckduckgo.com)
- Built on [LangChain](https://github.com/hwchase17/langchain) framework
+- Uses [justext](https://github.com/miso-belica/justext) for content extraction
+- [Playwright](https://playwright.dev) for web content retrieval
+
+## Contributing
+
+Contributions are welcome! Please feel free to submit a Pull Request.
+
+1. Fork the repository
+2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
+3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
+4. Push to the branch (`git push origin feature/AmazingFeature`)
+5. Open a Pull Request