Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

incident.io 10 min read Case study mediumAdept

Institutional knowledge doesn't scale: Building an agentic data analyst

incident.io built an internal "data brain" agent that answers business questions against BigQuery by encoding institutional analyst knowledge rather than relying on raw text-to-SQL. A query skill routes the agent through per-domain themes, vetted SQL examples and schema subsets hydrated at compile time by a Go CLI from the semantic layer, dbt manifest and BigQuery metadata. A guarded data_query tool dry-runs SQL, enforces table allow-lists and scan limits, and logs every call with the guidance consulted. Examples are bootstrapped from certified dashboard SQL, and a theme-audit routine catches guidance rot such as stale examples, missing coverage and trigger-phrase collisions. Over half the company uses it weekly, with near 60% week-on-week retention.

Assumes: SQL and data warehousesdbt and semantic layersLLM agent tool use

Related posts

  • Inside OpenAI’s in-house data agent

    OpenAI mediumAdept

    OpenAI built an internal GPT-5.2-powered data agent that answers natural-language analytics questions over a platform of 600+ PB and 70k datasets, available via Slack, web, IDEs, Codex CLI and ChatGPT through MCP. Its accuracy rests on six layers of context: table usage and lineage, human annotations, Codex-derived code-level table definitions, institutional knowledge from Slack/Docs/Notion, a user-correctable memory, and live warehouse queries. A daily offline pipeline normalizes and embeds this context for RAG retrieval, keeping latency predictable across tens of thousands of tables. Quality is protected with Evals API test sets that compare generated SQL output against golden queries.

  • Building a RAG pipeline for Google Analytics with ClickHouse and Amazon Bedrock

    ClickHouse mediumAdept

    A natural language interface over raw Google Analytics data stored in ClickHouse is built as a multi-step RAG pipeline that generates SQL from user questions using Amazon Bedrock models. Drawing on text-to-SQL research such as DAIL-SQL from the Spider benchmark, the design retrieves similar example questions and their SQL via vector embeddings, because concepts like "returning users" cannot be inferred from the schema alone. Embeddings come from a Python executable-pool UDF calling Titan embeddings, with retries and backoff for Bedrock quotas, and are invoked at query or insert time. ClickHouse serves as both the vector store and the analytics database, and specific settings are given to parallelize embedding generation on small tables.

  • Beyond the Dashboard: Accelerating Real-Time Intelligence in the Age of AI

    Booking.com Engineering easyNovice

    Booking.com built a "talk to your data" self-serve analytics setup on Snowflake: semantic views define consistent business metrics, dimensions and table relationships, and Snowflake Agents translate natural-language questions into SQL against them. Answers produced from expert-verified queries are badged as verified. Changes to semantic definitions go through dbt and GitLab merge requests that need two approvals. A worked example uses Tableau workbook telemetry from the Hadoop-to-Snowflake migration. Acknowledged tradeoffs are semantic-layer maintenance debt, higher compute and token costs (mitigated with dedicated warehouses, timeouts and guardrails), and silent hallucinations on unverified questions.

  • The Agentic Analytics Benchmark, round two: GPT-6, Claude Opus 5.5, Claude Sonnet 5.5

    ClickHouse mediumAdept

    Five new models (GPT-6 Astra, Luna, Sol, Claude Opus 5.5 and Claude Sonnet 5.5) were added to a frozen 201-question agentic text-to-SQL benchmark over a synthetic ClickHouse warehouse. All five land in a statistically tied 68.7–69.7% band, below leader Claude Fable 5.1 (76.6%), and no GPT-6 variant beats GPT-5.5 at default reasoning effort. Sonnet 5.5 is the standout: +6.5 points over Sonnet 5, concentrated on multi-hop dimensional-layer questions, with zero turn-limited runs (vs 16), 3.5 mean turns vs 9.1, and about 5 cents per question. Wrong planning remains the dominant failure mode and runtime SQL errors have disappeared. Harness changes include engine/timezone pinning, credential preflight, configurable numeric tolerance and a Rasch model for judge uncertainty, and the advice stands to run the open-source harness on your own warehouse.

  • Agent-Facing Analytics

    ClickHouse easyNovice

    AI agents are emerging as a new user persona for real-time analytics databases, generating high volumes of concurrent, iterative exploratory SQL queries on behalf of users. Real-time OLAP systems suit these workloads because of fresh data, fast aggregations, high concurrency and consolidated domain data, but could adapt further through templated query endpoints, LLM-oriented SQL extensions for data discovery, LLMs.txt documentation, server-side agent memory and caching, and short-lived task-scoped access tokens. The ClickHouse MCP server demonstrates the idea today, exposing tools to list databases, list tables and run SELECT queries for models like Claude.

The quest for software engineering knowledge.

Look:
Layout: