7 nodes. 80% deterministic.
11 tenants. One DAG.
Active since 2024
Human-supervised
One page over:
Pipeline
·
Case Studies
· Daniel Manzela
Execution DAG
7 nodes, in order.
Each node pairs a deterministic gate with an execution agent. The gate fires first; the agent activates only if the gate passes. DEMAS intercepts at every boundary for JIT validation. Nodes 4 and 6 are pure Python — no LLM invoked. Scroll to walk node-by-node.
DEMAS · JIT Audit Layer
Deterministic Evaluation & Monitoring Audit System — intercepts at every node boundary. Validates data integrity, schema compliance, and output quality in real time. 68.9% pass rate · fail-closed — rejected outputs never propagate downstream.
Sparse Activation & Routing
Multi-LoRA serving engine.
Base model: Gemma 4 MoE (128 experts, 4 active per token). Only 4B parameters fire per forward pass despite 26B total — cost-efficient sparse inference without sacrificing capacity. Multi-LoRA serving enables fast adapter switching at inference time.
Base model: Gemma 4 26B-A4B MoE
LoRA adapters · 18 prompts per tenant · 8 of 11 tenants shown
Isolation stack
Prompt
scoped system cache
Deterministic Quality Gate
O-R-A-V validation engine.
O-R-A-V is a control-flow pattern. Node 6 executes deterministic validation across every content block: Observe diagnostics, Reason about severity, Act with corrections, Validate the final output. Zero LLM calls — pure rule-based defense-in-depth.
V
Validate
final gate decision
Deterministic checks (Node 6)
Template variable leak detection
Transactional language blocklist
Character length bounds
Internal label leak detection
Empty field validation
Schema compliance enforcement
FAIL-CLOSED POLICY
Below threshold → halt → Firestore trace → downstream block → retry with corrected prompt
Self-improving Data Flow
Every run becomes training data.
Production runs write to a 3-tier dataset. O-R-A-V scores and DEMAS verdicts route each output into a tier. DPO preference pairs are assembled automatically from the spread between tiers and queued for offline LoRA fine-tuning.
T1
production-baseline
All production runs ingested. Raw I/O pairs across 18 prompt-specific partitions.
↓ O-R-A-V ≥ 0.7 && DEMAS PASS
T2
quality-approved
High-quality outputs curated as chosen examples for DPO training pairs.
↓ O-R-A-V < 0.5 || DEMAS FAIL
T3
failure-cases
Rejected outputs curated as rejected examples. Includes DEMAS failures + node errors.
3
Evaluate
O-R-A-V judging
4
Label
Chosen vs rejected
DPO preference pairs → LoRA fine-tuning → model update
Margin-maximized (chosen, rejected) pairs with score gap ≥ 0.15 feed curriculum-based LoRA training.
Execution Model
Multi-tenant pipeline architecture.
Each tenant runs an independent, auto-scaling pipeline with dedicated compute. 18 prompts auto-bind with LoRA adapters per client_id. Previous successful runs serve as tuned few-shot context for every sub-agent execution.
Compute isolation
Auto-scaling pipeline
Each tenant gets a parallel, independent pipeline with dedicated GPU/CPU. Resources auto-configure based on data volume, epoch count, batch count, and batch size.
Adapter binding
18 prompts × client_id
Each of 18 pipeline prompts auto-binds with a tenant-specific LoRA adapter at inference time. No cross-tenant contamination. Previous successful runs feed tuned few-shot context per prompt.
Hybrid execution
Deterministic + agentic
Each tenant pipeline mixes deterministic Python logic (Nodes 4, 6) with agentic inference (Gemma 4 MoE, Gemini). Nodes 4 and 6 are fully deterministic.
Tenant pipeline lifecycle
1
Pipeline initialization
Tenant data volume determines compute allocation. GPU/CPU auto-scaled per batch size and epoch count.
2
Adapter binding
18 LoRA adapters auto-bind per client_id. Each adapter carries tuned weights from previous successful runs.
3
Few-shot context injection
Previous high-scoring outputs serve as few-shot examples per prompt, per task, per sub-agent. Context is tenant-scoped.
4
DAG execution
Pipeline runs autonomously through all DAG nodes. Deterministic gates and agentic nodes execute in sequence. DEMAS audits every boundary.