---
title: "Classification as a Gate: Routing Work Before It Gets Expensive"
description: "Classification is a gate, not a label: a fast model scores each incoming signal, and only the ambiguous cases escalate to expensive reasoning. This map shows the layers, the decision boundary, and the feedback loop."
---

# Classification as a Gate: Routing Work Before It Gets Expensive

**Type:** [Architecture](https://yomu.fyi/visual-explainers/category/architecture.md)

![A left-to-right architecture diagram showing incoming signals, a feature assembly layer, a classifier gate with a decision boundary, two output paths for routine and escalated cases, and a feedback loop returning outcomes to the classifier.](https://yomufyi.s3.us-east-1.amazonaws.com/visual-explainers/9632b367-0941-40be-9730-af52e1102a08/image-e630c849-abb0-42b8-bd0a-ae877ab1abee.webp)

> Classification is a gate, not a label: a fast model scores each incoming signal, and only the ambiguous cases escalate to expensive reasoning. This map shows the layers, the decision boundary, and the feedback loop.

## Explanation

Classification sits between raw input and an expensive action. Signals arrive, features are assembled from stored baselines and recent activity, and a cheap classifier scores the case before any heavy model runs. That score crosses a decision boundary: routine cases take the low-cost path, while uncertain or high-stakes cases escalate to a stronger model or a human. Because the same feature definitions serve both training and inference, the gate stays consistent as traffic grows, and every routed decision can be logged for audit and retraining.

## FAQ

### How do you keep the classifier consistent between training and serving?

Define each feature once and let the same definition produce both point-in-time correct training data and the online inference pipeline. That avoids training-serving skew and data leakage, and on-demand features can compare the current case against stored baselines at request time. Without this, the gate silently drifts as production traffic diverges from the training sample.

### What should the gate do with cases it cannot classify confidently?

Escalate rather than guess, and consider narrowing the candidate set before escalating. One security team replaced loading all 192 standards into the prompt with metadata-driven selection, cutting context from 338 KB to 21 KB and improving consistency. Governance layers can also cap spend per team and route routine work to lower-cost models, so escalation stays bounded.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture.md), [Classification](https://yomu.fyi/topic/classification.md), [Decision Models](https://yomu.fyi/topic/decision-models.md), [Feature Store](https://yomu.fyi/topic/feature-store.md), [Fraud Detection](https://yomu.fyi/topic/fraud-detection.md), [Model Routing](https://yomu.fyi/topic/model-routing.md)

## Related reading

### [Real-time fraud detection with Feature Views](https://yomu.fyi/post/real-time-fraud-detection-with-feature-views.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: Shyam Sankararaman, Hedvig Vahlberg
- Published: Nov 6, 2026
- Type: Tutorial

Real-time fraud detection needs three feature types: recent activity (e.g., five-minute transaction count), spending baselines (30-day average and standard deviation), and current payment details. Databricks Feature Views address this by defining each feature once for both training and serving, producing point-in-time correct training data and online inference pipelines. The walkthrough follows a $900 payment from a Kafka stream through RollingWindow and SawtoothWindow aggregations to a fraud score from Model Serving. Feature Views prevent training-serving skew and data leakage; on-demand features compare the current amount against stored baselines at request time. Unity Catalog governs definitions, permissions, and lineage, while MLflow records model dependencies and Model Serving retrieves features from the Online Feature Store.


### [How public sector organizations can govern AI at scale](https://yomu.fyi/post/how-public-sector-organizations-can-govern-ai-at-scale.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: Kacey Hertan, Antonio Javier Samaniego Jurado
- Published: Nov 6, 2026
- Type: Problem & solution

Public sector organizations face unique governance challenges when adopting AI, including data residency restrictions, cost control, and model access, which often cause projects to stall because compliance and budget teams cannot get the answers they need. Traditional AI tools and third-party coding agents were not designed to address these requirements, leaving agencies unable to show regulators where data goes or which teams are driving spending. Databricks addresses this with Unity Gateway, a centralized AI governance solution built into its platform, allowing administrators to control which models are enabled, set hard spending caps by user or team, and enforce data residency policies. The platform also uses Smart Routing to direct routine tasks to lower-cost models, stretching budgets further without sacrificing quality. By providing unified visibility and controls, Unity Gateway enables public sector organizations to adopt AI at scale while meeting strict compliance and budget requirements, reversing the pattern of stalled adoption.


### [Make Kubernetes logs easier to correlate with traces using the log normalizer operator](https://yomu.fyi/post/make-kubernetes-logs-easier-to-correlate-with-traces-using-the-log-nor.md)
- Company: [Red Hat](https://yomu.fyi/company/red-hat.md)
- Author: Denis Moskalenko
- Published: Nov 6, 2026
- Type: Explainer

The log normalizer operator for Red Hat OpenShift injects a sidecar into selected pods to normalize heterogeneous log formats without application code changes. It detects formats such as JSON, klog, Zap console, logfmt, and plain text, reassembles multiline entries like stack traces, and emits a consistent structured JSON record. A Drain-style template miner clusters structurally similar lines and assigns template IDs as additional metadata. The sidecar attaches Kubernetes resource attributes and promotes trace and span IDs from common field names to top-level fields for correlation. Normalized records remain available through kubectl logs and can optionally be exported over OTLP to an OpenTelemetry collector.


### [How TUI scales threat modeling for 100+ teams with Amazon Bedrock](https://yomu.fyi/post/how-tui-scales-threat-modeling-for-100-teams-with-amazon-bedrock.md)
- Company: [AWS](https://yomu.fyi/company/aws.md)
- Author: Vushesh Babu Adhikari
- Published: Nov 5, 2026
- Type: Explainer

TUI’s four-person security team faced a bottleneck: manual threat modeling for 100+ digital product teams, each assessment taking 4-6 hours. They built a system using Amazon Bedrock with Claude Sonnet 4.5 and deployed on Amazon Bedrock AgentCore runtime after a 10-week proof of concept with AWS. Instead of loading all 192 security standards into prompts, they implemented metadata-driven selection, reducing context from 338 KB to 21 KB and improving consistency. The LangGraph-based agentic workflow uses self-correcting threat generation and SME comparison for accuracy and completeness. In production, assessment time dropped by up to 70%, sessions per month increased from 3-4 to 10-12, and 255 users registered in eight weeks, making threat modeling mandatory for all new services.


### [Cost per task: Using cheap classifiers to route across Gemini models and thinking levels](https://yomu.fyi/post/cost-per-task-using-cheap-classifiers-to-route-across-gemini-models-an.md)
- Company: [Google](https://yomu.fyi/company/google.md)
- Author: Sergio Villani
- Published: Nov 3, 2026
- Type: Benchmark

Per-token API prices are falling, but engineering bills for autonomous coding agents keep climbing because the dominating metric is now cost per successful task, not price per million tokens. A lightweight routing layer can intercept routine decisions before they reach an expensive reasoning model, preventing unnecessary deep-reasoning spend. The article tests TypeSafe’s Jev classifier in front of Google Antigravity’s model calls, using a single atomic Noul question to route tasks. On a 50-question coding-agent benchmark, the Jev router achieved 100% accuracy on 34 unseen held-out tasks and 96% overall, while a frozen regex and prompt-length heuristic dropped to 70.6% on unseen tasks. The most cost-effective approach is to start with a fast model on a light thinking setting, then add a near-free classifier to send only hard tasks to a stronger model.
