Project

go-system-one

experimental

Local finite-choice decisions with Gemma — yes/no probabilities, named choices and ordered scores in Go.

Overview

Go System One uses Gemma 4 12B to answer questions with a fixed set of allowed outcomes. Give it a support ticket and it can estimate whether it is urgent, choose a team and score its severity, returning probabilities rather than a free-form explanation.

It implements a Jev-like decision interface using a Gemma checkpoint, not Jev weights. A native Go runtime handles inference, with CPU/SIMD execution and NVIDIA PTX loaded through the driver API. The NVIDIA runtime needs neither cgo nor a CUDA toolkit; model files are downloaded separately under the Gemma licence.

How it works

The caller supplies context, instructions and the allowed answers. The server validates the request and compiles those answers into a tree of token sequences. Gemma scores the permitted paths, reusing shared prefixes rather than generating arbitrary text and trying to parse it afterwards.

The API normalises scores over the supplied candidates. A choice returns the winning label and its distribution; an ordered score returns the expected level, which can be fractional. A noul question returns the probability of yes. These probabilities describe the model's preference among the allowed answers, not calibrated estimates of correctness.

Features
Typed questions

POST /v1/systemone accepts one state and noul, choice or score questions, including structured descriptions of the choices.

Batch decisions

POST /v1/decision evaluates independent contexts against boolean and enum fields, with automatic or explicit tree scoring.

Native Go inference

CPU/SIMD and NVIDIA execution for the pinned Gemma checkpoint. The runtime does not depend on llama.cpp.

Shared-prefix scoring

Reuses prompt state and shared candidate prefixes while scoring the allowed answer sequences.

Browser playground

An embedded web UI for both APIs, showing answers, candidate distributions and request timings in light or dark mode.

Explicit limits

Confidence uses local approximations and is not verified against TypeSafe's formulas. Matching its question types does not reproduce Jev's training or calibration; decisions still need evaluation against the intended task.

Architecture
HTTP request State + allowed answers Candidate tree Validate + tokenise Gemma scoring CPU/SIMD or NVIDIA PTX Typed answers Choice, score or P(yes) Constrained candidate scoring with Gemma