Autoresearch Optimization Loop
Automates the iterative optimization of code and prompts through continuous LLM-driven experimentation and evaluation.
The Autoresearch Loop (M4) skill implements an automated optimization engine for your codebase and prompts, inspired by Andrej Karpathy's research patterns. It operates by identifying optimization targets, generating improvement hypotheses via LLM, and rigorously testing them against predefined evaluation criteria. By maintaining a detailed state history in JSONL format, the skill ensures that only performance-enhancing changes are retained, effectively creating a self-improving development loop that tracks experiments, avoids regressions, and stops automatically once optimal results are achieved.
Key Features
01Support for targeted optimization by rank or custom state directories
02Smart early-stopping logic to prevent wasted compute on diminishing returns
03Comprehensive experiment tracking via persistent JSONL state files
04Automated hypothesis generation and patching for iterative code improvement
05Score-based evaluation system that preserves only high-performing changes
060 GitHub stars
Use Cases
01Automating A/B testing for different algorithmic implementation strategies
02Iteratively refactoring code logic to meet specific functional requirements
03Optimizing complex system prompts for better LLM output quality