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.

merge with main

LearningCircuitdcc17c24c7a0
diff --cc README.md
index 74f1b738da,d02bfe04a5..d97bdbcd13
--- a/README.md
+++ b/README.md
@@@ -152,146 -214,59 +152,110 @@@ cache_dir = "__CACHE_DIR__/local_search
### Using Local Search
-You can use local search in several ways:
+You can use local document search in several ways:
- 1. **Auto-selection**: Set `tool = "auto"` in `settings.toml` [search] section
- 2. **Explicit collection**: Set `tool = "project_docs"` to search only that collection
- 3. **All collections**: Set `tool = "local_all"` to search across all collections
- 4. **Query syntax**: Type `collection:project_docs your query` to target a specific collection
+ 1. **Auto-selection**: Set `search_tool = "auto"` in `config.py` and the system will automatically use your local collections when appropriate for the query.
- ## Advanced Configuration
+ 2. **Explicit Selection**: Set `search_tool = "research_papers"` to search only that specific collection.
- ### Research Parameters
+ 3. **Search All Local Collections**: Set `search_tool = "local_all"` to search across all your local document collections.
- Edit `settings.toml` to customize research parameters:
+ 4. **Query Syntax**: Use `collection:collection_name your query` to target a specific collection within a query.
- ```toml
- [search]
- # Search tool to use (auto, wikipedia, arxiv, etc.)
- tool = "auto"
-
- # Number of research cycles
- iterations = 2
-
- # Questions generated per cycle
- questions_per_iteration = 2
-
- # Results per search query
- max_results = 50
-
- # Results after relevance filtering
- max_filtered_results = 5
-
- # More settings available...
- ```
-
- ### LLM Configuration
+ ### Search Engine Options
- Edit `llm_config.py` to configure language models:
-
- ```python
- # Provider enum
- class ModelProvider(Enum):
- OLLAMA = auto()
- OPENAI = auto()
- ANTHROPIC = auto()
- # More providers available...
+ The system supports multiple search engines that can be selected by changing the `search_tool` variable in `config.py`:
- # Set your preferred model provider here
- DEFAULT_PROVIDER = ModelProvider.OLLAMA
-
- # Set your default model name here
- DEFAULT_MODEL = "gemma3:12b" # Default recommended model
-
- # More settings available...
- ```
+ - **Auto** (`auto`): Intelligent search engine selector that analyzes your query and chooses the most appropriate source (Wikipedia, arXiv, local collections, etc.)
+ - **SearXNG** (`searxng`): Local web-search engine, great for privacy, no API key required (requires a searxng server)
+ - **Wikipedia** (`wiki`): Best for general knowledge, facts, and overview information
+ - **arXiv** (`arxiv`): Great for scientific and academic research, accessing preprints and papers
+ - **PubMed** (`pubmed`): Excellent for biomedical literature, medical research, and health information
+ - **DuckDuckGo** (`duckduckgo`): General web search that doesn't require an API key
-- **The Guardian** (`guardian`): Journalism and news articles (requires an API key)
++- **The Guardian** (`guardian`): Quality journalism and news articles (requires an API key)
+ - **SerpAPI** (`serp`): Google search results (requires an API key)
+ - **Google Programmable Search Engine** (`google_pse`): Custom search experiences with control over search scope and domains (requires API key and search engine ID)
+ - **Local Collections**: Any collections defined in your `local_collections.py` file
- ## Available Search Engines
-
- | Engine | Purpose | API Key Required? |
- |--------|---------|-------------------|
- | `auto` | Intelligently selects the best engine | No |
- | `wikipedia` | General knowledge and facts | No |
- | `arxiv` | Scientific papers and research | No |
- | `pubmed` | Medical and biomedical research | No |
- | `semantic_scholar` | Academic literature across all fields | No |
- | `github` | Code repositories and documentation | No (but rate-limited) |
- | `brave` | Web search (privacy-focused) | Yes |
- | `serpapi` | Google search results | Yes |
- | `google_pse` | Custom Google search | Yes |
- | Any collection name | Search your local documents | No |
+ > **Note:** The "auto" option will intelligently select the best search engine based on your query. For example, if you ask about physics research papers, it might select arXiv or your research_papers collection, while if you ask about current events, it might select The Guardian or DuckDuckGo.
> **Support Free Knowledge:** If you frequently use the search engines in this tool, please consider making a donation to these organizations. They provide valuable services and rely on user support to maintain their operations:
> - [Donate to Wikipedia](https://donate.wikimedia.org)
--> - [Support The Guardian](https://support.theguardian.com)
> - [Support arXiv](https://arxiv.org/about/give)
> - [Donate to DuckDuckGo](https://duckduckgo.com/donations)
> - [Support PubMed/NCBI](https://www.nlm.nih.gov/pubs/donations/donations.html)
+## Web Interface
+
+The web interface offers several features:
+
+- **Dashboard**: Start and manage research queries
+- **Real-time Updates**: Track research progress
+- **Research History**: Access past queries
+- **PDF Export**: Download reports
+- **Research Management**: Terminate processes or delete records
+
+## Command Line Interface
+
+The CLI version allows you to:
+
+1. Choose between a quick summary or detailed report
+2. Enter your research query
+3. View results directly in the terminal
+4. Save reports automatically to the configured output directory
+
+## Development Setup
+
+If you want to develop or modify the package, you can install it in development mode:
+
+```bash
+# Clone the repository
+git clone https://github.com/LearningCircuit/local-deep-research.git
+cd local-deep-research
+
+# Install in development mode
+pip install -e .
+```
+
+This creates an "editable" installation that uses your local code, so any changes you make are immediately available without reinstalling.
+
+You can run the application directly using Python module syntax:
+
+```bash
+# Run the web interface
+python -m local_deep_research.web.app
+
+# Run the CLI version (not recommended)
+python -m local_deep_research.main
+```
+
+This approach is useful for development and debugging, as it provides more detailed error messages and allows you to make code changes on the fly.
+
+## Example Research
+
+The repository includes complete research examples like our [fusion energy research analysis](https://github.com/LearningCircuit/local-deep-research/blob/main/examples/fusion-energy-research-developments.md) showcasing the system's capabilities.
+
+## Community & Support
+
+Join our [Discord server](https://discord.gg/2E6gYU2Z) to exchange ideas, discuss usage patterns, and share research approaches.
+
## License
-This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
+This project is licensed under the MIT License.
## Acknowledgments
+
- Built with [Ollama](https://ollama.ai) for local AI processing
- - Multiple integrated search engines including Wikipedia, arXiv, PubMed, and more
+ - Search powered by multiple sources:
+ - [Wikipedia](https://www.wikipedia.org/) for factual knowledge (default search engine)
+ - [arXiv](https://arxiv.org/) for scientific papers
+ - [PubMed](https://pubmed.ncbi.nlm.nih.gov/) for biomedical literature
+ - [DuckDuckGo](https://duckduckgo.com) for web search
+ - [The Guardian](https://www.theguardian.com/) for journalism
+ - [SerpAPI](https://serpapi.com) for Google search results (requires API key)
+ - [SearXNG](https://searxng.org/) for local web-search engine
- 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
-- Uses [FAISS](https://github.com/facebookresearch/faiss) for vector similarity search
-- Uses [sentence-transformers](https://github.com/UKPLab/sentence-transformers) for embeddings
+- Uses [justext](https://github.com/miso-belica/justext), [Playwright](https://playwright.dev), [FAISS](https://github.com/facebookresearch/faiss), and more
## Contributing