{"id":27945728,"url":"https://github.com/PhialsBasement/Chain-of-Recursive-Thoughts","last_synced_at":"2025-05-07T13:01:41.116Z","repository":{"id":290148534,"uuid":"973519535","full_name":"PhialsBasement/Chain-of-Recursive-Thoughts","owner":"PhialsBasement","description":"I made my AI think harder by making it argue with itself repeatedly. It works stupidly well.","archived":false,"fork":false,"pushed_at":"2025-04-27T08:12:51.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-27T09:23:12.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PhialsBasement.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-27T06:53:09.000Z","updated_at":"2025-04-27T09:08:23.000Z","dependencies_parsed_at":"2025-04-27T09:02:05.221Z","dependency_job_id":null,"html_url":"https://github.com/PhialsBasement/Chain-of-Recursive-Thoughts","commit_stats":null,"previous_names":["phialsbasement/cort---chain-of-recursive-thoughts","phialsbasement/chain-of-recursive-thoughts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhialsBasement%2FChain-of-Recursive-Thoughts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhialsBasement%2FChain-of-Recursive-Thoughts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhialsBasement%2FChain-of-Recursive-Thoughts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhialsBasement%2FChain-of-Recursive-Thoughts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhialsBasement","download_url":"https://codeload.github.com/PhialsBasement/Chain-of-Recursive-Thoughts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252883219,"owners_count":21819157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T13:01:18.005Z","updated_at":"2025-05-07T13:01:41.093Z","avatar_url":"https://github.com/PhialsBasement.png","language":"Python","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# CoRT (Chain of Recursive Thoughts) 🧠🔄\n\n## TL;DR: I made my AI think harder by making it argue with itself repeatedly. It works stupidly well.\n\n### What is this?\nCoRT 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.\n\n### Does it actually work?\nYES. 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.\n\n\n## How it works\n1. AI generates initial response\n2. AI decides how many \"thinking rounds\" it needs\n3. For each round:\n   - Generates 3 alternative responses\n   - Evaluates all responses\n   - Picks the best one\n4. Final response is the survivor of this AI battle royale\n\n\n## How to use the Web UI(still early dev)\n1. Open start_recthink.bat\n2. wait for a bit as it installs dependencies\n3. profit??\n\nIf running on linux:\n```\npip install -r requirements.txt\ncd frontend \u0026\u0026 npm install\ncd ..\npython ./recthink_web.py\n```\n\n(open a new shell)\n\n```\ncd frontend\nnpm start\n```\n\n\n## Examples\n\n\nMistral 3.1 24B + CoRT\n![rec](https://github.com/user-attachments/assets/acbcf1f9-4715-4d2c-a31c-38b349602380)\n\nMistral 3.1 24B non CoRT\n![non-rec](https://github.com/user-attachments/assets/9c4f6af9-0a8f-4c62-920c-f272fce225c1)\n\n\n## Try it yourself\n```python\npip install -r requirements.txt\nexport OPENROUTER_API_KEY=\"your-key-here\"\npython recursive-thinking-ai.py\n```\n\n### The Secret Sauce\nThe magic is in:\n\n - Self-evaluation\n - Competitive alternative generation\n - Iterative refinement\n - Dynamic thinking depth\n\n\n\n## Star History(THANK YOU SO MUCH)\n\n\u003ca href=\"https://www.star-history.com/#PhialsBasement/Chain-of-Recursive-Thoughts\u0026Timeline\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=PhialsBasement/Chain-of-Recursive-Thoughts\u0026type=Timeline\u0026theme=dark\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=PhialsBasement/Chain-of-Recursive-Thoughts\u0026type=Timeline\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=PhialsBasement/Chain-of-Recursive-Thoughts\u0026type=Timeline\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n\n\n\n### Contributing\nFound a way to make it even better? PR's welcome!\n\n### License\nMIT - Go wild with it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPhialsBasement%2FChain-of-Recursive-Thoughts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPhialsBasement%2FChain-of-Recursive-Thoughts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPhialsBasement%2FChain-of-Recursive-Thoughts/lists"}