Genloop says its database agent writes its own business rules

In short

+22.6 points gain on unseen test questions from learned rules; 36.3% → 19.9% test accuracy when the rule checker is switched off; 2.3–3.3× cost per query without the concept graph; 499 questions, from three databases

The problem it tackles

Text-to-SQL is the job of turning a plain question ("What were net sales last quarter?") into a database query. Inside a company it is hard: a column called net_sales_amt, the paper's example, does not say which sales are excluded or how a quarter is counted. Those habits live in people's heads, not in the database.

Genloop's answer is a Living Context Graph, a layer of business knowledge kept beside the company's existing data store. The data itself is not copied or moved.

How does the agent write its own business rules?

The system first profiles the database and writes a starting catalog of what columns mean and how tables link.

It then learns from use. In the experiments, a wrong answer triggers retries, each checked against the known correct result; 80.6% to 86.4% were fixed within ten attempts. A learning step then proposes a lesson: a metric definition, or a rule such as a filter that must always apply. An admission judge, itself a language model, decides whether the lesson is general enough to keep.

Accepted lessons go into a semantic store, a rulebook in which each rule records the question that taught it. A concept graph links the words people use to the right rules, so familiar questions skip a slower search of the whole store.

The language model stays the same throughout: Google's gemini-3-flash-preview at every stage, with no fine-tuning. Only the rulebook and the graph change.

The test

The authors used three databases from BIRD, a public text-to-SQL benchmark: card_games, toxicology and thrombosis_prediction, 499 questions in all. Of these, 353 form the learning history and 146 are held out. A held-out question was kept only if every business fact it needs appears in some other history question, so gains must come from carrying knowledge across. Scoring is execution accuracy: a query counts as right only if it returns the same rows as the reference query. BIRD's per-question hints were withheld.

Source: the paper, Table 1. Graph routing was off in these runs. The 59.6% ceiling is our arithmetic from 87 of 146.

Across all 499 questions, the catalog alone raised accuracy from 34.1% to 38.7%. The learned rules beat the best "past examples" approach by 12.3 points, although that baseline's search was tuned on the test answers. Each database gained: +28.1 points on card_games, +18.2 on toxicology, +20.0 on thrombosis_prediction.

Checking lessons matters more than collecting them

The sharpest result is about the admission judge. With it switched off, so that every proposed lesson was kept, the store grew from 410 to 488 metric definitions and from 354 to 421 other rules, and accuracy on the test questions fell from 36.3% to 19.9%. More rules made the system worse on all three databases.

What the graph buys

The authors also fed the history in batches of about 20 questions, then tested each run's final rulebook with the graph on and off. Accuracy moved by one question at most per database. Cost and speed did not:

Source: the paper, Table 2.

By the end of each run, 63.6% to 78.9% of test questions were answered entirely from the graph. Learning in batches ended level with learning everything at once on two databases and one answer short on the third.

Genloop's blog highlights one checkpoint where card_games cost fell 19%, from $0.0556 to $0.0448 per query. The wider picture, which the blog also notes, runs the other way: over each run, cost per query ended 2.7 to 5.9 times higher than at the start, as hundreds of learned rules were added to the context the model reads. The authors predict that cost will level off once most questions hit the graph, and call that a hypothesis.

Limits the authors state: one run per condition, three databases, and test questions picked to need knowledge the database layout lacks, so they do not look like everyday company questions. Learning relied on checking answers against known correct results, a stronger signal than real users give. Nobody has measured how often the AI admission judge agrees with human reviewers. The blog itself says the paper does not show production readiness.

Who is behind it

All five authors are at Genloop, which funded the work. YourStory described the company in November 2025 as founded in 2024 by Ayush Gupta and based in Santa Clara, California, and named it among India's most promising startups of 2025. Its product, the Self-Learning Loop, sends each proposed change to a human expert, matching the paper's advice that people, not an AI judge, approve lasting updates.

How open it is: the paper is free to read on arXiv. The authors released the question splits and annotations on GitHub, but not the system's code, and the repository states no licence.

Terms in plain English

Official channels of Genloop: Website · LinkedIn · X

Sources

Sources

Related stories

More from AI in India

All stories from AI in India