Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:7onez Cti expert Schema Forced Assessment

From Leeroopedia
Knowledge Sources
Domains OSINT, Assessment, LLM_Orchestration
Last Updated 2026-10-28 14:00 GMT

Overview

Design principle that forces an LLM's assessment output through a Pydantic schema, so the model cannot produce an assessment without an attribution level, confidence, alternatives, or a premise verdict.

Description

Schema-Forced Assessment solves the problem of unstructured judgment: an LLM asked to "assess the cluster" will produce prose that omits required fields (alternatives, gaps, premise verdict), uses vague estimative language ("this is clearly the same operator"), and conflates attributed members with collected artifacts. The principle enforces a structured output schema (Pydantic BaseModel) via the SDK's output_format / json_schema option.

The schema is the enforcement boundary for the assessment standard:

  • BLUF required: one sentence with an estimative word — the model cannot produce an assessment without a bottom line.
  • Attribution level constrained: must be one of four values — the model cannot invent a new level.
  • Alternatives required above inconclusive: an unrejected alternative caps confidence — the schema enforces at least one entry whenever attribution is above inconclusive.
  • Premise verdict required: the claim this run was given must be answered. inconclusive (the target was never observed) and not_supported (found nothing either way) are honest defaults — neither means benign.
  • Separation enforced: kit_siblings, neighbours, and mentions are separate list fields with descriptions that say "NEVER belong in cluster." The schema description is the enforcement.

Usage

Use this principle when designing LLM-driven assessment where:

  • The output must be structured for downstream consumption (report rendering, MISP export).
  • The model must be forced to consider alternatives — an unrejected alternative is the most common omission.
  • The intake premise must be answered — without a field for it, the claim silently becomes the frame.
  • Attributed members must be separated from collected-but-not-attributed artifacts.

Theoretical Basis

The principle is constraint-based output generation: the SDK's output_format parameter passes a JSON schema to the model, and the model must return JSON that validates against it. A field with a Literal type is a hard constraint — the model cannot choose a value outside the enum. A field with a description is a soft constraint — it guides the model's interpretation.

# Abstract pattern (NOT real implementation)
class Assessment(BaseModel):
    attribution_level: Literal["same-kit", "same-operator", "same-actor", "inconclusive"]
    confidence: Literal["low", "moderate", "high"]
    alternatives: list[Alternative]  # required above inconclusive
    kit_siblings: list  # "NEVER belong in cluster"

options = AgentOptions(output_format={"type": "json_schema", "schema": Assessment.model_json_schema()})
# Model must return JSON that validates — cannot omit required fields

The premise verdict is the key insight: a case arrives with a claim ("this is a scam site"), and without a field to answer it, the claim becomes the frame the assessment was written inside. The schema's premise and premise_verdict fields force the model to state the claim and answer it — inconclusive (never observed) and not_supported (nothing found either way) are honest, non-benign defaults.

Related Pages

Implemented By

Used By Workflow

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment