feedback_forensics.tools.ff_human_annotation#

Module Contents#

Functions#

_ensure_trait_annotators_exist

Ensure that an annotator entry exists for every trait.

_get_text_from_response

Extract displayable text for a single response from AnnotatedPairs.

_read_pair_texts

Return (prompt, text_a, text_b) for a comparison in v1.0 or v2.0.

_annotation_from_value

Map radio value to AnnotatedPairs ‘pref’ string.

_value_from_annotation

Inverse mapping to populate radio controls from existing annotations.

_save

build_interface

run

Data#

API#

feedback_forensics.tools.ff_human_annotation.PERSONALITY_TRAITS_DEFAULT: List[str]#

[‘is more verbose’, ‘has more structured formatting’, ‘makes more confident statements’, ‘is more fa…

feedback_forensics.tools.ff_human_annotation._ensure_trait_annotators_exist(ap: Dict[str, Any], traits: List[str]) Dict[str, str]#

Ensure that an annotator entry exists for every trait.

Returns mapping from trait -> annotator_id (stable, hashed).

feedback_forensics.tools.ff_human_annotation._get_text_from_response(response: Any) str#

Extract displayable text for a single response from AnnotatedPairs.

Supports both v1.0 (string fields) and v2.0 (dict response fields).

feedback_forensics.tools.ff_human_annotation._read_pair_texts(comparison: Dict[str, Any]) Tuple[str, str, str]#

Return (prompt, text_a, text_b) for a comparison in v1.0 or v2.0.

feedback_forensics.tools.ff_human_annotation._annotation_from_value(value: str) str#

Map radio value to AnnotatedPairs ‘pref’ string.

Radio values: ‘text_a’, ‘text_b’, ‘not relevant’

feedback_forensics.tools.ff_human_annotation._value_from_annotation(pref: str) str#

Inverse mapping to populate radio controls from existing annotations.

feedback_forensics.tools.ff_human_annotation._save(ap: Dict[str, Any], output_path: pathlib.Path) None#
feedback_forensics.tools.ff_human_annotation.build_interface(input_path: pathlib.Path, output_path: pathlib.Path | None, traits: List[str] | None = None, use_standard_traits: bool = False) gradio.Blocks#
feedback_forensics.tools.ff_human_annotation.run()#