Case Study: Single-Pass Pre-Flight Short-Circuit and Pre-LLM UDM Filtering#
The strongest demonstration of Gemini Decision 1 (gemini-decision-1) in this repository is how it eliminates downstream LLM turns rather than merely reformatting JSON:
True
LlmResponseshort-circuit insoc_orchestrator: On initial user turns (len(llm_request.contents) == 1),_preflight_before_model_callbackevaluates 6 heterogeneous questions (4 noul,1 choice,10-indexedscoreshifted+1.0) in onePOST /v1beta/decisionspass (0output tokens). Whenworkflow_mode == "single_specialist"and exactly one specialist hasnoul >= 0.90, the callback returnsLlmResponse(content=Content(role="model", parts=[Part(function_call=FunctionCall(name=target_agent, args={"request": prompt}), thought_signature=b"skip_thought_signature_validator")]))directly—bypassinggemini-4-hydrogenon the initial routing turn.Pre-LLM UDM noise filter in
threat_hunter:_filter_udm_events_after_tool_callbackinterceptsudm_searchandlist_security_alertsresponses beforethreat_hunter_llmsees them, evaluating each event in parallel viaThreadPoolExecutorwithout[:32000]batch truncation. Benign OS/Defender DNS lookups (P(true_positive) < 0.30) are dropped before consuming Flash input tokens, while the replayedRULES_SEARCH_WORKSHOPntdsutil.exeevent (frank.kolzigonactivedir.stackedpads.local) is retained and tagged[HIGH_CONFIDENCE_ESCALATE].Authoritative Gateway enforcement preserved:
soc_orchestratornever blocks or self-refuses; ambiguous or multi-stage turns fall back to a non-binding[PREFLIGHT_ROUTING]instruction, anddetection_engineervalidates YARA-L 2.0 rules directly via Chronicle OneMCPvalidate_rule(success: true,usesUdm: true).
Figure 1. soc_orchestrator LlmResponse short-circuit bypassing gemini-4-hydrogen on decisive single-specialist turns and threat_hunter after_tool_callback dropping low-signal UDM noise (P(tp) < 0.30) before gemini-3.8-flash runs.#
Step 1: 6-question pre-flight routing (soc_orchestrator)#
_PREFLIGHT_QUESTIONS in governed_agents/soc_orchestrator/agent.py batches six questions into a single POST https://generativelanguage.googleapis.com/v1beta/decisions call:
4
noulquestions:needs_cti,needs_threat_hunt,needs_detection_eng,needs_tier2_response(needs_threat_huntexplicitly excludes pure external GTI/VirusTotal lookups)1
choicequestion:workflow_mode(single_specialist,multi_stage_investigation,containment_action,other)1
scorequestion:urgency(0-indexed levels0..4, shifted+1.0to1.0..5.0by_parse_answers)
Sanitized POST /v1beta/decisions request#
{
"model": "gemini-decision-1",
"input": "Hunt the last 24h RULES_SEARCH_WORKSHOP PowerShell and Sysmon events in Chronicle SIEM; also validate dns_tunneling_distinct_subdomains_T1048.",
"questions": {
"needs_cti": {
"type": "noul",
"instructions": "Does the request ask to look up or enrich a file hash, domain, IP address, URL, or threat collection/campaign in external Google Threat Intelligence (GTI / VirusTotal)?"
},
"needs_threat_hunt": {
"type": "noul",
"instructions": "Does the request ask to search Chronicle SIEM logs or UDM telemetry, list or triage SIEM security alerts, inspect SIEM entity context, or check/manage SIEM feeds? Answer false for pure external GTI/VirusTotal reputation lookups that do not mention SIEM, UDM, alerts, or feeds."
},
"needs_detection_eng": {
"type": "noul",
"instructions": "Does the request ask to author, validate, audit, or test a Chronicle SIEM YARA-L 2.0 detection rule or manage a SIEM parser?"
},
"needs_tier2_response": {
"type": "noul",
"instructions": "Does the request ask to isolate or quarantine an endpoint host, disable a user account, update an alert status, or modify a containment reference list?"
},
"workflow_mode": {
"type": "choice",
"instructions": "Select the most appropriate orchestration workflow mode for this request.",
"criteria": {
"single_specialist": "Route directly to one matching specialist agent.",
"multi_stage_investigation": "Coordinate two or more specialists in sequence or parallel.",
"containment_action": "Execute or validate a host/account containment or SIEM response action.",
"other": "General security operations question or unclear scope."
}
},
"urgency": {
"type": "score",
"instructions": "Rate the operational urgency of this security request from routine inquiry to critical active incident.",
"criteria": [
"Level 0: Routine informational query, rule syntax check, or non-urgent lookup.",
"Level 1: Low-priority enrichment or scheduled hygiene check.",
"Level 2: Standard alert triage or suspicious indicator investigation.",
"Level 3: High-priority active threat hunt or confirmed malicious indicator.",
"Level 4: Critical active incident, crown-jewel asset impact, or immediate containment."
]
}
}
}
Sanitized POST /v1beta/decisions response#
{
"answers": {
"needs_cti": { "type": "noul", "noul": 0.0412, "confidence": 0.9588 },
"needs_threat_hunt": { "type": "noul", "noul": 0.9864, "confidence": 0.9864 },
"needs_detection_eng": { "type": "noul", "noul": 0.9911, "confidence": 0.9911 },
"needs_tier2_response": { "type": "noul", "noul": 0.0318, "confidence": 0.9682 },
"workflow_mode": {
"type": "choice",
"choice": "multi_stage_investigation",
"confidence": 0.9412,
"probabilities": {
"multi_stage_investigation": 0.9412,
"single_specialist": 0.0481,
"containment_action": 0.0064,
"other": 0.0043
}
},
"urgency": {
"type": "score",
"score": 2.45,
"confidence": 0.7810
}
},
"usage": {
"promptTokenCount": 296,
"candidatesTokenCount": 0,
"totalTokenCount": 296
}
}
Because this prompt requests two specialists (workflow_mode == "multi_stage_investigation"), _short_circuit_target returns None and _format_preflight_hint injects [PREFLIGHT_ROUTING]. By contrast, on single-specialist prompts (e.g., "Look up domain reputation for google.com in GTI" -> workflow_mode == "single_specialist", needs_cti >= 0.90), _preflight_before_model_callback returns LlmResponse with FunctionCall(name="CTI_Researcher", args={"request": prompt}), skipping gemini-4-hydrogen entirely on that turn (a modeled estimate of ~12,120 tokens and ~19,200 ms saved across 6/12 benchmark preflight calls).
Step 2: Pre-LLM UDM noise filtering and YARA-L 2.0 validation#
Following routing, soc_orchestrator delegates over A2A to Threat_Hunter and Detection_Engineer against the replayed RULES_SEARCH_WORKSHOP dataset:
Threat_Hunter(udm_search+_filter_udm_events_after_tool_callback): Queries Chronicle OneMCP forPOWERSHELLandWINDOWS_SYSMONevents matchingRULES_SEARCH_WORKSHOP. Beforethreat_hunter_llmsees the payload,_filter_udm_events_after_tool_callbackevaluates each event in parallel:Benign OS/Defender DNS lookups (
P(true_positive) < 0.30) are dropped (dropped_low_signal_count), saving downstream Flash input tokens.Event 4 (
ntdsutil.exeexecuted byfrank.kolzigonactivedir.stackedpads.local,10.1.0.4) is retained withdecision1_triagemetadata (severity: 4,severity_score: 3.95,true_positive_probability: 0.7996,mitre_tactic: "credential_access",next_action: "escalate_tier2"), and events withP(true_positive) >= 0.85are tagged[HIGH_CONFIDENCE_ESCALATE].
Detection_Engineer(validate_rule): Validatesdns_tunneling_distinct_subdomains_T1048as a Chronicle SIEM YARA-L 2.0 UDM event correlation rule (explicitly distinct from standard file/payload YARA) directly via Chronicle OneMCPvalidate_rule(success: true,usesUdm: true,LIVE_CUSTOMIZABLE,HOURLY_CUSTOMIZABLE).
Figure 2. Live A2A trace against the deployed soc_orchestrator showing RULES_SEARCH_WORKSHOP PowerShell/Sysmon UDM hunting and Chronicle OneMCP validate_rule (success: true, usesUdm: true).#
Figure 3. Calibrated probability distributions (noul, choice.probabilities, and score.probabilities) emitted by gemini-decision-1 with zero output tokens.#
Figure 4. Apples-to-apples benchmark latency comparison showing gemini-decision-1 averaging 247.11 ms (212.03 ms p50) versus 3,218.01 ms (3,231.06 ms p50) for gemini-3.8-flash (thinkingBudget=0) across preflight, udm_filter, and cti_artifact.#
See Gemini Decision 1 for Governed SOC Agents for the full architecture, Auth Manager 300s TTL caching, and aggregate v2 benchmark tables.