# Building a Scikit-Learn Framework for Recursive Self-Improvement

Gear framework optimizes agentic workflows through meta-learning and structured evaluation pipelines.

- **Source:** [r/MachineLearning](https://www.reddit.com/r/MachineLearning)
- **Published:** 2026-10-31
- **Topic:** [Data & AI](https://brifing.si/c/data-ai)
- **Original article:** <https://www.reddit.com/r/MachineLearning/comments/1xkeq7d/i_built_a_scikitlearn_for_rsi_p/>
- **On Brifing:** https://brifing.si/s/101b5a17-a1b7-4184-810b-5392834b6171

## Standardizing Agentic Search

The Gear framework addresses critical bottlenecks in recursive self-improvement by separating search decisions from execution and evaluation. Inspired by meta-learning, it tackles sampling efficiency, variant evaluation, and population diversity. This architecture aims to provide a scikit-learn-like experience for researchers implementing complex agentic approaches such as GEPA, RRSI, and Harness².

## Meta-Agent Workflow Integration

In this system, a primary task agent generates execution traces while a meta-agent analyzes these outputs. The meta-agent utilizes evaluation feedback to iteratively improve prompts, tool usage, workflows, and context management. By implementing shared failure diagnosis and staged evaluation, the framework ensures that improvements are systematically validated before integration.

## Performance Gains on Benchmarks

Testing with GPT 5.6 Luna at medium reasoning effort revealed significant performance improvements across multiple benchmarks. On AutomationBench Marketing, task pass rates rose from 27.0% to 40.0%. Similarly, Terminal-Bench results improved from 52.8% to 62.9% when using the Gear-optimized DSH, demonstrating the framework's efficacy in complex, multi-step terminal environments.

## Partial Completion and Success

At maximum reasoning effort on the Marketing benchmark, the optimized harness achieved 88.88% objective completion compared to 84.08% for the Astra and Codex combination. While strict task pass rates were 53% versus 57%, the primary advantage of the Gear framework was observed in higher rates of partial task completion.

## Significant API Cost Reduction

Cost efficiency remains a major highlight of the implementation. When utilizing the same optimized DSH at maximum effort, Luna’s estimated API cost averaged $0.0568 per task. This represents a 95.21% reduction compared to the $1.1858 cost incurred by the Astra model, excluding infrastructure and optimization overheads during the evaluation.

## Addressing Evolutionary Search Challenges

The project directly confronts the common pitfalls of evolutionary search in agentic systems. By focusing on how to find promising changes efficiently, the team aims to prevent premature convergence. The framework provides a structured environment to test how new variants improve agent performance, ensuring that diversity is maintained throughout the process.

## Current Framework Capabilities

The current iteration of the framework includes a fully functional GEPA variant. It leverages staged evaluation to process agent feedback, allowing for more granular control over the improvement cycle. Developers can now compare different agentic strategies more easily, as the framework abstracts the underlying complexity of the search and evaluation logic.

## Future Research and Feedback

The developers are actively seeking community feedback regarding candidate evaluation strategies and methods for preserving diversity under constrained computational budgets. As the project matures, the goal is to expand the library of supported algorithms, making it a robust tool for researchers working on autonomous agentic systems and recursive self-improvement.

## Sources covering this story

- https://www.reddit.com/r/MachineLearning/comments/1xkeq7d/i_built_a_scikitlearn_for_rsi_p/ — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
