LLM-Reasoner  by harishsg993010

SDK for LLM step-by-step reasoning, like OpenAI o1 and Deepseek R1

created 6 months ago
489 stars

Top 64.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a framework for enabling Large Language Models (LLMs) to perform step-by-step reasoning, akin to OpenAI's O1 and DeepSeek's R1 models. It targets developers and researchers seeking transparency in LLM decision-making, offering a way to visualize and analyze the reasoning process.

How It Works

LLM-Reasoner facilitates step-by-step thinking by breaking down complex queries into sequential thought processes. It leverages the LiteLLM library to support a wide range of LLM providers, allowing users to choose their preferred models. The core advantage lies in its ability to expose the intermediate reasoning steps, providing insights into the LLM's "thought process" and confidence levels for each stage.

Quick Start & Requirements

  • Install: pip install llm-reasoner
  • Prerequisites: API keys for desired LLM providers (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY, VERTEX_PROJECT).
  • Usage:
    • List models: llm-reasoner models
    • Generate reasoning: llm-reasoner reason "How do planes fly?" --min-steps 5
    • Launch UI: llm-reasoner ui
  • SDK Example: See README for Python SDK usage.

Highlighted Details

  • Supports OpenAI, Anthropic, Google Gemini, Azure OpenAI, and custom models via LiteLLM.
  • Provides rich metadata per step: title, content, confidence score, and thinking time.
  • Offers both a Streamlit UI and a command-line interface (CLI) for interaction.
  • Allows custom model registration through Python API and CLI.

Maintenance & Community

  • Developed by Harish Santhanalakshmi Ganesan.
  • Community engagement details (e.g., Discord/Slack) are not explicitly mentioned in the README.

Licensing & Compatibility

  • License: MIT. Permissive for commercial use and closed-source linking, with a request for attribution.

Limitations & Caveats

The project is presented as a tool to make LLMs "think deeper," but the effectiveness and accuracy of the generated reasoning are dependent on the underlying LLM's capabilities and the specific prompt engineering employed by the framework.

Health Check
Last commit

5 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.