Inspiration

A studio analyst can already query a warehouse. What they cannot do is walk into a greenlight meeting with a read they can defend. General purpose models narrate confident, invented numbers, and a bare SQL result is a wall of rows with no story. We wanted a tool that turns a real dataset into a story you can trust, and that refuses to make one up when the data cannot support it.

What it does

BoxOffice Brain is a data backed multiverse projector for film ideas. You pose a what if (a genre and a year), and it pulls the real cohort of comparable titles from ClickHouse and shows them as a living crowd settling on the rating axis, with the real mean, spread and range. Then Gemini reads that real cohort and tells you the story of where the idea would land, in plain language, using only the numbers the database returned. You explore parallel universes on the multiverse rail, the same scenario across years and across genres, and the crowd and the story re form as you go. When a cohort is too thin to project, it abstains and says so instead of inventing a shape.

A second tab, Ask the data, is the direct path: ask a question in plain English and Gemini writes one read only SQL statement, runs it through the official ClickHouse MCP server, and answers only with rows that came back.

Every dot, line, number and sentence traces to a real row. The refusal to invent is the product, not a caveat.

How we built it

Google Cloud, at runtime: Gemini 2.5 Flash on Vertex AI, driven by a Google ADK supervisor plus three skills, assembled from our reusable agent core. Gemini writes the SQL, and it narrates the projection using only the real cohort numbers.

ClickHouse, at runtime, through its own server: every projection and every question runs read only SQL through the official mcp-clickhouse server and its run_query tool. It is ClickHouse's own server, not a wrapper of ours.

The projector is pure ClickHouse aggregation over a public IMDb catalogue: comparable title cohorts, a year trajectory, and sibling genres, each with a real mean, spread and sample size. Guardrails wrap every query: a read only screen, a table and table function allowlist over comment stripped SQL, an action limiter, and server side bounds. Every decision is written to an audit trail. The UI is a single self contained page served by a small stdlib server, deployed to Cloud Run.

Challenges we ran into

Making the ClickHouse MCP path genuinely load bearing, so it fails loudly rather than silently falling back. Keeping the model honest, so it narrates the real distribution and never emits a number the rows did not contain. And making the whole thing feel like one coherent story to explore rather than a set of panels.

Accomplishments that we're proud of

Gemini tells a grounded story of a real cohort, and it abstains when the data is thin. The projector, the narration and the multiverse are all the same real rows. There is a full guardrail audit trail, a live hosted demo, and an HONESTY.md that maps line by line what is real and how to falsify each claim.

What we learned

ClickHouse's own stance is that trustworthy agents ground answers in query results rather than hallucinating, and that correctness is result set equivalence, not model confidence. Building the product around honest grounding aligned exactly with what the sponsor says good looks like, and letting the model be a narrator of real data, rather than a source of numbers, is what made it both interesting and defensible.

What's next

A private ClickHouse Cloud service, a demographic crowd layer grounded in real audience cohort data so the crowd becomes real people rather than comparable titles, a holdout evaluation harness, and richer scenario planning.

Built With

Share this project:

Updates

Submission history