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.

updated readme

LearningCircuit49bd120055e5
diff --git a/README.md b/README.md
index d97bdbcd13..c798345886 100644
--- a/README.md
+++ b/README.md
@@ -80,7 +80,7 @@ When you first run the tool, it creates these configuration files:
## Setting Up AI Models
-You can use either local or cloud-based models:
+The system supports multiple LLM providers:
### Local Models (via Ollama)
@@ -93,18 +93,49 @@ You can use either local or cloud-based models:
Edit your `.secrets.toml` file to add API keys:
```toml
-ANTHROPIC_API_KEY = "your-api-key-here" # For Claude models
-OPENAI_API_KEY = "your-openai-key-here" # For GPT models
+ANTHROPIC_API_KEY = "your-api-key-here" # For Claude models
+OPENAI_API_KEY = "your-openai-key-here" # For GPT models
+OPENAI_ENDPOINT_API_KEY = "your-key-here" # For OpenRouter or similar services
```
Then edit `llm_config.py` to change the default provider:
```python
-# Change from OLLAMA to OPENAI or ANTHROPIC
-DEFAULT_PROVIDER = ModelProvider.OPENAI
-DEFAULT_MODEL = "gpt-4o" # Choose your model
+# Set your preferred model provider here
+DEFAULT_PROVIDER = ModelProvider.OPENAI # Change to your preferred provider
+
+# Set your default model name here
+DEFAULT_MODEL = "gpt-4o" # Change to your preferred model
+```
+
+### Supported LLM Providers
+
+The system supports multiple LLM providers:
+
+| Provider | Type | Configuration | Notes |
+|----------|------|--------------|-------|
+| `OLLAMA` | Local | No API key needed | Default - install from ollama.ai |
+| `OPENAI` | Cloud | Requires `OPENAI_API_KEY` | GPT models (3.5, 4, 4o) |
+| `ANTHROPIC` | Cloud | Requires `ANTHROPIC_API_KEY` | Claude models (3 Opus, Sonnet, Haiku) |
+| `OPENAI_ENDPOINT` | Cloud | Requires `OPENAI_ENDPOINT_API_KEY` | For any OpenAI-compatible API |
+| `VLLM` | Local | No API key needed | For hosting models via vLLM |
+
+You can configure the OpenAI-compatible endpoint URL in `llm_config.py`:
+
+```python
+# For OpenRouter, Together.ai, Azure OpenAI, or any compatible endpoint
+OPENAI_ENDPOINT_URL = "https://openrouter.ai/api/v1"
```
+The `OPENAI_ENDPOINT` provider can access any service with an OpenAI-compatible API, including:
+- OpenRouter (access to hundreds of models)
+- Azure OpenAI
+- Together.ai
+- Groq
+- Anyscale
+- Self-hosted LLM servers with OpenAI compatibility
+- Any other service that implements the OpenAI API specification
+
## Setting Up Search Engines
The system includes multiple search engines. Some require API keys:
@@ -154,36 +185,60 @@ cache_dir = "__CACHE_DIR__/local_search/project_docs"
You can use local document search in several ways:
-1. **Auto-selection**: Set `search_tool = "auto"` in `config.py` and the system will automatically use your local collections when appropriate for the query.
+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
+
+## 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 |
+| `wayback` | Historical web content | No |
+| `searxng` | Local web search engine | No (requires server) |
+| Any collection name | Search your local documents | No |
+
+> **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)
+
+## 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"
-### Search Engine Options
+# Number of research cycles
+iterations = 2
-The system supports multiple search engines that can be selected by changing the `search_tool` variable in `config.py`:
+# Questions generated per cycle
+questions_per_iteration = 2
-- **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`): 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
+# Results per search query
+max_results = 50
-> **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.
+# Results after relevance filtering
+max_filtered_results = 5
-> **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 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)
+# More settings available...
+```
## Web Interface
@@ -225,7 +280,7 @@ You can run the application directly using Python module syntax:
# Run the web interface
python -m local_deep_research.web.app
-# Run the CLI version (not recommended)
+# Run the CLI version
python -m local_deep_research.main
```