Bridging LLM Decision Readouts into DuckDB: Zero-Token Probabilistic Classification via LuaJIT UDFs

Shoddy_Telephone9702 · reddit · 2026-09-22

The author shares an approach to wrap a typed decision readout head (jevask) into DuckDB via LuaJIT UDFs: read top-k probability distributions at the single decision token with zero extra generation, mathematically guarantee schema-safe outputs, and project probabilities/confidence directly into SQL columns for filtering and gating. Key lessons: keep logic server-side (transport-only design), and return explicit 'error:' strings since thrown exceptions get swallowed into NULL in duckdb-luajit. Code available on GitHub.

Original post →

More from Infra

Infra channel →