~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
Add better defaults for local collections in Docker.
Daniel Pettid164ae1abd2f
diff --git a/.gitignore b/.gitignoreindex bd0df22a82..4439279745 100644--- a/.gitignore+++ b/.gitignore@@ -108,3 +108,6 @@ simulation_*summary.md!data/optimization_results/.gitkeep**/.claude/settings.local.json++# Folders created by Docker.+local_collections/diff --git a/cookiecutter-docker/hooks/pre_prompt.py b/cookiecutter-docker/hooks/pre_prompt.pynew file mode 100644index 0000000000..27921ebf91--- /dev/null+++ b/cookiecutter-docker/hooks/pre_prompt.py@@ -0,0 +1,55 @@+import json+import os+import subprocess+from typing import Any, Dict+++def run_command(command: str):+ result = subprocess.run(command, shell=True, capture_output=True, text=True)+ return result.stdout.strip()+++def check_gpu(context: Dict[str, Any]) -> None:+ """+ Check if the system has an NVIDIA or AMD GPU and set flags in the+ context.++ Args:+ context: The context dictionary to update with GPU information.++ """+ gpu_info = run_command("lspci | grep -i 'vga'")++ if "NVIDIA" in gpu_info:+ print("Detected an Nvidia GPU.")+ context["_nvidia_gpu"] = True+ context["_amd_gpu"] = False+ context["enable_gpu"] = True+ elif "AMD" in gpu_info:+ print("Detected an AMD GPU.")+ context["_amd_gpu"] = True+ context["_nvidia_gpu"] = False+ context["enable_gpu"] = True+ else:+ print("Did not detect any GPU.")+ context["_nvidia_gpu"] = False+ context["_amd_gpu"] = False+ context["enable_gpu"] = False+++def main() -> None:+ # Load the context.+ with open("cookiecutter.json", "r") as config:+ context = json.load(config)++ # Check GPU information and update the context only if running on Linux.+ if os.name == "posix" and os.uname().sysname == "Linux":+ check_gpu(context)++ # Save the updated context back to cookiecutter.json.+ with open("cookiecutter.json", "w") as config:+ json.dump(context, config, indent=4)+++if __name__ == "__main__":+ main()diff --git a/cookiecutter-docker/{{cookiecutter.config_name}}/docker-compose.{{cookiecutter.config_name}}.yml b/cookiecutter-docker/{{cookiecutter.config_name}}/docker-compose.{{cookiecutter.config_name}}.ymlindex c9b448bc71..a9e3293978 100644--- a/cookiecutter-docker/{{cookiecutter.config_name}}/docker-compose.{{cookiecutter.config_name}}.yml+++ b/cookiecutter-docker/{{cookiecutter.config_name}}/docker-compose.{{cookiecutter.config_name}}.yml@@ -29,6 +29,9 @@ services:{% endif %}volumes:- ldr_data:/install/.venv/lib/python3.13/site-packages/data/+ - ./local_collections/personal_notes:/local_collections/personal_notes/+ - ./local_collections/project_docs:/local_collections/project_docs/+ - ./local_collections/research_papers:/local_collections/research_papers/restart: unless-stopped{%- if cookiecutter.enable_ollama or cookiecutter.enable_searxng %}depends_on:@@ -42,7 +45,11 @@ services:{%- if cookiecutter.enable_ollama %}ollama:+ {%- if cookiecutter.enable_gpu and cookiecutter._amd_gpu %}+ image: ollama/ollama:rocm+ {% else %}image: ollama/ollama:latest+ {% endif %}volumes:- ollama_data:/root/.ollama{%- if not cookiecutter.host_network %}@@ -50,6 +57,7 @@ services:- ldr-network{% endif %}{%- if cookiecutter.enable_gpu %}+ {%- if cookiecutter._nvidia_gpu %}deploy:resources:reservations:@@ -57,6 +65,11 @@ services:- driver: nvidiacount: allcapabilities: [gpu]+ {% elif cookiecutter._amd_gpu %}+ devices:+ - "/dev/kfd:/dev/kfd"+ - "/dev/dri:/dev/dri"+ {% endif %}{% endif %}restart: unless-stopped{% endif %}diff --git a/src/local_deep_research/defaults/default_settings.json b/src/local_deep_research/defaults/default_settings.jsonindex 352d8714ae..ec32e813b8 100644--- a/src/local_deep_research/defaults/default_settings.json+++ b/src/local_deep_research/defaults/default_settings.json@@ -991,7 +991,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["scientific papers","academic research",@@ -1014,7 +1014,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["non-academic topics","consumer products",@@ -1159,7 +1159,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["intelligent engine selection","adaptable to query type",@@ -1177,7 +1177,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["slightly slower due to LLM analysis"],@@ -1375,7 +1375,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["privacy-focused web search","product information",@@ -1410,7 +1410,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["requires API key with usage limits","smaller index than Google"@@ -1640,7 +1640,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["code repositories","software documentation",@@ -1675,7 +1675,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["non-technical content","content outside GitHub",@@ -1861,7 +1861,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["custom search scope","high-quality results",@@ -1895,7 +1895,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["requires API key with usage limits","limited to 10,000 queries/day on free tier",@@ -2025,7 +2025,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["searches all local collections","personal documents",@@ -2043,7 +2043,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["may return too many results","requires indexing"@@ -2232,9 +2232,9 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": [- "@format ${DOCS_DIR}/personal_notes"+ "/local_collections/personal_notes"],"visible": true},@@ -2262,7 +2262,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["personal knowledge","notes",@@ -2280,7 +2280,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["subjective content","informal information"@@ -2469,9 +2469,9 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": [- "@format ${DOCS_DIR}/project_documents"+ "/local_collections/project_docs/"],"visible": true},@@ -2499,7 +2499,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["project documentation","specifications",@@ -2517,7 +2517,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["no external information","limited to organizational knowledge"@@ -2730,7 +2730,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["biomedical literature","medical research",@@ -2751,7 +2751,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["non-medical topics","very recent papers may be missing",@@ -2941,9 +2941,9 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": [- "@format ${DOCS_DIR}/research_papers"+ "/local_collections/research_papers/"],"visible": true},@@ -2971,7 +2971,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["academic research","scientific papers",@@ -2989,7 +2989,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["potentially outdated","limited to collected papers"@@ -3062,7 +3062,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["general"],@@ -3231,7 +3231,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["comprehensive general information","current events and news",@@ -3270,7 +3270,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["requires self-hosting","depends on other search engines",@@ -3470,7 +3470,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["comprehensive web search","product information",@@ -3505,7 +3505,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["requires API key with usage limits","not specialized for academic content"@@ -3662,7 +3662,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["historical web content","archived websites",@@ -3696,7 +3696,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["limited to previously archived content","may miss recent changes",@@ -3868,7 +3868,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["factual information","general knowledge",@@ -3889,7 +3889,7 @@"options": null,"step": null,"type": "SEARCH",- "ui_element": "text",+ "ui_element": "json","value": ["recent events","specialized academic topics",