Implementing a Dual-Model Gate Architecture: Mitigating LLM Hallucinations and "Slop" using TypeSafe Jev and Anthropic Opus 5.5
In the current era of generative AI, the primary bottleneck for automated content pipelines is no longer the ability to generate text, but the ability to filter "AI slop"—low-signal, high-noise outputs characterized by repetitive linguistic patterns, lack of specificity, and hallucinated claims. As LLM deployment scales, the cost of human-in-the-loop verification becomes prohibitive. To solve this, we can implement a multi-stage "Gate" architecture that utilizes two fundamentally different model types: a lightweight, deterministic classifier (Jev by TypeSafe) and a high-parameter generative model (Anthropic Opus 5.5).
The Architecture of the "Slop Gate"
The core problem with traditional single-model pipelines is the reliance on a generator to also act as its own critic. This often fails because generators are prone to "self-congratulatory" biases and struggle to identify their own stylistic tells, such as excessive use of em dashes or generic filler phrases.
Our proposed architecture utilizes a two-door system: the Front Door (Ingestion Filtering) and the Back Door (Output Verification).
Component 1: The Classifier (TypeSafe Jev)
The first pillar is Jev, a specialized model from TypeSafe designed specifically for classification rather than generation. Unlike standard LLMs, Jev is constrained; it cannot generate free-form text. Instead, it operates on a predefined set of labels or scales.
From a technical and economic standpoint, Jev offers two critical advantages:
- Deterministic Latency and Cost: Because the output space is restricted to specific tokens (e.g., "Yes," "No," or a numerical scale), inference is extremely fast—often sub-second per item—and incredibly inexpensive, operating at approximately $0.04 per million input tokens.
- Confidence Scoring: Every response from Jev includes a probability metric (e.g., 94% confidence). This allows for the implementation of probabilistic routing logic rather than binary decision-making.
Component 2: The Generator (Anthropic Opus 5.5)
The second pillar is Anthropic's Opus 5.5. While highly capable, using a model of this caliber to process every raw data point in a high-volume feed is economically non-viable. However, Opus 5.5 excels at instruction following and stylistic adherence. Recent benchmarks indicate it significantly reduces "AI-isms"—such as the overused em dash—and prioritizes information density by placing key claims upfront.
The Two-Door Workflow
Door 1: The Front Door (Ingestion)
The goal of the Front Door is to prevent low-quality data from ever reaching the expensive generative stage. We implement a three-channel routing system based on Jev's confidence scores:
- Channel 1: Discard (>90% Junk Confidence): If Jev identifies an incoming item as containing "slop" features (e.g., excessive call-to-action, lack of new information, or promotional filler) with high confidence, the item is dropped immediately.
- Channel 2: Pass-Through (<90% Junk/High Confidence Real): If Jev identifies an item as highly likely to be high-signal news, it bypasses Opus 5.5 entirely and moves directly to publication.
- Channel 3: The Escalation Lane (The Uncertainty Zone): For items where Jev's confidence falls in the middle range, the data is routed to Opus 5.5. Here, the larger model performs a deep semantic analysis, providing a qualitative verdict and a brief justification (limited to 12 words) to determine if the item warrants processing.
Door 2: The Back Door (Verification)
Even when Opus 5.5 generates content, it must pass an outbound audit. This prevents "hallucination drift," where the model adds information not present in the source text.
The workflow follows a strict iterative loop:
- Generation: Opus 5.5 drafts a headline and summary based strictly on the source text.
- Audit: Jev reads the draft alongside the source, checking against an eight-point checklist (e.g., "Does the first sentence identify the actor?", "Are there unsupported claims?", "Is there any stock phrasing?").
- Iterative Refinement: If a check fails, the failure reason is fed back to Opus 5.5 as plain-text feedback. The system allows for a maximum of two rewrites. If the second rewrite fails, the system defaults to posting only the source link without a generated summary, ensuring that "bad writing" never reaches the end user.
Implementation via Claude Code and Automation
The deployment of this system is managed through Claude Code, using high-level natural language instructions to define the gate's logic. The automation pipeline integrates various data sources—including TechCrunch, Hacker News, GitHub, Reddit, and X—via a bot that executes every 30 minutes.
In a recent production test involving 1,300 historical news stories:
- Input: 1,300 items.
- Output: 200 high-signal posts.
- Efficiency: Over 1,000 items were discarded or held by the gate.
- Cost Analysis: The entire run of 1,300 stories cost less than $4.50 total (with Jev costing significantly less than one cent for its portion).
Design Philosophy: Fail-Open vs. Fail-Closed
A critical consideration in deploying this architecture is the error handling strategy based on use-case risk:
- Fail-Open (News Aggregation): In a newsfeed context, if the checker fails or an item is missed, the cost of the error is zero. Therefore, we prioritize throughput and allow for potential omissions.
- Fail-Closed (Customer Service/Legal): When applying this gate to customer replies (e.g., checking if a bot promises a refund), the system must "fail closed." If Jev cannot provide a high-confidence verdict, the process must halt or escalate to a human, as the cost of an incorrect automated promise is catastrophic.
By decoupling classification from generation and utilizing a probabilistic routing layer, we can build AI systems that are both economically scalable and resistant to the degrading effects of generative "slop."