How we describe thousands of tables with an LLM

Sergey Tretyakov1 Oct 2026

Problem

An analyst often spends hours finding which of forty similar tables holds current data. Documenting by hand does not scale: seven employees described 310 data marts of one system in three months, up to six hours per table. Over 600 databases in one cluster grow faster than people document them. Passing only the schema to an LLM gives generic retellings with no business meaning.

Example from the article: a column named status_2 may be a payment status, a delivery status or a migration flag, and the schema cannot tell which.

Solution in brief

The team gives the LLM layered context: sample rows, table class, business domain, glossary and retrieved documentation. Prompt-block tests on 1048 generations showed that a strict output-format block and the documentation block lower quality. Each table class and domain pair gets its own prompt. Simple subtasks such as personal data detection go to small classifiers.

Questions this case answers
  • How to generate accurate business-level descriptions for thousands of tables when column names and types are cryptic and manual documentation cannot keep up with growth
  • How to choose which context blocks go into a generation prompt when each added block may add noise and lower quality
  • How to generate useful business descriptions for thousands of database tables when the schema alone gives only generic text?
  • How to decide which blocks to put in a prompt for table documentation, and why adding more context can lower quality?

Tools and methods

  • LLM-generated documentation — table descriptions, business terms, ER diagrams, personal data labels
  • Context layers — 10 random rows, table class, eTOM or BIAN domain standard or own glossary, documentation
  • Hybrid search in Elasticsearch — full-text plus vector retrieval over Confluence, git and files
  • LLM-as-a-judge with CatBoost — automatic 1 to 5 quality rater for prompt experiments
  • Light classifiers (logistic regression to DistilBERT) — cheap personal data detection trained on synthetic data
Continue reading — it's free

Google or a one-time email code. No password.