Just AI Gave an LLM Data Quality Checks but Kept It Out of the Production Database
At Just AI, a large language model (LLM) has been put to work on data quality (Data Quality) checks: finding empty, duplicated and invalid values in tables. The model writes starter checks for a new table and explains a failed alert, but it does not access the production database, the working store with live data. It receives only the schema, a column profile and masked sample rows, and its answer must be valid JSON. The takeaway: let the LLM produce verifiable drafts, and let the engineer make the decisions. The first time sink is the blank page: it is unclear which checks to attach to a new table. The second is alert triage: is the problem systemic or a one-off spike, and what broke? If the model lacks domain context, the rule gets the status needs_domain_info and a list of questions for the data owner.
AI-processed from Just AI; edited by Hamidun News
Data Quality, or data quality, is a set of automated checks that catch empty values, duplicates, invalid formats and odd ranges in tables. The rules themselves are only a baseline. Arina Makunina, an analyst and data engineer at Just AI, wrote on Habr that in production, team time leaks into two "black holes," and explained how they assigned both tasks to a language model (LLM) without losing control. The key condition: the model does not enter the production database, meaning the working store with the company's live data. It works only with pre-prepared context.
Two routines that eat hours
The first is the blank-page effect. A new table or data mart arrives, and someone has to decide which checks to put on it. The team profiles the data, looks at sample rows, forms hypotheses, writes draft tests and wires them into the pipeline. Then the whole process repeats for the next source.
The second is incident interpretation. A check fails, an alert fires, and an almost identical investigation begins. Is this a systemic problem or a one-off outlier? Did the source break, or did something go wrong during transformation? Did the data go bad today, or has it been degrading all week? Who owns this data? Finding the root cause takes a lot of time every single time.
The model within bounds: how the loop is built
The architecture has three layers. The first is the data platform: DDL schemas (table structure descriptions), the history of check runs, profiling aggregates and sample rows. The second is the application layer for data quality: services that generate rules, triage incidents and store results, assembling structured context. The third is the platform LLM layer, a single gateway to the models. It manages models, routes requests, audits calls, controls access and protects data.
The team considered connecting the application layer directly to the model risky, so it added rules. The model has no access to the production database and runs no queries. It sees only DDL and metadata, aggregates, masked examples and run history. It produces artifacts, not verdicts: these are rules in the team's own Python library, which are then executed deterministically and yield measurable results. The principle is "tests as code": a test returns the violating rows, and if there are none, the test passes. Every result must be verifiable, so the answer comes back as JSON with a validated schema. The author calls the architecture deliberately boring: the team trades magic for control and reproducibility.
What it looks like in practice
For a new table, the engineer registers it in the catalog with an owner and a criticality level. The system collects the DDL and column profile on its own, and the model receives a dictionary of available check types and generates a starter set of rules. The prompt forbids using types outside the dictionary, inventing columns and business constraints. Each rule must cite the facts it is based on. If domain data is insufficient, the rule gets the status needs_domain_info and a list of questions for the owner. There are also the statuses auto_ok and needs_review. The result is output as YAML with comments; a human edits the disputed items and commits the rules to the repository.
The review came out candid. Checks for id look like a reasonable starter baseline. A range based on the current minimum and maximum is a bad idea: it is a snapshot of today's state, and a month from now the range will have grown and false alerts will follow. A uniqueness check on an account reference is correct for a one-to-one relationship and wrong if multiple rows can belong to one account, a classic case for needs_domain_info. In places the model made up allowed values instead of choosing from the dictionary and ignored the library's ready-made templates. It also missed a consistency check between two time fields of a single transaction, UTC and MSK.
In the second scenario, the model receives facts: queries for viewing problematic records, check result trends, sample rows, recent changes and owners. In response it explains the problem in plain language, assesses the scale, formulates hypotheses labeled with a confidence level (high, medium, low), and proposes up to seven read-only queries to localize the issue. The prompt forbids presenting a hypothesis as a proven cause and inventing changes that are not in the context.
What to take away
Give the model a closed dictionary of rules and require valid JSON. Let it honestly say "I don't know" through a separate status. Keep a human in the review stage. And remember the limitation: an LLM writes beautifully and convincingly, but it does not know the business logic of your system. For example, it won't understand that an identifier may legitimately repeat up to five times simply because of how the process works. That is why its place is as an advisor, not as the data owner.
- Oct 27, 2026Just AI taught a recruiting agent to run 50+ screening calls a day instead of 8–10
- Apr 30, 2026How Just AI Helped a Bank Break Through Its Automation Ceiling with LLM Agents
- Feb 19, 2026Why a Single AI Agent Falls Short: Multi-Agent Architectures for Real-World Production
- Apr 30, 2026Just AI automates JAICP DSL: an AI agent writes patterns and tests in a minute instead of six hours
Key Questions Answered
What are the key details on Two routines that eat hours?
The first is the blank-page effect. A new table or data mart arrives, and someone has to decide which checks to put on it. The team profiles the data, looks at sample rows, forms hypotheses, writes draft tests and wires them into the pipeline. Then the whole process repeats for the next source. The second is incident interpretation. A check fails, an alert fires, and an almost identical investigation begins. Is this a systemic problem or a one-off outlier?
What are the key details on The model within bounds: how the loop is built?
The architecture has three layers. The first is the data platform: DDL schemas (table structure descriptions), the history of check runs, profiling aggregates and sample rows. The second is the application layer for data quality: services that generate rules, triage incidents and store results, assembling structured context. The third is the platform LLM layer, a single gateway to the models. It manages models, routes requests, audits calls, controls access and protects data.
What it looks like in practice?
For a new table, the engineer registers it in the catalog with an owner and a criticality level. The system collects the DDL and column profile on its own, and the model receives a dictionary of available check types and generates a starter set of rules. The prompt forbids using types outside the dictionary, inventing columns and business constraints. Each rule must cite the facts it is based on. If domain data is insufficient, the rule gets the status needs_domain_info and a list of questions for the owner.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
