See how Cube can help you get the most of your data
Replaced 3,000+ lines of in-house prompts with Cube Cloud — answers in seconds, not days

Brex is an intelligent finance platform that combines corporate cards, spend management, expense tracking, business banking, and travel into a single product, serving over 35,000 companies globally. As Brex set out to redefine financial reporting for its customers, they needed a foundation that could power AI-native experiences with the accuracy, governance, and scale that finance teams demand.
Brex saw that financial reporting across the industry hadn't fundamentally changed in two decades. When a CFO asks "Why is marketing 23% over budget this quarter?", the dashboard shows the what but never the why. Getting a real answer typically requires filing a ticket, waiting for an analyst to write SQL, validating the output, and pasting results into a slide — a two-second question turning into a two-day project. Brex set out to eliminate that gap for every finance team using their platform.
This created several compounding problems Brex needed to solve:
Brex needed a way to give every customer the equivalent of an embedded AI financial analyst — one that understood Brex-specific concepts like card programs, expense policies, entity structures, and approval workflows — without rebuilding the underlying analytics infrastructure from scratch.
Brex built Spaces, an AI-powered workspace for finance teams that delivers insights in seconds rather than days. Underpinning Spaces is a deliberate architectural decision: invest in ontology and semantics before writing a single line of UI code.
After evaluating semantic layer providers including Cube, dbt Semantic Layer, and LookML against AI-readiness criteria, Brex chose Cube and ultimately migrated from their self-hosted open-source deployment to Cube Cloud. The decision came down to three factors: eliminating infrastructure overhead, replacing thousands of lines of brittle prompts with a managed agent, and — most importantly — evaluation results showing that Cube's cloud agent significantly outperformed their in-house agent on data consistency, tool usage, and answer quality.
Cube became the foundation of a three-layer context engineering approach:
To ship AI-native reporting to customers with confidence, Brex also built a robust evaluation system on top of Cube. Online evaluators run lightweight, deterministic checks for production edge cases — like distinguishing "my travel spend" from "the account's travel spend," or ensuring the agent discovers exact enum values before running SQL filters. Offline evaluations use LLMs as judges to score replays across answer quality, chart appropriateness, data consistency, insight relevance, and semantic layer usage. This continuous loop helped Brex raise their insight relevance score from the high 50s to nearly 90%.
The future of reporting isn't a chart, it's an insight. Large language models are becoming a commodity — the LLM is the engine, but the semantic layer is the map. A well-modeled ontology is the difference between 'I don't understand that question' and a correct, contextualized answer with a chart and a clear explanation. Cube gives us the foundation to make that real for every customer.
Dan Meshkov
Staff Software Engineer, Brex
By building Spaces on Cube's semantic layer and AI-native infrastructure, Brex transformed financial reporting from a backward-looking artifact into a real-time analyst experience:
Brex's broader takeaway, applicable to any team building AI-native data products: ontology comes before UX, Certified Queries are how you earn trust, and evaluation systems are non-negotiable when customers make real financial decisions on your AI's output. As Brex puts it, the LLM is commodity — the context is the product.
See how Cube can help you get the most of your data