pub struct ResearchSession {Show 14 fields
pub prompt: String,
pub provider: String,
pub model: String,
pub transform: String,
pub runs: u32,
pub total_tokens: usize,
pub total_transformed: usize,
pub vocabulary_diversity: f64,
pub mean_token_length: f64,
pub mean_perplexity: Option<f64>,
pub mean_confidence: Option<f64>,
pub top_perplexity_tokens: Vec<String>,
pub estimated_cost_usd: f64,
pub citation: String,
}Expand description
Aggregated statistics from one or more headless inference runs.
Produced by run_research_headless. Fields summarise token-level metrics
across all runs; fields that require logprob data are Option because not
all providers expose logprobs (Anthropic does not).
Fields§
§prompt: StringThe prompt submitted to the provider for all runs in this session.
provider: StringProvider identifier ("openai", "anthropic", or "mock").
model: StringModel identifier used for all runs (e.g. "gpt-4").
transform: StringTransform applied to intercepted tokens (e.g. "reverse").
runs: u32Number of inference runs executed.
total_tokens: usizeTotal tokens streamed across all runs.
total_transformed: usizeTotal tokens that had a transform applied across all runs.
vocabulary_diversity: f64Unique-token fraction: unique_tokens / total_tokens.
mean_token_length: f64Mean character length of all original (pre-transform) tokens.
mean_perplexity: Option<f64>Mean per-token perplexity across all runs, or None when unavailable.
mean_confidence: Option<f64>Mean per-token model confidence across all runs, or None when unavailable.
top_perplexity_tokens: Vec<String>The 10 tokens with the highest perplexity values (most uncertain positions).
estimated_cost_usd: f64Rough cost estimate in USD based on token count and GPT-3.5 pricing.
citation: StringHuman-readable citation string recording key run parameters for reproducibility.
Trait Implementations§
Source§impl Clone for ResearchSession
impl Clone for ResearchSession
Source§fn clone(&self) -> ResearchSession
fn clone(&self) -> ResearchSession
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more