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

Implementation:7onez Cti expert Schemas Assessment

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

Overview

Concrete tool for forcing structured assessment output via a Pydantic schema that enforces attribution levels, confidence, alternatives, gaps, and the intake-premise verdict, provided by the cti-expert harness.

Description

The Assessment class in schemas.py is the Pydantic schema that forces the LLM's assessment output into a structured form. It mirrors the §7 write-up standard and enforces:

  • BLUF: one sentence with an estimative word (assessed/likely/possible).
  • Attribution level: one of same-kit, same-operator, same-actor, inconclusive — the strongest claim the evidence supports.
  • Confidence: low, moderate, high.
  • Alternatives: competing explanations, each with status and evidence. At least one when attribution is above inconclusive — an unrejected alternative caps the confidence.
  • Premise verdict: what the collection says about the claim. not_supported = found nothing either way; inconclusive = the target was never observed. Neither means benign.
  • Separation of cluster / kit_siblings / neighbours / mentions: kit siblings (collected, not attributed) and neighbours (co-tenancy) NEVER belong in cluster. This is the schema-level enforcement of the collecting-≠-attributing principle.

Usage

Import this when you need to:

  • Force the LLM Assess phase to produce structured output via output_schema.
  • Enforce the separation of attributed members from collected-but-not-attributed artifacts.
  • Require alternatives whenever an attribution level above inconclusive is claimed.
  • Answer the intake premise (the claim this run was given).

Code Reference

Source Location

  • Repository: cti-expert
  • File: intel_engine/harness/schemas.py
  • Lines: L81-153

Signature

class Assessment(BaseModel):
    """The IntelAnalysis deliverable — mirrors the §7 write-up standard."""
    decision_supported: str = Field(default="")
    bluf: str = Field(description="bottom line up front with an estimative word")
    cluster: list[ClusterMember] = Field(default_factory=list)
    attribution_level: Literal["same-kit", "same-operator", "same-actor", "inconclusive"]
    confidence: Literal["low", "moderate", "high"]
    evidence: list[str] = Field(default_factory=list)
    alternatives: list[Alternative] = Field(default_factory=list)
    gaps: list[str] = Field(default_factory=list)
    next_pivots: list[str] = Field(default_factory=list)
    premise: str = Field(default="")
    premise_verdict: Literal["supported", "partially_supported", "not_supported",
                             "contradicted", "inconclusive"] = Field(default="inconclusive")
    kit_siblings: list[TierMember] = Field(default_factory=list)
    neighbours: list[TierMember] = Field(default_factory=list)
    mentions: list[Mention] = Field(default_factory=list)

Import

from harness.schemas import Assessment

I/O Contract

Outputs (Schema Fields)

Name Type Description
bluf str One-sentence bottom line with estimative word
attribution_level Literal Strongest claim: same-kit/same-operator/same-actor/inconclusive
confidence Literal low/moderate/high
cluster list[ClusterMember] Attributed cluster members
kit_siblings list[TierMember] Collected, NEVER attributed
neighbours list[TierMember] Co-tenancy, NEVER attributed
alternatives list[Alternative] Competing explanations (required above inconclusive)
premise_verdict Literal What collection says about the claim

Usage Examples

Force Structured Assessment

from harness.schemas import Assessment
from harness.orchestrator import _phase

# The Assess phase uses output_schema=Assessment to force structured output
result = await _phase(
    assess_prompt,
    label="assess",
    system=skill_body,
    tools=ASSESS_TOOLS,
    servers=mcp_servers,
    output_schema=Assessment,   # forces the model to return this schema
    case=case_id,
)
# result.result is a JSON string matching Assessment.model_json_schema()

Related Pages

Implements Principle

Requires Environment

Page Connections

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