Skip to content
← All issues

Readyset Weekly: Issue 67

Your AI Agent Has Never Seen Your Real Data

An AI agent that performs well in a demo environment is usually running under conditions that allow for that. The dataset is small, the whole schema fits in the context window, and someone is watching every query it fires. If you point that same agent at a real database, what often breaks first isn't the actual model, but the context the agent needs about the underlying data.

Research on production text-to-SQL systems has found that schema misinterpretation, not language understanding, is the leading cause of query failures once schemas get large or poorly documented. Even in the best-case scenario where the agent does interpret your schema correctly, it only knows how the database is structured. It doesn't know how the database behaves in production, which leaves three critical gaps.

  1. It doesn't know the scale or distribution of your data. An agent can read your schema top to bottom and still have no idea that one table holds two hundred rows while another holds four hundred million. The query it writes may look reasonable and run well against test data, but perform poorly against production data because it was generated without the context of table sizes, value distributions, or data skew.
  2. It doesn't know what's already slow. Experienced database operators often develop a mental map of which joins are expensive and which patterns to avoid, built up from the incidents that taught them. Without access to query history, performance telemetry, or incident records, an agent lacks that context and will often repeat problematic patterns that don't get caught until the queries are running in production.
  3. It doesn't know what's safe to run. In an isolated demo, a bad or expensive query is being executed against test data. Once in production, an agent can execute those queries repeatedly without context on how much load the database can safely handle. For safe production, agents need a bounded scope and safeguards.

Closing that gap requires giving the agent a view of how the database behaves, not just how it's structured. Through RDST, an agent can inspect live or historical query statistics, identify expensive and frequently executed queries, and analyze execution plans. RDST provides actual workload context, so your agent isn't learning through trial and error on your production database.

🔍 What We're Watching in the Database Ecosystem

Scaling Security Insights 10x Without Adding Hardware

Cloudflare's security scanning system was stuck at about 10 scans per second with a target of 100, and the team's first instinct was the usual one: more Kafka partitions, more resources, maybe a rewrite. What actually got them past 120 per second was going after the bottlenecks in their Kafka consumers, their Postgres queries, and their internal API, no new hardware involved.

Designing AI Agents to Resist Prompt Injection

OpenAI's security team argues that the goal isn't to perfectly detect every malicious input, but to design the system so the damage stays contained even when an attack gets through. Their recommendations, including scoped permissions, approval gates for high-impact actions, and treating all external content as untrusted, offer a useful blueprint for letting an agent near a production database without handing it the keys to everything.

In Case You Missed It

The AI buildout is quietly repricing ordinary compute and memory, and the database is where that pressure is landing. Our new research briefing, "How the AI Buildout Is Repricing the Rest of Your Infrastructure", traces why memory costs are climbing, why the database absorbs it first, and which fixes pay for themselves at today's prices. It's a read for anyone whose 2027 budget is still assuming that the cloud gets cheaper every year.

Know a database aficionado who'd appreciate this? Forward it their way.

Get Readyset Weekly in your inbox

One email a week — what shipped, what we learned, and what is worth reading.