# Returns a parsed Pydantic object, not raw text
analysis = call_model(
    messages=[{"role": "user", "content": "Analyze this prompt: ..."}],
    model=self.model,
    response_model=PromptAnalysis,
    project_name=self.project_name,
)

print(analysis.issues)      # ['Issue 1', 'Issue 2']
print(analysis.suggestions) # ['Suggestion 1', ...]
```

## How to Contribute

Opik is continuously evolving, and community contributions are valuable!

* **Feature Requests & Ideas**: If you have ideas for new optimization algorithms, features, or
  improvements to existing ones, please share them through our community channels or by raising an
  issue on our [GitHub repository](https://github.com/comet-ml/opik).
* **Bug Reports**: If you encounter issues or unexpected behavior, detailed bug reports are greatly
  appreciated.
* **Use Cases & Feedback**: Sharing your use cases and how Opik Agent Optimizer is (or isn't)
  meeting your needs helps us prioritize development.
* **Code Contributions**: Pull requests for new optimizers are welcome! See the
  [contribution guide](/contributing/guides/agent-optimizer-sdk) for detailed instructions.

## Key Takeaways

* Extend `BaseOptimizer` to create custom optimization algorithms with full access to Opik's infrastructure
* Define `DEFAULT_PROMPTS` for your algorithm's internal prompts - users can customize these via `prompt_overrides`
* Implement `optimize_prompt()` with your optimization logic, using the inherited `evaluate_prompt()` to score candidates
* Return standardized `OptimizationResult` objects for consistent reporting and dashboard integration
* Use `_llm_calls.call_model()` for LLM interactions with automatic cost/usage tracking

We encourage you to explore the existing [optimizer algorithms](/agent_optimization/algorithms/overview) to see different approaches to these challenges.

## Related

* [Custom optimizer prompts](/agent_optimization/advanced/prompt_customization) - Customize internal prompts
* [Custom metrics](/agent_optimization/advanced/custom_metrics) - Build evaluation metrics
* [API Reference](/agent_optimization/advanced/api_reference) - Full parameter documentation