Ask Your Database Questions: How AI Turns FileMaker Data into Charts
TL;DR
- A conversational reporting pipeline turns a plain-English question into a SQL query, runs it against your data, and returns a chart — all in seconds, inside a normal web page
- The pattern works well when the data layer exposes a clean schema to the AI and the chart layer renders locally in the browser
- It breaks when the AI guesses against messy field names, joined tables it doesn't understand, or business logic hidden in scripts
- The fix isn't a smarter model — it's a cleaner contract between the database, the AI, and the chart renderer
Every business running a line-of-business database has the same recurring scene: someone needs a quick answer — sales by region this quarter, open orders by status, who bought twice this month — and the answer lives two exports, one spreadsheet, and a favor from the database person away.
FileMaker teams feel this harder than most. FileMaker's built-in reporting is solid for known questions but painful for new questions. Each ad-hoc ask becomes a layout, a script, or a favor. The AI alternative — "just ask the database a question" — sounds like magic, and it can work. But the magic is a pipeline with three distinct stages, and each stage has its own failure modes. This post is the honest version of how it works.
Why Do Businesses Still Export to Excel for Every Question?
- Reports answer yesterday's questions: A built report freezes one question at one moment in time. Business questions evolve faster than report queues.
- Every new question is a small project: New layout, new found set, new chart configuration, testing, deployment. Small tasks compound into a permanent reporting backlog.
- The spreadsheet workaround becomes the system of record: Once people start exporting and reshaping data in Excel, the "real" numbers live in a file on someone's desktop, not in the database.
- Non-technical people stop asking: When getting an answer requires a ticket, people guess instead. The cost isn't the ticket — it's the decisions made without data.
How Does Plain-English-to-Chart Actually Work?
Under the hood, it's three stages: translate, execute, visualize. The AI model is only one stage — and arguably the least interesting one.
- Translate — the model writes SQL: Your question plus a description of the database schema goes to the language model. It returns a SQL query against your tables. Schema context is everything here: clear table and field names with plain descriptions produce good SQL; cryptic legacy field names produce confident nonsense.
- Execute — the query runs against real data: The generated SQL runs on a read-only connection against the live or replicated database. Read-only is non-negotiable: the model should never be able to write, update, or delete through this path.
- Visualize — the chart renders where the user already is: The result set goes to a chart component embedded in a normal web page. Bar, line, pie, table — chosen from the question's shape, not hardcoded per report.
What Makes the Query Stage Trustworthy?
- Schema descriptions beat raw schema dumps: Feeding the model a thousand column names fails. Feeding it a curated list — "SalesOrder: date of order; LineItems: quantity and price per item; link orders to lines through OrderID" — succeeds. Someone who knows the data must write this map once.
- Business logic lives outside the SQL: "Active customer" might mean last purchase within 180 days and no outstanding balance. If that definition lives only in a FileMaker script, the model can't apply it. Each definition needs to become an explicit, queryable rule.
- Guardrails on the generated SQL: Read-only role, statement timeouts, row limits, and a denylist of dangerous operations. The model is a query assistant, not a DBA — treat its output as untrusted input until validated.
- Show the work: Every chart ships with a "view the SQL" option. When a number looks surprising, anyone can see exactly which query produced it. That one feature does more for trust than any model upgrade.
Why Render the Analytics in the Browser?
The natural instinct is to build a report server: a backend that holds the data, computes aggregates, and serves charts. There's a cheaper pattern — run the analytical engine inside the user's browser.
- No report server to maintain: The query engine (an in-browser SQL engine compiled to WebAssembly) loads with the page. No middle-tier infrastructure, no scaling story, no server bills for overnight aggregation jobs.
- Interactive by default: Filter, drill down, pivot — all of it happens locally against data already in memory. No round trip per interaction, so exploration feels instant instead of ticket-shaped.
- Data stays closer to home: For small and mid-size datasets — the overwhelming majority of operational business data — moving the compute to the browser is faster than moving the data to a server. The browser becomes the report server.
- It embeds anywhere: Because it's just a web component, the same charting layer drops into an internal portal, a customer-facing dashboard, or a management screen without a new application per surface.
Where Does This Pattern Break?
- Messy schemas produce confident wrong answers: If "Status" means something different per table and "Total" includes tax in one table but not another, the model will generate SQL that looks right and computes garbage. The schema map is where you pay down this debt.
- Questions that need judgment get fake certainty: "Which reps are underperforming?" requires definitions of performance, thresholds, and exceptions. The model will answer with an authoritative-looking chart. The pipeline is a calculator, not a strategist — keep human judgment upstream of it.
- Big data and sensitive data need a different shape: Browser-side analytics fits operational datasets. Warehouse-scale data and strictly regulated records need the compute where the data lives, with access controls the pipeline can't replicate.
- Join-heavy questions expose the model's blind spots: The model reliably handles one or two joins against a well-mapped schema. A question spanning five related tables with conditional logic is where hallucinations multiply. Those questions still belong in a curated report.
Is This Worth Building?
- Build it when the backlog of "quick questions" never empties: If the same team answers the same five families of questions monthly, the pipeline pays for itself in freed-up developer time within a quarter.
- Build it when decisions are waiting on data: Sales, operations, and finance people who guess today will ask tomorrow if the answer arrives in seconds.
- Don't build it as the first AI project: This pattern depends on a clean, queryable data layer and documented business rules. Teams without those should fix the foundation first — the AI is the last 10%, not the first 90%.
- Prototype cheap, pilot narrow: One dataset, one user group, one question family. If the schema map holds up and the guardrails catch the edge cases, expand. The narrow pilot is the whole evaluation strategy.
Frequently Asked Questions
How is this different from FileMaker's built-in charts?
Built-in charts answer questions someone anticipated and built for. The conversational pipeline answers questions nobody anticipated, in seconds, without developer time. It doesn't replace curated dashboards — it covers everything the dashboards don't.
Can the AI change or delete my data?
Not through a properly built pipeline. The model's SQL runs on a read-only database role with statement timeouts and row limits. Write operations are blocked at the database level, not by trusting the model. Ask for that guarantee before any vendor says "read-only."
How accurate are the generated charts?
They're as accurate as the schema map and business rules you give the model. Against a clean, documented dataset, routine questions land correctly nearly every time. Against an undocumented legacy schema, they fail often and confidently. Accuracy is a data-governance outcome, not a model property.
Does this work for large databases?
It works for the large majority of operational databases — the day-to-day business data that fits comfortably in a browser. Warehouse-scale data (hundreds of millions of rows) belongs on a real analytics engine with the compute next to the data.
What do I need before I can build one?
Three things: a queryable copy of your data the model can reach, a written schema map and business-rule glossary, and a web page where the charts will live. The model and the chart library are the easy parts — most of the work is making the data legible.
Not sure which fits your process? We build AI reporting pipelines on top of FileMaker data, and the first conversation is about whether your data is ready — not whether we'll sell you one. Get in touch →
