FAQ
This FAQ section addresses common questions and concerns about the Opik Optimizer, providing clear and concise answers to help users effectively utilize the tool.
Model Configuration
Q: What should I pass in the model parameter when using Azure OpenAI?
A: When using Azure OpenAI, use the following format:
Supported Azure OpenAI models:
azure/gpt-4
azure/gpt-3.5-turbo
For regular OpenAI models, use:
openai/gpt-4
openai/gpt-3.5-turbo
Algorithm Understanding
Q: Is there any document which explains how these optimization algorithms work?
A: Yes, we have detailed documentation about how the optimization algorithms work:
-
Core Concepts: See our Core Concepts documentation for an overview of the optimization process.
-
Optimizer Details: The Optimization Algorithm documentation provides in-depth information about each optimizer, including:
- How they work
- Algorithm details
- Research papers and references
- Configuration options
-
Research Papers: Each optimizer’s documentation includes links to relevant research papers that explain the underlying algorithms.
Dataset Requirements
Q: What is the recommended number of records for the optimization algorithm?
A: We recommend the following dataset sizes:
- Minimum: 50 examples
- Provides basic coverage for optimization.
- Suitable for simple use cases.
- Optimal: 100-500 examples
- Better representation of real-world scenarios.
- More reliable optimization results.
- Maximum: Context window dependent
- Limited by model’s maximum context length.
For more details, see our Datasets and Testing documentation.
Q: Does the algorithm use input and output data to optimize the prompt?
A: Yes, the optimization process uses both input and output data in several ways:
-
Pattern Recognition
- Analyzes input-output relationships.
- Identifies successful patterns.
- Learns from examples.
-
Prompt Refinement
- Uses output data to guide prompt improvements.
- Tests against validation data.
- Iteratively optimizes based on results.
For a detailed explanation, see the Optimization Process section in our documentation.
General Questions
Q: How do I get started with Opik Optimizer?
A: Follow these steps:
-
Install the package:
-
Review the Quickstart documentation.
-
Start with a simple example and gradually add complexity.
Q: What models are supported?
A: Opik Optimizer supports:
-
OpenAI Models
- GPT-4
- GPT-3.5 Turbo
-
Azure OpenAI Models
- GPT-4
- GPT-3.5 Turbo
-
All models support by LiteLLM
Q: How do I evaluate the results?
A: The optimizer provides several ways to evaluate results:
-
Built-in Metrics
- Accuracy
- Precision
- Recall
- F1 Score
-
Custom Metrics
- You can define your own evaluation metrics.
- Implement custom scoring functions.
-
Validation Results
- Training accuracy
- Validation accuracy
- Improvement percentage
See the Testing Methodology section for more details.
Troubleshooting
Q: What should I do if the optimization isn’t improving results?
A: Try these steps:
-
Check Dataset
- Ensure sufficient examples.
- Verify data quality.
- Check for diversity.
-
Adjust Parameters
- Try different temperature values.
- Increase number of trials.
- Enable multi-agent optimization.
-
Review Configuration
- Verify model selection.
- Check parameter settings.
- Ensure proper validation split.
Q: How can I optimize for specific use cases?
A: Consider these approaches:
-
Custom Metrics
- Define domain-specific metrics.
- Implement custom evaluation.
- Focus on relevant aspects.
-
Parameter Tuning
- Adjust for your specific needs.
- Experiment with settings.
- Document successful configurations.
-
Data Preparation
- Include relevant examples.
- Cover edge cases.
- Ensure proper representation.
Next Steps
- Explore API Reference for detailed technical documentation.
- Review the Optimizers for algorithm-specific information.