Build1 distinct publisher3 min readUpdated
LiveReview's Livi has the LLM write Vega-Lite JSON, then stitches real query results in with Go code, so one definition renders as a browser graph and a flat Slack PNG.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
LiveReview has published how its analytics chatbot, Livi, produces charts from review data: the language model writes a Vega-Lite specification, and the company's own Go code inserts the real query results into `data.values` before anything is rendered [2][5][9]. That ordering is the whole design, and it is the part worth copying, because it moves the failure surface from "the picture is wrong" to "the object does not conform".
The alternative the post rejects is having the model produce an image. According to the author, even if you got an image model to draw a bar chart, you would have no way to verify that the numbers on it are real [4]. That is the correct objection. A rendered PNG is an opaque artefact: there is no field to check, no type to reject, no diff against the result set. A Vega-Lite document is the opposite. It is JSON with a grammar, so `mark: bar`, an x encoding on a temporal `month` field, and a y encoding on a quantitative `review_count` field is the entire chart [5][6]. Vega-Lite does the drawing [7].
The consequence is a narrower job for the model. LiveReview's framing is that the LLM is filling in a well-defined schema, and that models are better at choosing between `mark: bar` and `mark: line` than at hallucinating 600 pixels of a correct y-axis [7][8]. The stronger property is the data split: the model writes SQL, LiveReview executes it, and the result set is stitched in by their code, so the model has presentation latitude and no authority over the values [9]. It is also why one definition can serve two renderers, a live interactive graph in the browser and a flat PNG in a Slack thread [10].
The rest of the pipeline exists because the SQL half is where the real risk sits. There are two SQL-writing steps rather than one: the first estimates how many rows the answer has, so the system can decide whether a chart is appropriate or whether the user should get a CSV instead, and the second fetches the data and specifies how to draw it [11]. Nobody wants a bar chart with 4,000 bars [12]. Every generated query goes through a guard that rejects anything not read-only, checks each table against a denylist, and looks for the shape of a tenant-isolation bypass, including constant-versus-constant comparisons and a bare `OR TRUE` [13]. The failure the author names is `org_id = 1 OR 1 = 1` [14]. The model also sees only a narrowed slice of the schema, because there are 58 tables and counting, covering reviews, pull requests, AI comments and review feedback, and dumping all of them into every prompt is both expensive and a good way to confuse the model about which `created_at` belongs to which table [15][16].
One gap in the published account: the excerpt describes validation for the generated SQL, but no equivalent validation step for the generated chart specification [17]. Vega-Lite has a published schema, so that check is available; it is just not described here. If you build this pattern, the guard on the spec is not optional, because a syntactically valid document can still reference a field the result set does not contain.
What to watch: whether the two-step row-count probe survives contact with expensive queries, and whether the SQL guard's denylist approach holds as the table count keeps rising past 58 [11][13][16].
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
LiveReview built Livi, a chat bot that answers questions about its accumulated code review data with charts rather than paragraphs of hedging.
The post says the tempting, wrong idea is to have the LLM generate an image, and that even if you got an image-generating model to draw a bar chart you would have no way to verify the numbers on it are real, because you would be trusting a model that hallucinates plausible-sounding review counts to also render them faithfully.
The approach LiveReview uses is that the LLM writes Vega-Lite, a JSON grammar for describing charts declaratively; the post says every serious LLM-charting integration eventually converges on this.
The example spec given in the post is: mark "bar", with encoding x = field "month" of type temporal and y = field "review_count" of type quantitative; the post states that is the entire chart.
Vega-Lite does the actual drawing, and the LLM's job shrinks to filling in a well-defined schema.
The post argues models are much better at picking between mark: bar and mark: line than at hallucinating 600 pixels of a correct y-axis.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Detailed but wholly first-party
The mechanism is described with unusual specificity for a vendor post (spec grammar, an example spec, Go-side data stitching, two-step SQL, guard checks, table count), which makes the architecture claims internally coherent. But there is exactly one source, it is written by the vendor about its own system, and it contains no measurements, error rates, adversarial tests, or independent corroboration; the supplied body is also truncated.
Vendor's own deployment only
The only evidenced adoption is LiveReview running Livi internally against its own 58-table schema with browser and Slack rendering. No external users, customer deployments, download or usage counts, or third-party implementations of the pattern are disclosed, so adoption cannot be scored above a single self-reported instance.
Mildly overstated generalization
Most of the post is modest, mechanism-level description that matches its evidence. The overstatement is narrow: the assertion that every serious LLM-charting integration converges on spec generation is presented as settled industry fact with no supporting data, and the safety framing implies the pipeline is trustworthy while offering no guard testing and no described validation of the generated chart spec, against adoption limited to the vendor's own deployment.
Vendor promoting product and library
The post is authored by LiveReview on a developer publishing platform, opens by pitching its 'Blast-Radius Aware AI Code Review for Business-Critical Systems' positioning, and transitions into promotional description of its own dbctx Go library, including a feature list. Every claim about the pipeline's soundness is made by the party that benefits from it being seen as sound; no adversarial or independent voice appears in the cluster.
Low: one self-interested source
Architecture claims are clearly stated and consistent, which supports moderate confidence in what the vendor says it built. Confidence is capped by single-source coverage, strong publisher incentive, absence of any quantitative or independent validation, and a truncated body that prevents checking the later sections.
build
The agent asks, the gateway decides: why read-only is not a security boundary1 distinct publisher
build
Notion's agent stack is live, not slideware, and it only changes one of your decisions1 distinct publisher
build
The 680 MB database that was really a 17 GB disk: self-hosted support platforms fail at month six1 distinct publisher
build
Your "Index Only Scan" Did 2,847 Heap Fetches: Covering Indexes Are a Vacuum Problem1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 16, 2026