Your LLM, but it argues with itself until the answer improves
CoRT makes an LLM recursively debate its own output until the surviving response is the one worth keeping.

What it does
CoRT is an inference-time wrapper that treats an LLM’s first response as a rough draft. The model then spawns up to three alternative answers per round, scores the batch, and promotes the winner to the next iteration. After a dynamically chosen number of rounds, the final survivor is returned as the output. The author tested it primarily with Mistral 3.1 24B via the OpenRouter API and reports a noticeable jump in programming-task quality.
The interesting bit
The twist is that the LLM itself decides how many thinking rounds it needs, acting as both contestant and judge in what the README calls an “AI battle royale.” It is a compact, scriptable take on self-refinement that does not require model retraining or external critics—just repeated API calls.
Key highlights
- Dynamic depth: the model chooses how many recursive rounds to run rather than using a fixed count.
- Competitive generation: each round produces three alternative responses that fight for survival.
- Self-evaluation: the same model judges its own candidates, so no secondary classifier is needed.
- Early web UI: a frontend exists, though the README labels it “still early dev.”
- MIT licensed, with a lightweight Python backend and a JavaScript frontend.
Caveats
- The quality claims are anecdotal: the README cites a jump from “meh” to “holy crap” on Mistral 3.1 24B for programming tasks, but no formal benchmarks or comparisons are provided.
- The project requires an OpenRouter API key, so it is not a fully offline, self-contained tool.
- The web UI is explicitly marked as early development, so the polished interface is not the main attraction.
Verdict
Worth a look if you are experimenting with inference-time techniques to squeeze better reasoning out of small or mid-sized LLMs without fine-tuning. Skip it if you need rigorous, benchmarked evaluation or a production-ready interface.
Frequently asked
- What is PhialsBasement/Chain-of-Recursive-Thoughts?
- CoRT makes an LLM recursively debate its own output until the surviving response is the one worth keeping.
- Is Chain-of-Recursive-Thoughts open source?
- Yes — PhialsBasement/Chain-of-Recursive-Thoughts is open source, released under the MIT license.
- What language is Chain-of-Recursive-Thoughts written in?
- PhialsBasement/Chain-of-Recursive-Thoughts is primarily written in JavaScript.
- How popular is Chain-of-Recursive-Thoughts?
- PhialsBasement/Chain-of-Recursive-Thoughts has 2.3k stars on GitHub.
- Where can I find Chain-of-Recursive-Thoughts?
- PhialsBasement/Chain-of-Recursive-Thoughts is on GitHub at https://github.com/PhialsBasement/Chain-of-Recursive-Thoughts.