concept
Prompt task contract
A versioned specification of a generation task. Not a standardized API syntax or security boundary. Examples must agree with the contract. Prefer deterministic code for fixed validated inputs.
Formal Syntax & Structure
artificial-intelligence syntaxartificial-intelligence
task + context + input + output requirements + evidence and abstention rulesWorking Example
Example Snippetartificial-intelligence
import json
def make_request(policy): return { "task": "Summarize the return policy in two bullets.", "constraints": ["Use only the supplied policy facts.", "Say unknown when a fact is missing."], "input": {"policy": policy}, }
request = make_request("Returns within 14 days. Receipt required.")print(json.dumps(request, sort_keys=True))