PATTERN Cited by 1 source
Deterministic filter before LLM reasoning¶
Pattern¶
Place a layer of programmatic, rules-based checks before an LLM inference step. Items that match known-outcome patterns (benign, invalid, duplicate) receive an instant disposition without consuming model tokens. Only genuinely ambiguous items proceed to the expensive reasoning step.
When to use¶
- High-volume pipelines where a significant fraction of inputs have predictable outcomes.
- Cost-sensitive deployments where LLM inference is the dominant expense.
- Latency-sensitive paths where sub-second response is needed for most items.
Structure¶
Input stream
│
▼
┌─────────────────────┐
│ Deterministic rules │ ← trusted lists, regex, lookups
│ (30-95% handled) │
└──────────┬──────────┘
│ unmatched (ambiguous)
▼
┌─────────────────────┐
│ LLM reasoning │ ← expensive, slow, probabilistic
│ (5-70% of volume) │
└─────────────────────┘
Key insight¶
"The cheapest call is the one you never make." At Databricks, deterministic filtering handles 30–95% of security alert volume per source, saving thousands of LLM calls per day (Source: sources/2026-07-06-databricks-scaling-security-alert-triage).
Seen in¶
- sources/2026-07-06-databricks-scaling-security-alert-triage — Databricks security triage pipeline: deterministic filters before 17 source-specific LLM agents.