p3_triage_runner¶
UC1-P3 triage runner — assign severity and handling priority from P1 + P2 output.
- class prompt_risk.uc.uc1.p3_triage_runner.P3TriageUserPromptData(*, extraction_json: str, classification_json: str)[source]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class prompt_risk.uc.uc1.p3_triage_runner.P3TriageOutput(*, severity_level: Annotated[int, Ge(ge=1), Le(le=5)], handling_priority: Literal['urgent', 'high', 'standard', 'low'], reasoning: str, field_conflicts: list[str], escalate: bool)[source]¶
Structured output for the P3 severity & priority triage prompt.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- prompt_risk.uc.uc1.p3_triage_runner.MAX_RETRIES = 3¶
Maximum number of converse API calls per
run_p3_triage()invocation.
- prompt_risk.uc.uc1.p3_triage_runner.run_p3_triage(client: BedrockRuntimeClient, data: P3TriageUserPromptData, prompt_version: str = '01', model_id: str = 'us.amazon.nova-2-lite-v1:0') P3TriageOutput[source]¶
Execute the P3 triage prompt and return validated output.
Takes the structured JSON output from P1 extraction and P2 classification, and assigns severity level and handling priority.
Uses the same system-prompt caching and retry-on-validation-failure pattern as the P1 and P2 runners.