What Happened
Two integrations illustrate how AI is moving into existing data workflows: models callable from SQL and agents that operate analytics tools.
An AlloyDB Omni walkthrough demonstrates calling locally hosted models through a PostgreSQL-compatible database. It deploys AlloyDB Omni on Google Kubernetes Engine using Helm and an operator, serves a model through Ollama, and registers that endpoint with the database’s AI integration. SQL applications can then use ai.generate to summarize customer feedback. The configuration includes a 600-second timeout and response processing that removes thinking tags. The broader deployment approach supports keeping prompts and responses within a controlled environment, including air-gapped configurations. [2]
Separately, the alpha release of datasette-charts adds Datasette Agent integration. An agent can invoke chart suggestion and generation tools, display a chart in chat, and recognize a subsequent chart change in the demonstrated workflow. This is a narrow but useful example of an assistant working through structured application tools rather than only generating text. [1]
Why It Matters to Businesses
These integrations reduce application plumbing, but they do not remove production infrastructure responsibilities. SQL-accessible inference simplifies data enrichment. Agent-accessible chart tools simplify analytics interactions. Neither demonstration establishes production throughput, availability, cost efficiency, or authorization guarantees. [1][2]
- Data control: Hosting inference within an approved environment can reduce external data transfers. It does not automatically establish compliance or prevent leakage through logs, tools, or misconfigured endpoints.
- Delivery speed: Existing SQL and application interfaces can accelerate prototypes without requiring every team to build its own model integration.
- Operational exposure: Slow inference can hold database connections open, while interactive agents can create unpredictable demand through repeated tool calls.
- Economics: Local inference exchanges external API charges for infrastructure, capacity planning, model operations, and security work. It is not inherently cheaper.
Kimbodo Engineering Perspective
Integrate AI close to the data, but isolate inference capacity from transactional workloads. A convenient SQL function should not make model latency part of every business transaction.
Direct SQL inference is reasonable for bounded experiments, low-volume enrichment, and controlled administrative workflows. For large backfills or user-facing services, asynchronous processing usually provides better control over concurrency, retries, and failure recovery. A 600-second timeout, as used in the walkthrough, accommodates long-running requests; it is not an appropriate default latency target for an interactive application. [2]
The charting example suggests a complementary design principle: expose typed, constrained tools rather than unrestricted execution. A chart-generation interface is easier to validate and audit than arbitrary agent-authored code. However, recognizing that a chart changed does not establish that its calculations or visual encoding are correct. [1]
We would also distinguish local inference from disconnected operation. The demonstrated GKE deployment does not itself prove an air-gapped installation. Disconnected environments require separate plans for container images, model artifacts, dependencies, updates, and vulnerability remediation.
How We Would Implement It
Separate interactive requests from enrichment jobs
- Database tier: Keep source records and enrichment status in AlloyDB Omni. Use direct SQL inference only where measured latency and connection usage are acceptable.
- Asynchronous tier: Submit enrichment jobs through a durable queue or transactional outbox. Workers fetch authorized records, call inference, validate results, and write versioned outputs back.
- Inference tier: Run Ollama or another suitable serving runtime on dedicated compute, with resource limits, bounded concurrency, and network access restricted to approved callers.
- Application tier: Give analytics agents narrowly scoped chart and query tools. Enforce dataset permissions server-side, and return structured chart specifications that the application validates before rendering.
Make deployment and evaluation repeatable
Manage infrastructure, operator configuration, model registration, and database migrations through version-controlled deployment pipelines. Pin model artifacts and serving versions. Test operator and database compatibility before upgrades; the versions in a walkthrough are an implementation snapshot, not a permanent production baseline. [2]
Benchmark with representative inputs and concurrent traffic. Measure queue delay, inference latency, database connection occupancy, output validity, and cost per accepted result. Store the model version, prompt-template version, and input revision with each generated artifact so it can be reproduced or invalidated.
Use representative evaluation cases before promotion. For summaries, test factual fidelity and omission of critical details. For charts, validate aggregation, units, filters, and access permissions—not just whether rendering succeeds.
Risks, Costs and Security
- Database saturation: Per-row inference can multiply calls unexpectedly. Limit batch size and concurrency, and separate inference permissions from ordinary reporting access.
- Infrastructure cost: Compare fully loaded local serving costs against managed APIs at expected utilization. Include idle capacity, redundancy, storage, upgrades, and engineering support.
- Prompt injection: Treat customer feedback and retrieved records as untrusted input. Do not let their contents grant tool permissions or trigger privileged actions.
- Sensitive output: Apply access controls and retention rules to prompts, traces, and generated results. Removing thinking tags, as the walkthrough does, is formatting—not a security boundary. [2]
- Failure recovery: Use bounded retries, idempotent writes, and failed-job handling. Keep core application workflows available when inference is unavailable.
The practical opportunity is to add AI through familiar data and application interfaces while preserving operational boundaries. Production success depends less on making the first model call than on controlling its permissions, latency, failure behavior, and cost.
Where Kimbodo Comes In
Kimbodo builds and operates this in production for businesses — see our AI Infrastructure & MLOps practice, or Estimate My Infrastructure.