New The digna Engine: Choose Where Your Data Is Profiled
EN
Book a demo

Blog

LLM Agents Without Illusions: Data First, Model Last at SQLDay Lite 2026

What makes an LLM agent reliable: the model, or everything underneath it? That question ran through one of the Polish-language sessions at SQLDay Lite 2026, held at Gdańsk University of Technology on 24-25 September and organized by Data Community Poland. In "Agenci LLM bez iluzji" ("LLM Agents Without Illusions"), Bartłomiej Graczyk, Head of Digital Technologies Transformation & Chief Architect at Polpharma Group, and Paweł Potasiński, CTO at Infinite Services, gave a clear answer.

The subtitle on their title slide sums up the thesis (translated from Polish): it is data, semantics and evaluation, not the model alone, that decide the quality of an agent. For data teams being asked to put an AI assistant in front of the business this quarter, it is a timely message, because it moves the conversation from "which model?" to "which foundation?", and the foundation is work data teams already know how to do.

One question, three answers: the problem the session tackles

The deck opens with a question every analyst has heard: "What was our revenue in Q3?" Asked three times, the agent on the slide answers 4.2 million, 3.8 million and 5.1 million, each time with complete confidence. The speakers' summary is compact: 100% confidence is not 100% correctness.

From there the slides run an audience exercise. Everyone who builds, deploys or simply uses AI agents is asked to stand up, and then to sit down if any of the following applies: the agent once gave a different answer to the same question, the agent was ready in two or three weeks while governance is still on the to-do list, the agent returned made-up data, an incorrect answer was met with a longer prompt rather than better data, a new AI framework was bought while metric definitions stayed inconsistent, or the agent reached the board before the data was in order. It shows these are shared, everyday experiences, and that the fix sits outside the model.

The diagnosis follows on one slide. Without constraints, a model picks the meaning, the source and the context on its own. The model generates answers probabilistically, while business knowledge has to be controlled deterministically. In the speakers' words (translated): "The problem does not start in the model."

Choose the simplest pattern you can control

Before building anything, the session offers a four-step ladder:

  1. Prompt plus context, which covers most needs and is where to start
  2. A skill, a narrow, described, reusable capability for one task
  3. An out-of-the-box agent, which someone else has already built, secured and maintains
  4. A custom agent, the last resort and the most expensive to build and maintain

The line under the ladder is worth pinning above any AI roadmap (translated): "The best agent is often the one you didn't have to build."

The speakers are equally clear about what a prompt can and cannot do. A prompt can set the role and tone, the answer format, the way to proceed and the length. It cannot repair conflicting metric definitions, the wrong source of truth, gaps in data quality and freshness, or incorrect permissions. Prompts steer behavior; they do not fix the data foundation.

The session also sorts agents by responsibility before technology: conversational agents for documents (Copilot in Microsoft 365), data agents over a semantic model (Microsoft Fabric Data Agent), task agents in a workflow (Copilot Studio) and coding agents (GitHub Copilot). There is no single agent for everything.

Five layers that turn a model into a controlled system

The centerpiece of the talk is a five-layer stack, built from the bottom up:

  1. Authoritative data sources: one source of truth per domain
  2. Quality, contracts, freshness: data quality rules and freshness, in place before the agent
  3. Semantics, metrics, lineage: a glossary, one definition per term, known origin
  4. Controlled agent access: tools, permissions, policies
  5. Evaluation and observability: tests, accuracy scoring, human-in-the-loop

The model is the last layer of the system, not its starting point. As the slide puts it, an agent is only as good as the layer it works on, and the biggest quality lever lies in sources, contracts and semantics.

Three principles make this concrete. Semantics means one definition, not seven: if a person does not point to the right definition of revenue, the agent will not guess it. Sources means a source of truth rather than a "source of everything", with one authoritative source per class of question, each with an owner, a priority and a validity date. Boundaries means the right to say "I don't know": when the source has no entry, the agent refuses or escalates instead of improvising from several sources.

Four demos: same model, different foundations

The demo section compared the same model running on two foundations, judged on three criteria: correctness (is the result right?), repeatability (is it stable?) and explainability (does it point to a source?). The advice on the slide is to watch the mechanism, not just the answer.

  • Metric definition. Asked for the number of orders, the agent without a foundation counted rows with COUNT(*) and returned 2,583, because it had no order_count metric and no description of the grain of fact_sales. The agent with an explicit metric used COUNT(DISTINCT ORDER_ID) and returned 1,313. The row count inflated the order count almost twofold, and the difference came from the metric definition, not a longer prompt.
  • Units. For the average discount, one agent returned the raw decimal 0.1325, the other 13.3%. The second had a semantic description of the DISCOUNT column and a metric that converts the scale automatically.
  • Context. A plain SUM(PROFIT) returned dollar amounts with no margin and no explanation. The grounded agent combined sales, profit and margin and followed an instruction to explain the business picture, pointing to Tables at −8.6%, Bookcases at −4.1% and Supplies at −2.5% margin, and naming heavy discounting in the explanation.
  • Repeatability. A question about the "top" results was ambiguous on three axes: sales, profit or quantity; product or sub-category; top 5, top 10 or everything. A verified query pinned the metric, the aggregation level and the limit, so the answer became the same every time: the top 5 sub-categories by sales, with profit and profit margin.

Each demo ends on the same lesson: repeatability starts with an explicit meaning of the question.

RAG is a data pipeline you can measure

The second half of the session applies the same thinking to documents. Retrieval-augmented generation (RAG), where the model answers from retrieved text rather than from memory, is presented as an eight-stage pipeline, and every stage is both a place where errors enter and a point where you can measure.

Offline indexing covers ingest and parsing (OCR, tables and headings turned into Markdown or JSON that keeps the document structure), chunking by structure (for example 300-800 tokens per section), enrichment with metadata, summaries, entities and glossary terms, and embedding with the embedding model version stored in the index. Online querying covers query rewrite with glossary synonyms, hybrid retrieval with an access-control filter applied before ranking, reranking, and generation with a citation, answering only from the retrieved context and saying "I don't know" when there is none.

The speakers propose a minimum metadata contract for every document: owner / source_id, status + version (only the approved version goes into the index), valid_from / valid_to, domain / doc_type, acl / classification, and language / glossary_terms. Numbers and tables should be stored as structures or SQL rather than embedded as text. The rule on the slide is simple: a document without an owner, a date and a status should not reach the index.

On architecture, the advice is to start with RAG and add agentic behavior only for multi-step work. Plain RAG is a bounded flow with lower, more predictable cost and latency, tested with a question set. Agentic RAG runs a plan-tool-observe loop across APIs, SQL or MCP with contracts and permissions, costs more, and needs trajectory evaluation: did the agent pick the right tools and finish the task?

Without a golden set, you can't tell if the agent got better

Evaluation gets its own four-step process: a golden set of representative business questions with answers and sources, offline evaluation with LLM-as-judge plus a manual sample (every change is a regression test), a deployment gate with quality thresholds in CI/CD (no threshold, no deployment), and online monitoring where user ratings, tracing and new questions flow back into the golden set.

The metrics span retrieval (context recall and precision, hit rate), generation (groundedness, correctness), agents (tool-call accuracy, task success) and operations (the share of "I don't know" answers).

Practical takeaways

The session closes with a production-readiness checklist across four areas: value, data, agent behavior and operations. Condensed into actions for Monday:

  • Start with a prompt and context; build a custom agent only when the simpler patterns are not enough.
  • Agree on one definition per business metric, in a semantic layer, before the agent answers questions about it.
  • Name one authoritative source per domain, with an owner and a validity date.
  • Put data quality rules and freshness checks in place before the agent, not after the first incident.
  • Give the agent a narrow, well-described role instead of a 400-line prompt, and let it say "I don't know".
  • Make sure the agent cites its source and distinguishes missing data from missing permissions.
  • Build a golden set and make quality thresholds a deployment gate.

Where data quality fits in

Layer two of the speakers' stack, quality, contracts and freshness before the agent, is the territory digna works in. An agent that answers "What was our revenue in Q3?" can only be as consistent as the tables underneath it: if yesterday's load is missing, a key column fills with nulls or a reference table goes stale, the agent will still answer confidently. Checking data against agreed rules before it reaches the semantic layer turns "we'll fix it later" into a gate the data has to pass.

digna's Data Validation module covers that rule-based layer, and Timeliness tracks whether data arrives when expected, which answers one of the checklist questions directly: do we know how old the answer is? Together they give an agent's foundation the same kind of regression test the speakers recommend for the agent itself.

Thanks to the speakers and organizers

Many thanks to Bartłomiej Graczyk and Paweł Potasiński for a session that turns agent hype into an engineering plan, with four demos that make the case in numbers, and to Data Community Poland for an excellent SQLDay Lite in Gdańsk. The slides are available in the SQLDay Lite 2026 repository. Their closing line is a good one to remember (translated): "Foundation first. The agent comes last."

Frequently asked questions

What is the main message of the talk on LLM agents without illusions at SQLDay Lite 2026?

Data, semantics and evaluation decide an agent's quality, not the model alone. Bartłomiej Graczyk and Paweł Potasiński open with an agent that answers the same revenue question three times with 4.2, 3.8 and 5.1 million, each time fully confident, showing that 100% confidence is not 100% correctness.

Should you build a custom LLM agent or start with a prompt?

Start with a prompt plus context, which covers most needs. The session's four-step ladder then moves to a skill, an out-of-the-box agent and, only as a last resort, a custom agent, the most expensive option to build and maintain. The best agent is often the one you didn't have to build.

What layers does a reliable LLM agent need underneath the model?

Five, built from the bottom up: authoritative data sources; quality, contracts and freshness; semantics, metrics and lineage; controlled agent access; and evaluation and observability. The model is the last layer, not the starting point, because the biggest quality lever lies in sources, contracts and semantics.

How does a metric definition change an LLM agent's answer?

In the first demo, the agent without a foundation counted rows with COUNT(*) and returned 2,583 orders. Given an explicit order_count metric using COUNT(DISTINCT ORDER_ID), the same model returned 1,313. The almost twofold gap came from the metric definition, not from a longer prompt.

How do you evaluate an LLM agent or RAG system before deployment?

With a golden set of representative business questions, answers and sources, run through offline evaluation with LLM-as-judge plus a manual sample. Quality thresholds in CI/CD act as a deployment gate, so no threshold means no deployment, and online monitoring feeds user ratings and new questions back into the set.

See what digna finds in your data

In a demo we show digna on data like yours, answering the questions your team asks every week.