PitchHut logo
Recursive Companion
A meta-framework enabling self-improvement for LLMs with clarity.
Pitch

Recursive Companion offers a unique three-phase architecture for LLM agents, empowering them to critique and enhance their outputs. This transparency features a complete audit trail of decisions, making reasoning inspectable and fostering improved performance. Embrace clear and systematic self-improvement for LLMs with this innovative framework.

Description

Recursive Companion: A Meta-Framework for Self-Improving LLMs

Recursive Companion is an innovative meta-framework designed for developing self-improving agents capable of transparent reasoning. It operates on a robust three-phase iterative refinement architecture, where Large Language Model (LLM) agents not only generate outputs but also critique and enhance their own responses. This contrasts sharply with traditional systems that only provide single-pass outputs. Each instance of an agent fully tracks its revision history, enabling transparency and debug-ability in decision-making.

Sequence Flow
See the detailed Architecture Documentation for an in-depth look at its system design.

Key Features

  • Transparent Reasoning: Recursive Companion stands out by allowing users to understand the rationale behind decisions. Every agent maintains a detailed audit trail of critique-revision cycles, providing insight into the reasoning process.

  • Iterative Self-Improvement: Unlike systems offering isolated responses, RC agents continuously refine their outputs through systematic self-critiquing, enabling deeper thought processes.

  • Flexible Template Loading: Abilities to construct nuanced analytical patterns through the build_templates() utility. Users can manage and modify templates at various levels:

    • System Templates: Define the characteristics of the agent.
    • User Templates: Specify the tasks to be performed.
    • Protocols: Influence the analytical methods employed throughout the process.

Unique Code Patterns

Code PatternImportanceRarity in OSS
Automatic Self-ImprovementEnables efficient multi-level refinement without manual setup✓✓
Global Protocol AdjustmentModify reasoning style universally with a single update
Text-based TemplatesFacilitates version control and hot reloading without restarts
Simple Agent InheritanceQuickly create new domain-specific companions with minimal coding✓✓
Integrated Run Log TrackingHistorical analysis of decisions made throughout iterations✓✓

Getting Started with Recursive Companion

Recursive Companion allows for varied levels of engagement based on user familiarity and needs:

Level 1: Quick Usage

from recursive_companion import MarketingCompanion

# Instantiate an agent
agent = MarketingCompanion("gpt-4o-mini")

# Generate a refined output through critique cycles
answer = agent("Why did engagement drop 30% ... ?")
print(answer)  
# Examine iteration details
print(f"Iterations: {len(agent.run_log)}")

Level 2: Compose and Customize

# Configure agents for diverse use scenarios
custom_agent = MarketingCompanion(temperature=0.9, max_loops=5)

# Generate and view a detailed evolution of the response
answer, history = custom_agent.loop("Analyze Q3 performance trends...")
print(custom_agent.transcript_as_markdown())

Architecture Overview

The structure encourages clarity and separation of concerns among various roles:

  • Engineers: core/chains.py—manages the engine and iteration process.
  • Users: recursive_companion/base.py—defines user interactions with agents.

Production Features

Recursive Companion emphasizes observability and flexibility, offering:

  • Live Observability: With verbose mode to showcase real-time thinking processes.
  • Transcript Capture: Full access to run logs and detailed analysis cycles, which aids debugging.
  • Configurability: Offers high adaptability through instance-level settings and hot-reload templates.

Future Potential

Recursive Companion opens pathways for advanced research into agent collaboration and enhanced problem-solving models. The framework inherently supports integrations and further explorations into recursive methodologies across various disciplines.

Through a structured design that reflects the nature of collaborative human-AI efforts, Recursive Companion marks a notable advancement in creating interconnected, intelligent, and adaptable software agents.

0 comments

No comments yet.

Sign in to be the first to comment.