sgr-agent-core  by vamplabAI

Automated research system using Schema-Guided Reasoning (SGR)

Created 4 months ago
915 stars

Top 39.8% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Schema-Guided Reasoning (SGR) Deep Research is an automated research system that guides Large Language Models (LLMs) to produce structured, clear, and predictable outputs by enforcing reasoning through a schema. It offers two versions: a classic, stable text-based interface and an enhanced streaming version with interactive animations and detailed metrics. This system is beneficial for users who need reliable, structured research outputs, especially when working with local LLMs that struggle with traditional function calling.

How It Works

SGR addresses the unreliability of function calling with local LLMs (under 32B parameters) by implementing a "Forced Reasoning" approach. Instead of relying on the model to decide when to call tools, SGR first generates a structured output (like JSON schema) representing the reasoning process and planned actions. This structured output is then executed deterministically, ensuring reliable tool usage and predictable outcomes. This method is advantageous for local models as it bypasses their limitations in accurately deciding when to invoke functions, leading to 100% accuracy on simple tasks.

Quick Start & Requirements

  • Classic Version: cd sgr-classic && python sgr-deep-research.py
  • Streaming Version: cd sgr-streaming && python sgr_streaming.py
  • Prerequisites: OpenAI and Tavily API keys (configure in config.yaml).
  • Dependencies: Python, specified in requirements.txt for each version.
  • Setup: Configure config.yaml with API keys, then install dependencies.
  • Demo: cd sgr-streaming && python demo_enhanced_streaming.py (full features) or python compact_streaming_example.py (compact example).

Highlighted Details

  • SGR ensures deterministic execution, crucial for local models (<32B parameters) where traditional function calling accuracy is low (<35%).
  • The streaming version offers an interactive interface with animations, schema trees, metrics, and visual pipeline tracking.
  • Supports core research capabilities: clarification questions, plan generation, web search, plan adaptation, and report creation.
  • Reports are saved in the reports/ directory, including executive summaries, technical analysis, key findings, and sources.

Maintenance & Community

The project is associated with the "neuraldeep community." Specific contributor or community links (like Discord/Slack) are not detailed in the provided README.

Licensing & Compatibility

The README does not explicitly state the license type or compatibility for commercial use.

Limitations & Caveats

The effectiveness of SGR is particularly highlighted for models under 32B parameters; for models 32B+, native function calling with SGR as a fallback is recommended. The README does not detail specific unsupported platforms or known bugs beyond fixes mentioned for the streaming version.

Health Check
Last Commit

6 days ago

Responsiveness

Inactive

Pull Requests (30d)
31
Issues (30d)
26
Star History
79 stars in the last 30 days

Explore Similar Projects

Starred by Ross Taylor Ross Taylor(Cofounder of General Reasoning; Cocreator of Papers with Code), Yaowei Zheng Yaowei Zheng(Author of LLaMA-Factory), and
3 more.

curator by bespokelabsai

0.2%
2k
Synthetic data curation tool for post-training and structured data extraction
Created 1 year ago
Updated 6 days ago
Feedback? Help us improve.