Files
OBLITERATUS/obliteratus/concepts/__init__.py
Joseph MaglyandClaude Opus 5.5 20d4fb0ac8 feat(concepts): add first-class pack entry points for latent concepts (#311)
A Concept Pack can now declare how to locate and activate its latent
representation, as schema v1.1 (v1 packs and refusal are unchanged):

- `entry_point.messages`: a system message and prior turns wrapping each
  prompt, rendered with the chat template (plain-text fallback recorded).
- `entry_point.prefill`: assistant prefill so readout can happen at an
  assistant position.
- `entry_point.readout`: final_token, mean_pool, span:<name> (a marked
  span in the template) or last_k:<k>.
- `entry_point.template`: `{variable}` rendering over prompt record fields.
- `entry_point.group_by`: grouped CV folds and held-out validation, so
  related samples never straddle folds.

Record annotations (person, split, group) now survive pack loading and
selectors. Unknown recipe and entry-point keys are rejected instead of
silently ignored. The entry point is part of activation identity, direction
metadata and provenance, so changing it invalidates cached activations and
saved directions. Generated-state readout is documented as not yet
supported.

Fixes #311

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 17:37:51 -04:00

23 lines
1.0 KiB
Python

"""Concept targets, registry and portable extracted directions."""
from obliteratus.concepts.direction import ConceptDirection
from obliteratus.concepts.registry import ConceptRegistry
from obliteratus.concepts.target import ConceptTarget, ExtractionRecipe, EntryPoint
from obliteratus.concepts.intervention import apply_concept_intervention, evaluate_dose_ladder
from obliteratus.concepts.evaluation import (
EvaluationBattery, EvaluationReport, evaluate_intervention,
)
from obliteratus.concepts.runs import compare_runs, save_concept_run
from obliteratus.concepts.export import export_run
from obliteratus.concepts.repair import RepairConfig, RepairReport, run_repair_ladder
__all__ = [
"RepairConfig", "RepairReport", "run_repair_ladder",
"EntryPoint", "ConceptTarget", "ExtractionRecipe", "ConceptDirection", "ConceptRegistry",
"apply_concept_intervention", "evaluate_dose_ladder",
"EvaluationBattery", "EvaluationReport", "evaluate_intervention",
"compare_runs", "save_concept_run", "export_run",
]