karenina.integrations.adele.parser¶
parser
¶
Parser for ADeLe (Annotated Demand Levels) rubric text files.
ADeLe rubrics define 6 levels (0-5) for evaluating various cognitive and processing dimensions. Each level has a label, description, and examples.
ADeLe rubrics from Zhou et al. (2025), arXiv:2503.06378. https://kinds-of-intelligence-cfi.github.io/ADELE/
Classes¶
AdeleLevel
dataclass
¶
A single level in an ADeLe rubric (0-5).
Source code in src/karenina/integrations/adele/parser.py
Functions¶
to_class_description
¶
Format level as a single class description string for LLMRubricTrait.
Format: "Level N: Label. Description
Examples: * example1 * example2"
Source code in src/karenina/integrations/adele/parser.py
AdeleRubric
dataclass
¶
A parsed ADeLe rubric with optional header and 6 levels.
Source code in src/karenina/integrations/adele/parser.py
Functions¶
parse_adele_file
¶
parse_adele_file(content: str, code: str) -> AdeleRubric
Parse ADeLe rubric text content into structured format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Raw text content of the rubric file |
required |
|
str
|
File code/identifier (e.g., "AS", "AT", "CEc") |
required |
Returns:
| Type | Description |
|---|---|
AdeleRubric
|
Parsed AdeleRubric with header (if present) and 6 levels |
Raises:
| Type | Description |
|---|---|
ValueError
|
If parsing fails or rubric structure is invalid |