PhialsBasement/Chain-of-Recursive-Thoughts
PhialsBasement/Chain-of-Recursive-Thoughts has 2,326 GitHub stars and 119 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-08 20:58 UTC. Last push 2025-05-02.
I made my AI think harder by making it argue with itself repeatedly. It works stupidly well.
Measured star growth
- in 24h
- +1
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalCoRT (Chain of Recursive Thoughts) 🧠🔄
TL;DR: I made my AI think harder by making it argue with itself repeatedly. It works stupidly well.
What is this?
CoRT makes AI models recursively think about their responses, generate alternatives, and pick the best one. It's like giving the AI the ability to doubt itself and try again... and again... and again.
Does it actually work?
YES. I tested it with Mistral 3.1 24B and it went from "meh" to "holy crap", especially for such a small model, at programming tasks.
How it works
- AI generates initial response
- AI decides how many "thinking rounds" it needs
- For each round:
- Generates 3 alternative responses
- Evaluates all responses
- Picks the best one
- Final response is the survivor of this AI battle royale
How to use the Web UI(still early dev)
- Open start_recthink.bat
- wait for a bit as it installs dependencies
- profit??
If running on linux:
pip install -r requirements.txt
cd frontend && npm install
cd ..
python ./recthink_web.py
(open a new shell)
cd frontend
npm start
Examples
Mistral 3.1 24B + CoRT
Mistral 3.1 24B non CoRT
Try it yourself
pip install -r requirements.txt
export OPENROUTER_API_KEY="your-key-here"
python recursive-thinking-ai.py
The Secret Sauce
The magic is in:
- Self-evaluation
- Competitive alternative generation
- Iterative refinement
- Dynamic thinking depth
Star History(THANK YOU SO MUCH)
Contributing
Found a way to make it even better? PR's welcome!
License
MIT - Go wild with it
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,115 starspublic-apis/public-apis
A collective list of free APIs
497,348 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
444,198 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,208 stars