lm_polygraph.stat_calculators.prompt_visual module

class lm_polygraph.stat_calculators.prompt_visual.BasePromptVisualCalculator(prompt: str, expected: str, method: str, input_text_dependency: str = 'input_texts', sample_text_dependency: str | None = None, generation_text_dependency: str = 'greedy_texts')[source]

Bases: StatCalculator

Calculates the probability for a specific token to be generated from the specific prompt. Used for P(True)-based methods.

class lm_polygraph.stat_calculators.prompt_visual.ClaimPromptVisualCalculator[source]

Bases: BasePromptVisualCalculator

static meta_info() Tuple[List[str], List[str]][source]

Returns the statistics and dependencies for the ClaimPromptCalculator.

class lm_polygraph.stat_calculators.prompt_visual.PromptVisualCalculator[source]

Bases: BasePromptVisualCalculator

static meta_info() Tuple[List[str], List[str]][source]

Returns the statistics and dependencies for the PromptCalculator.

class lm_polygraph.stat_calculators.prompt_visual.SamplingPromptVisualCalculator[source]

Bases: BasePromptVisualCalculator

static meta_info() Tuple[List[str], List[str]][source]

Returns the statistics and dependencies for the SamplingPromptCalculator.