NanoSage  by masterFoad

Local LLM powered recursive search and report generation

Created 7 months ago
252 stars

Top 99.6% on SourcePulse

GitHubView on GitHub
Project Summary

NanoSage is a local, recursive search and knowledge exploration tool designed for deep research. It assists users by systematically breaking down queries, building a knowledge base from local and web data, and dynamically exploring subqueries with a focus on relevance and depth. The tool is ideal for researchers, students, and power users seeking structured, in-depth reports generated via retrieval-augmented generation (RAG) on their own hardware.

How It Works

NanoSage employs a structured, relevance-driven recursive search pipeline. It refines user queries, builds a knowledge base from local files and web searches, and tracks its exploration progress via a Table of Contents (TOC). Monte Carlo-based exploration balances search breadth and depth, ranking subqueries by relevance to maintain precision. The system then generates a detailed Markdown report using RAG, integrating insights from the most valuable findings.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Prerequisites: Python 3.8+, Ollama with Gemma 2B model (ollama pull gemma2:2b). Optional GPU acceleration requires PyTorch with CUDA.
  • Run: python main.py --query "Your query here" --web_search --max_depth 2 --device cpu
  • Docs: Example Report

Highlighted Details

  • Recursive search with relevance-based subquery pruning.
  • Integrates local files (PDFs, text) and web search results.
  • Supports RAG with models like Gemma 2B for report generation.
  • Generates structured Markdown reports detailing the research journey.

Maintenance & Community

  • Project maintained by Foad Abo Dahood.
  • BibTeX and APA citation provided for academic use.

Licensing & Compatibility

  • MIT License. Permissive for commercial use and closed-source linking.

Limitations & Caveats

The system's effectiveness is dependent on the quality of the chosen retrieval model and the LLM used for summarization. Performance may vary based on hardware, especially when using CPU-only mode. Recursion depth and relevance thresholds require tuning for optimal results.

Health Check
Last Commit

7 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Nir Gazit Nir Gazit(Cofounder of Traceloop), and
4 more.

llmware by llmware-ai

0.6%
14k
Framework for enterprise RAG pipelines using small, specialized models
Created 2 years ago
Updated 1 month ago
Feedback? Help us improve.