Chain-of-Recursive-Thoughts  by PhialsBasement

AI recursion framework for improved reasoning

created 3 months ago
2,255 stars

Top 20.5% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project introduces Chain of Recursive Thoughts (CoRT), a method to enhance AI model performance by enabling recursive self-critique and refinement. It's designed for users seeking to improve AI reasoning and problem-solving capabilities, particularly in tasks like programming, by making models "think harder."

How It Works

CoRT operates by having the AI generate an initial response, then recursively create and evaluate multiple alternative responses over several "thinking rounds." In each round, it generates three alternatives, assesses them, and selects the best one. This iterative refinement process, driven by self-evaluation and competitive generation, aims to produce a superior final output.

Quick Start & Requirements

  • Installation:
    • Web UI: Run start_recthink.bat (Windows).
    • Linux: pip install -r requirements.txt, cd frontend && npm install, cd .., then python ./recthink_web.py. For the UI demo, cd frontend && npm start in a new shell.
    • CLI: pip install -r requirements.txt, export OPENROUTER_API_KEY="your-key-here", python recursive-thinking-ai.py.
  • Prerequisites: OpenRouter API key.
  • Resources: Early development for the Web UI.

Highlighted Details

  • Demonstrates significant improvement on Mistral 3.1 24B for programming tasks.
  • Core mechanism involves self-evaluation, competitive alternative generation, and iterative refinement.
  • Dynamic thinking depth allows for adjustable levels of self-critique.

Maintenance & Community

  • The project is open for contributions via Pull Requests.
  • No specific community channels (Discord/Slack) or roadmap are mentioned.

Licensing & Compatibility

  • Licensed under MIT. Permissive for commercial use and integration with closed-source projects.

Limitations & Caveats

The Web UI is noted as being in early development. The effectiveness is primarily demonstrated on a specific model (Mistral 3.1 24B) and programming tasks, with broader applicability not yet detailed.

Health Check
Last commit

3 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.