Skip to content

Core Concepts

NanoPrompter edited this page Jun 16, 2026 · 1 revision

Core Concepts: The SAMF Contract Layer

The SAWANT Agentic MoSCoW Framework (SAMF) transitions prompt engineering away from fragile natural language heuristics and into explicit, machine-readable behavioral contracts . It systematically categorizes operational rules and safety boundaries into four distinct vectors :

🛡️ Must-Have (must_have)

Absolute, non-negotiable structural prerequisites . If any token, specific JSON key, regex pattern, or foundational guideline is missing from the output, the execution contract is immediately broken .

  • Example: "MUST Extract all DPPOS incidence rates, risk reduction %, subgroup effects."

📈 Should-Have (should_have)

Strong operational preferences that improve quality, style, or formatting but can occasionally be relaxed under complex reasoning paths without breaking the whole workflow execution .

  • Example: "SHOULD Present as table with source citations."

💡 Could-Have (could_have)

Optional enhancements, niceties, or downstream guidelines that guide quality but don't impact the core compliance or structural validity of the agent's task .

  • Example: "COULD Note clinical implications."

🚫 Won't-Have (wont_have)

Strictly forbidden behaviors, strings, or patterns that must never occur under any circumstance . Any detection of a wont_have constraint triggers an immediate failure to protect the pipeline from structural contamination .

  • Example: "WONT Infer causality, invent numbers, add external studies."

Technical Foundations

SAMF provides a deterministic execution layer by connecting natural language priorities to symbolic evaluation systems through two primary mechanisms:

1. Verifiable Hybrid Reasoning (VHR)

[cite_start]Rather than relying on the LLM to follow rules purely through probabilistic next-token generation, SAMF uses Verifiable Hybrid Reasoning[cite: 44, 113].

  • [cite_start]Hard Constraints: "Must" and "Won't" items are directly compiled into symbolically checkable conditions, such as Pydantic schemas, unit tests, regex patterns, or strict code constraints applied to the model's output[cite: 24, 60, 115, 178].
  • [cite_start]Soft Preferences: "Should" and "Could" items are utilized to guide heuristic scoring functions, quality evaluations, and downstream prompt adjustments to optimize style and depth without breaking execution loops[cite: 116].

2. Schema Compression

[cite_start]To prevent context window bloat and control the "verbosity trade-off," SAMF avoids massive text explanations of guidelines[cite: 62, 229, 230]. [cite_start]Instead, it compresses system policies into dense structural frameworks (such as shorthand JSON-like keys or explicit token anchors), minimizing noise, reducing inference costs, and cutting down operational latency[cite: 23, 62, 87, 230].

Clone this wiki locally