PromptContext
PromptContext(
section_name,
section_instruction,
annotation_name,
tooltip,
annotation_type,
options,
min_value,
max_value,
label_options,
example,
text,
use_examples,
response_instructions,
core_prompt,
)Structured prompt-building context passed to prompt wrapper functions.
Attributes
| Name | Type | Description |
|---|---|---|
| section_name | str | Codebook section name for the current annotation. |
| section_instruction | str | Optional section-level instructions from the codebook. |
| annotation_name | str | Human-readable annotation label inside the section. |
| tooltip | str | Optional annotation guidance or tooltip text. |
| annotation_type | str | One of "dropdown", "checkbox", "likert", "textbox", or "span". |
| options | list[str] | None | Dropdown options when annotation_type is "dropdown", otherwise None. |
| min_value | int | None | Minimum Likert value when applicable, otherwise None. |
| max_value | int | None | Maximum Likert value when applicable, otherwise None. |
| label_options | list[str] | None | Allowed labels when annotation_type is "span" and the annotation is labelled; None for plain highlights or non-span types. |
| example | str | Example block extracted from the codebook, if present. |
| text | str | Raw source text being annotated. |
| use_examples | bool | Whether examples should be included in the rendered prompt. |
| response_instructions | str | Type-specific response instructions generated by CodeBook Lab. |
| core_prompt | str | Prompt body assembled before the outer wrapper is applied. |