Technology

Decision Engines: The Layer Between Your Rules Engine and Your LLM

Every production system eventually hits the same wall. The plumbing works, the business logic is fine, but the judgment calls inside it aren’t. Someone writes a rules engine to encode what the team already knew, and six months later nobody dares touch the 400-line conditional that decides refund eligibility. Someone else wires a chat LLM into the flow and gets back fluent prose wrapped in a JSON fence that parses maybe 94% of the time. Neither approach gives you what an automated system actually needs: a small, typed, trustworthy answer that code can branch on without a human hovering nearby.

That gap is what a decision engine fills. It’s a distinct category of infrastructure — not a chatbot, not a workflow builder, not a rules DSL — and understanding its boundaries is the fastest way to know whether you need one.

What a Decision Engine Actually Is

A decision engine is a service that accepts state and a question defined in code, and returns a typed, calibrated decision in a single pass. State can be free text, structured JSON, or up to 16 images and video frames. The question isn’t a prompt in a template file; it’s a schema your application declares, so the answer arrives already shaped like the variable you’re going to assign it to.

The output types are deliberately narrow, because narrowness is what makes them composable. A decision engine returns a choice (one label from a set you defined), a score (a level on an ordered scale), a truth (a calibrated probability between 0.00 and 1.00), a number (a value on a grid), or a point and box (locations inside an image). Every one of those maps directly onto a language construct you already use: an enum, an ordered set, a float you compare to a threshold, a typing, a bounding rectangle for a crop or an overlay.

Contrast this with the two systems teams usually reach for first. A rules engine is deterministic and fast but only knows what someone explicitly taught it; it generalizes to nothing, and every edge case becomes another branch that someone has to own forever. A chat LLM generalizes beautifully but answers in generated text, so your integration becomes a parsing problem — prompt engineering, JSON repair, retry loops, temperature drift, and a per-decision cost dominated by output tokens you never wanted in the first place. A decision engine keeps the generalization and drops the prose.

The other defining property is calibration. Every answer carries a confidence value that means something statistically, not just a softmax number that happens to be 0.87. That single feature changes the architecture of the surrounding system: code can act instantly when confidence clears a threshold, and re-check, escalate, or take a documented safe path when it doesn’t. You stop treating automation as a binary and start treating it as a routing problem with a measured error budget.

DecisionNode implements this model directly. It exposes a “System One” decision AI that returns typed decisions instead of generated text, and it’s deterministic — the same request produces the same answer every time — which is what makes the whole thing testable in CI rather than “vibes-checked” in staging.

Designing the Decision Contract: State In, Schema Out

The integration surface for a decision engine is intentionally boring, and that’s the point. In DecisionNode’s case, everything goes through one HTTPS endpoint — POST /v1/decide — where you send the current state plus the questions you defined in code, and receive schema-valid typed answers. There’s no multi-turn negotiation, no tool-calling loop, no “please respond only in JSON” pleading. One round trip, one parse, one typed object.

Because the contract is explicit, the operational controls become explicit too. Confidence thresholds live in your code, versioned alongside the decision definitions. A ticket triage call might auto-route above 0.90, queue for a human between 0.60 and 0.90, and fall back to a default queue below that. A promo-abuse check might refuse above a score of 4, silently flag between 3 and 4, and allow otherwise. None of that logic lives in a prompt; it lives in a testable function, which means you can write fixtures, replay historical traffic, and measure how threshold changes affect volume before shipping them.

Determinism deserves its own paragraph because it unlocks things teams rarely get with generative systems. Identical requests return identical answers, so responses are cacheable, decisions are replayable during incident review, and regression suites actually mean something. You can record a week of production state and re-run it against a new decision definition to see exactly which cases flip.

Latency and cost shape the rest of the design. DecisionNode Flash runs at roughly 5 ms server-side and 19 ms end to end at $0.035 per 1M input tokens; DecisionNode MoE runs at about 9 ms at $0.042 per 1M input tokens. Output tokens are always free, batch discounts are available, and there’s a free daily tier for development. For loops that exceed roughly 10 decisions per second — drones, robots, simulators, machine monitoring on a line — sessions over WebSocket keep the round trip from dominating your control loop. SDKs cover TypeScript, Python, Go, Ruby, and curl, with MCP tools, webhooks, and agent integrations for teams wiring decisions into autonomous systems.

Where Decision Engines Earn Their Keep in Production

The clearest signal that you need a decision engine is a place where a human is currently making a fast, repeatable judgment that a rules engine handles badly. Ticket routing and triage is the canonical example: the label set is yours, the priority is an ordered score, and the confidence band tells you which tickets a person should actually see first. Fraud and promo-abuse checks lean on the calibrated probability — a truth value of 0.31 is a different action than 0.88, and the difference should be a threshold in code, not a paragraph of reasoning in a log.

Order and shipping decisions combine structured state with policy: which warehouse, which carrier, whether to split a shipment, whether to hold. Moderation and scoring and gating follow the same shape — a choice plus a confidence, sometimes a second question about severity. On the physical side, quality control on production lines uses point and box outputs against frames from a camera, while warehouse and traffic monitoring ask numeric questions about counts and occupancy against the same image input path.

Agents are the newest and fastest-growing consumer. The pattern that works is decide before acting: rather than letting an agent narrate its way toward a tool call and hope the arguments are valid, the agent asks a decision engine a bounded question, gets a typed answer back, and then acts on it deterministically. The model handles ambiguity; the decision engine handles commitment.

Domain-specific boosters extend the same contract into narrower tasks — human age estimation, AI-generated image detection, face detection and recognition, OCR, depth, and segmentation — without requiring you to bolt on a separate vendor for each. You send the frame, you ask the typed question, you get the typed answer.

The migration path that teams tend to follow is shadow mode. Run the decision engine alongside the existing rules or the existing chat-LLM call, log both answers with confidence, and compare against the outcomes you already trust. Because the answers are typed and deterministic, that comparison is a join and a confusion matrix rather than a manual read-through of generated text. Once the agreement rate on the high-confidence band is where you want it, flip the threshold and retire the branch that nobody wanted to maintain.

Gregor Novak

A Slovenian biochemist who decamped to Nairobi to run a wildlife DNA lab, Gregor riffs on gene editing, African tech accelerators, and barefoot trail-running biomechanics. He roasts his own coffee over campfires and keeps a GoPro strapped to his field microscope.

Leave a Reply

Your email address will not be published. Required fields are marked *