AQIT 0.1.0
Loading...
Searching...
No Matches
deception_behavior.py File Reference

Go to the source code of this file.

Classes

class  aquin.compute.deception_behavior.BehaviorProbe
class  aquin.compute.deception_behavior.BehaviorSample

Namespaces

namespace  aquin
namespace  aquin.compute
namespace  aquin.compute.deception_behavior

Functions

str aquin.compute.deception_behavior._row_text (dict[str, Any] row, *str keys)
Path aquin.compute.deception_behavior._resolve_deception_fixture ()
str aquin.compute.deception_behavior.normalize_conditioning (str|None conditioning)
Path aquin.compute.deception_behavior._resolve_probe_path (str|Path|None path)
tuple[list[dict[str, Any]], Path] aquin.compute.deception_behavior._load_probe_rows (str|Path|None path)
tuple[str, str] aquin.compute.deception_behavior._references_from_row (dict[str, Any] row, *, str honest_text="", str deceptive_text="")
list[BehaviorProbeaquin.compute.deception_behavior.expand_row_to_behavior_probes (dict[str, Any] row)
tuple[list[BehaviorProbe], dict[str, Any]] aquin.compute.deception_behavior.load_behavior_probes (str|Path|None path)
tuple[BehaviorLabel, float, float] aquin.compute.deception_behavior.classify_behavior (str response, str honest_reference, str deceptive_reference, *, float min_score=BEHAVIOR_MIN_SCORE, float margin=BEHAVIOR_MARGIN)
str aquin.compute.deception_behavior._build_encode_text (Any model, str prompt, str response)
list[BehaviorSampleaquin.compute.deception_behavior.generate_behavior_samples (list[BehaviorProbe] probes, str model_id, Any|None model=None, *, str|Path|None checkpoint_path=None, int max_new_tokens=DEFAULT_MAX_NEW_TOKENS, float temperature=DEFAULT_GEN_TEMPERATURE)
tuple[list[str], list[str], dict[str, Any]] aquin.compute.deception_behavior.bucket_by_behavior (list[BehaviorSample] samples)
tuple[list[str], list[str], dict[str, Any]] aquin.compute.deception_behavior.collect_behavior_encode_texts (str|Path|None path, str model_id, Any|None model=None, *, str|Path|None checkpoint_path=None, int max_new_tokens=DEFAULT_MAX_NEW_TOKENS, float temperature=DEFAULT_GEN_TEMPERATURE)

Variables

 aquin.compute.deception_behavior.HONEST_LABELS = frozenset({"honest", "truthful", "true", "control", "baseline"})
 aquin.compute.deception_behavior.DECEPTIVE_LABELS = frozenset({"deceptive", "deception", "lie", "lying", "dishonest", "false"})
tuple aquin.compute.deception_behavior.TEXT_KEYS = ("instruction", "prompt", "text", "content", "honest", "deceptive")
 aquin.compute.deception_behavior.BehaviorLabel = Literal["truthful", "deceptive", "ambiguous"]
 aquin.compute.deception_behavior.VALID_CONDITIONING = frozenset({"behavior", "prompt"})
float aquin.compute.deception_behavior.BEHAVIOR_MIN_SCORE = 0.2
float aquin.compute.deception_behavior.BEHAVIOR_MARGIN = 0.05
int aquin.compute.deception_behavior.DEFAULT_MAX_NEW_TOKENS = 64
float aquin.compute.deception_behavior.DEFAULT_GEN_TEMPERATURE = 0.0