KPIAssembler: stop hand-picking KPIs, let AI propose them
Text-to-SQL looks great in a demo. Then someone ships a conversion rate that JOIN s without ON , a revenue figure that double-counts through a fan-out, or a "tenant-safe" query that forgot account_id . The chart library was never the hard part. Metric definition is. I built KPIAssembler for that gap: inspect the live schema, let a model propose KPI recipes, and let deterministic Ruby decide what…
KPIAssembler is an AI-powered tool designed to streamline the process of defining key performance indicators (KPIs) by proposing KPI recipes based on a live database schema. The tool identifies potential issues in metric definitions, such as incorrect joins, double-counting, and missing columns, before they reach the publishing stage.
It uses machine learning models like Gemini and Ollama to suggest KPI recipes, but ultimately leaves the final decision-making to a deterministic Ruby code that certifies the accepted candidates. The code ensures that each KPI adheres to strict guidelines, including using only existing tables, respecting tenant scope, and avoiding unsafe joins.
If any checks fail, the KPI is marked as a draft with specific reasons for rejection. This allows developers to review and correct their queries before the metric is officially published. KPIAssembler is integrated into a Rails 7 application, with a configuration file specifying connection settings, tenant column, and LLM provider.
It offers a user-friendly interface to discover and manage KPIs, with a focus on transparency and accountability in the KPI definition process.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.