-
Notifications
You must be signed in to change notification settings - Fork 0
Extending PrismBench
Comprehensive guide to extending the PrismBench framework with custom components
PrismBench is designed with extensibility at its core. The framework provides three primary extension points that allow you to customize behavior for your specific evaluation needs:
Create custom LLM agents with specialized prompts, behaviors, and interaction patterns.
Use Cases:
- Custom problem generators for domain-specific challenges
- Specialized solution validators
- Domain-expert evaluators
- Multi-modal agents
Build custom evaluation environments with specialized workflows and agent orchestration.
Use Cases:
- Multi-step problem solving environments
- Interactive coding challenges
- Domain-specific evaluation workflows
- Custom test generation and validation
Implement custom MCTS phases with specialized search strategies and evaluation objectives.
Use Cases:
- Alternative exploration strategies
- Domain-specific scoring functions
- Multi-objective optimization phases
- Custom convergence criteria
PrismBench uses a registry pattern for all extensions, enabling:
- Plugin Architecture: Extensions are automatically discovered and loaded
- Decorator-Based Registration: Simple decorators register new components
- Runtime Resolution: Components are resolved dynamically at execution time
- Configuration-Driven: All behavior customizable through YAML files
graph TD
A[PrismBench Core] --> B[Agent Registry]
A --> C[Environment Registry]
A --> D[Phase Registry]
B --> E[Custom Agents]
C --> F[Custom Environments]
D --> G[Custom Phases]
E --> H[Agent Configs]
F --> I[Environment Configs]
G --> J[Phase Configs]
| Extension Type | Use Case |
|---|---|
| Agent | Custom prompts, specialized behaviors |
| Environment | Custom workflows, agent orchestration |
| Phase | Search strategies, evaluation objectives |
- Create your extension using the provided templates
- Configure behavior through YAML files
- Test your extension with the framework
- Deploy by placing files in the appropriate directories
All extensions integrate seamlessly:
# Extensions are automatically discovered
from src.services.llm_interface.src.llm.interface import LLMInterface
from src.services.environment.src.environment.utils import create_environment
from src.services.search.src.mcts.utils import create_phase
# Use your custom components
custom_environment = create_environment("my_custom_environment")
custom_phase = create_phase("my_custom_phase", tree, environment, config)The true power of PrismBench comes from combining extensions:
- Follow Naming Conventions: Use descriptive, consistent names
- Document Thoroughly: Include docstrings and configuration examples
- Async Operations: Use async/await for IO-bound operations
- Resource Management: Properly cleanup resources (sessions, files)
- Configuration Schema: Follow existing YAML patterns
- Error Handling: Use framework exception types
- State Management: Leverage framework session management
- Follow the Contributing Guide
- Test thoroughly with multiple scenarios
- Document usage and configuration
- Submit pull request with examples
Coming soon
- Architecture Overview - Framework design
- Configuration Guide - YAML configuration
- API Reference - Service APIs
- Custom Agents - Creating specialized agents with custom prompts
- Custom Environments - Building custom evaluation environments
- Custom MCTS Phases - Implementing custom search strategies
- Extension Combinations - Advanced extension strategies
- Architecture Overview - Framework design and components
- Agent System - Multi-agent architecture
- Environment System - Evaluation environments
- MCTS Algorithm - Monte Carlo Tree Search
- Quick Start - Basic setup and first run
- Configuration Overview - Configuration system
- Troubleshooting - Common issues and solutions
MCTS System
- MCTS Algorithm
- Core MCTS Process
- Key Components
- PrismBench's Three-Phase MCTS
- Tree Structure
- Node Structure
Agent System
Environment System
- Environment Overview
- Environment Types
- Environment Registry
- Agent Integration
- Environment Configuration
Main Configuration
- Configuration Overview
- Agent Configurations
- Environment Configurations
- Phase Configurations
- Tree Configurations
Extension