← All case files

05 · Public · Data platform · 2026

Prompt logs as a data-warehouse problem

An analytics platform for LLM prompt telemetry: about 4.6 million raw execution events normalised, feature-engineered, warehoused and mined.

PythonPostgreSQLFastAPIRNext.js

System flow

  1. Raw logsunstructured
  2. ETLadapters and validation
  3. Feature engine15+ attributes
  4. Star schemaviews and indexes
  5. Analytics APIand a dashboard

The problem

  • Teams tune prompts by feel. The logs that could show what actually works are unstructured and huge.

Constraints

  • Millions of events, one machine, and queries that have to stay fast.

Decisions.

  1. Treat prompt engineering as observability.

    Logs go through schema adapters and validation before anything is counted, so the analysis sits on data you can trust.

  2. A warehouse, not a pile of files.

    A PostgreSQL star schema with materialized views and indexes supports OLAP-style questions in real time.

  3. Start with boring models.

    K-Means clustering, Apriori association rules and a baseline logistic regression tell you whether there is signal before you reach for anything heavier.

What it gave me

  • A FastAPI layer over the warehouse and a dashboard on top, so the backend data work is the product and the UI is a view of it.
Next case file · 01

Turning long, ugly PDFs into structured data