Skip to content
anup-aPublic

About

Generative UI that tells you when it is guessing. Picks a component via typed Jev questions, and renders both candidates when confidence is low.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

jevui

Generative UI that tells you when it is guessing.

Point it at a JSON file. It picks a component, picks the fields, and renders a self-contained HTML page. Every one of those decisions is a typed Jev question over a fixed registry, so the model never writes markup and structurally cannot ask for a component or a field that does not exist.

The part that is different: when Jev is not sure, jevui does not pick. It renders both candidates side by side and says so.

$ jevui examples/revenue.json -o out.html
line_chart  p=1.00  c=1.00

$ jevui examples/two-points.json -o out.html
bar_chart   p=0.47  c=0.34   ambiguous, also rendering line_chart (p=0.46)

Why bother

Every generative-UI demo picks something. That is fine when the answer is obvious and quietly wrong when it is not, because a confident-looking render is indistinguishable from a coin flip.

Jev returns a confidence alongside the answer, and on this task it separates cleanly. Measured live against the registry below:

Payload Choice Confidence
12 months of revenue line_chart 1.00
User records with roles table 1.00
Three headline numbers stat_cards 1.00
20 categories bar_chart 0.63
Time series with five fields table 0.50 / line_chart 0.48 0.38
A two-point series bar_chart 0.47 / line_chart 0.46 0.34

The two it is unsure about are the two a designer would argue about. Two points is not enough for a line, and a time series with five fields per row is genuinely a table-or-chart question. So the uncertainty is not noise, and it is worth showing.

Install

curl -fsSL https://raw.githubusercontent.com/anup-a/jevui/main/install.sh | sh

Or directly:

uv tool install git+https://github.com/anup-a/jevui
JEVUI_API_KEY=...   # or JEVGREP_API_KEY, or TYPESAFE_API_KEY

Usage

jevui [OPTIONS] FILE
Flag Meaning
-o, --out PATH Write the HTML here (default jevui.html)
--title TEXT Page heading
--min-confidence F Below this, render both candidates (default 0.7)
--explain Print the decisions and their probabilities
--json Print the decisions as JSON instead of rendering

Exit codes: 0 rendered, 2 error.

The registry

Jev answers a choice question over exactly these keys, so adding a component here is the only way for one to appear.

Key Used for
line_chart A value changing over an ordered time axis
bar_chart Comparing a numeric value across a few named categories
table Rows of records with several fields each
stat_cards A handful of headline numbers
list A sequence of short text items

For charts it then asks which field is the label and which is the value, again as a choice over the field names actually present. A hallucinated column is not representable.

What it sends

Not your whole file. Row count, field names, which fields are numeric, and the first five rows. That keeps a 10,000-row file as fast and as cheap as a 10-row one.

Companions

  • jevgrep: grep with a question instead of a pattern
  • jevutils: semantic sort and uniq

All of them share the same instinct: when the model is not sure, say so rather than guess.

Licence

MIT.

About

Generative UI that tells you when it is guessing. Picks a component via typed Jev questions, and renders both candidates when confidence is low.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages