Repository navigation
NeuroLink 12.19.0: decide() — a third inference type, and the two bugs that shipped silently #1773
murdore
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
NeuroLink 12.19.0 added
decideas a third inference type alongsidegenerateandstream, and we've written up the design and what went wrong building it.Read it: https://blog.neurolink.ink/posts/generate-stream-decide-a-third-inference-type-for-neurolink/
What
decideisA decision model takes one
stateplus a map of named typed questions and returns one typed, calibrated answer each in a single parallel pass — no text anywhere. The first provider is TypeSafe Jev, reachable directly (TYPESAFE_API_KEY) or through the Vercel AI Gateway (AI_GATEWAY_API_KEY).Where it's already wired in
Five call sites across four files, all fail-open:
routing/classifierStrategies.tscontext/contextDecision.tscore/toolRoutingDecision.tsrag/retrieval/searchDecision.tsRAGPipeline)With no decision provider configured, behaviour is exactly what it was before. Every consumer calls
tryDecide(), which returnsnullon any failure. You can turn this on in production and measure it before depending on it.The design constraint worth knowing
Latency is flat in question count — 1 question 393 ms, 400 questions 465 ms, measured against the live API. That inverts the usual instinct: speculative questions are nearly free, a second round trip is not. So everything batches into one call rather than fanning out.
The part of the post worth your time
Adding the Vercel AI Gateway as a second transport surfaced four bugs. Two threw errors. The other two returned plausible values:
providerMetadata; falling back tomax(probabilities)turned a reported calibrated confidence of 0.10 into a distribution peak of 0.33 — against the 0.3 threshold that gates whether a routing upgrade is acted on.Both passed every test that asserted the call succeeded, because the call did succeed.
Docs: decide inference type · Questions and feedback welcome in this thread.
All reactions