# Functions
DefaultOptimizationConfig returns a default configuration for prompt optimization.
No description provided by the author
NewPromptOptimizer creates a new instance of PromptOptimizer with the given configuration.
OptimizePrompt performs automated optimization of an LLM prompt and generates a response.
WithCustomMetrics sets custom evaluation metrics for the optimizer.
WithIterationCallback sets a callback function to be called after each iteration.
WithIterations sets the maximum number of optimization iterations.
WithMaxRetries sets the maximum number of retry attempts per iteration.
WithMemorySize sets the number of recent optimization entries to keep in memory.
WithOptimizationGoal sets the target goal for optimization.
WithRatingSystem sets the rating system to use (numerical or letter grades).
WithRetryDelay sets the delay duration between retry attempts.
WithThreshold sets the minimum acceptable score threshold.
# Structs
No description provided by the author
LetterRating implements OptimizationRating using a letter grade system.
Metric represents a quantitative or qualitative measure of prompt performance.
NumericalRating implements OptimizationRating using a numerical score system.
OptimizationConfig holds the configuration parameters for prompt optimization.
OptimizationEntry represents a single step in the optimization process, containing both the prompt and its assessment.
OptimizerConfig is PromptOptimizer config.
PromptAssessment provides a comprehensive evaluation of a prompt's quality including metrics, strengths, weaknesses, and suggestions for improvement.
PromptImprovement represents improvement for the prompt.
PromptOptimizer orchestrates the prompt optimization process.
Strength represents a positive aspect of the prompt with a concrete example.
Suggestion represents a proposed improvement to the prompt with impact estimation.
Weakness represents an area for improvement in the prompt with a concrete example.
# Interfaces
No description provided by the author
OptimizationRating defines the interface for different rating systems used in prompt optimization.
# Type aliases
IterationCallback is a function type for monitoring optimization progress.
OptimizerOption is a function type for configuring the PromptOptimizer.
No description provided by the author