pub struct QualityScoringEngine { /* private fields */ }Expand description
Main quality scoring engine
Implementations§
Source§impl QualityScoringEngine
impl QualityScoringEngine
Sourcepub fn with_config(config: ScoringConfig) -> Self
pub fn with_config(config: ScoringConfig) -> Self
Create a scoring engine with custom configuration
Sourcepub fn with_weights(weights: QualityWeights) -> Self
pub fn with_weights(weights: QualityWeights) -> Self
Create a scoring engine with custom weights
Sourcepub fn score_generation(
&self,
result: &GenerationResult,
context: &ScoringContext,
) -> Result<QualityMetrics>
pub fn score_generation( &self, result: &GenerationResult, context: &ScoringContext, ) -> Result<QualityMetrics>
Score a generation result
Sourcepub fn score_text(
&self,
text: &str,
context: &ScoringContext,
) -> Result<QualityMetrics>
pub fn score_text( &self, text: &str, context: &ScoringContext, ) -> Result<QualityMetrics>
Score a text directly (without GenerationResult)
Sourcepub fn improvement_recommendations(
&self,
metrics: &QualityMetrics,
) -> Vec<ImprovementRecommendation>
pub fn improvement_recommendations( &self, metrics: &QualityMetrics, ) -> Vec<ImprovementRecommendation>
Generate improvement recommendations based on metrics
Sourcepub fn track_quality_over_time(&self, metrics: QualityMetrics)
pub fn track_quality_over_time(&self, metrics: QualityMetrics)
Track quality metrics over time
Sourcepub fn compare_generations(
&self,
first: &QualityMetrics,
second: &QualityMetrics,
) -> ComparisonResult
pub fn compare_generations( &self, first: &QualityMetrics, second: &QualityMetrics, ) -> ComparisonResult
Compare two generations
Sourcepub fn get_quality_trends(&self, window: Option<usize>) -> Option<TrendAnalysis>
pub fn get_quality_trends(&self, window: Option<usize>) -> Option<TrendAnalysis>
Get quality trends from history
Sourcepub fn visualize_trends(&self, width: usize) -> String
pub fn visualize_trends(&self, width: usize) -> String
Visualize quality trends as ASCII chart
Sourcepub fn export_metrics_json(&self) -> Result<String>
pub fn export_metrics_json(&self) -> Result<String>
Export metrics history as JSON
Sourcepub fn clear_history(&self)
pub fn clear_history(&self)
Clear history
Sourcepub fn config(&self) -> &ScoringConfig
pub fn config(&self) -> &ScoringConfig
Get current configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QualityScoringEngine
impl !RefUnwindSafe for QualityScoringEngine
impl Send for QualityScoringEngine
impl Sync for QualityScoringEngine
impl Unpin for QualityScoringEngine
impl UnsafeUnpin for QualityScoringEngine
impl !UnwindSafe for QualityScoringEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more