<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Serra Isik on Medium]]></title>
        <description><![CDATA[Stories by Serra Isik on Medium]]></description>
        <link>https://medium.com/@serra.isik5?source=rss-2aef79ad1289------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gqBG5UruBiHMR5Ce4JJtWg.jpeg</url>
            <title>Stories by Serra Isik on Medium</title>
            <link>https://medium.com/@serra.isik5?source=rss-2aef79ad1289------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 19:12:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@serra.isik5/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building Zoe: An Evolving Data & Analytics Agent with Company Know-How]]></title>
            <link>https://engineering.getmidas.com/building-zoe-an-evolving-data-analytics-agent-with-company-know-how-e771192d62cb?source=rss-2aef79ad1289------2</link>
            <guid isPermaLink="false">https://medium.com/p/e771192d62cb</guid>
            <category><![CDATA[harness-engineering]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Serra Isik]]></dc:creator>
            <pubDate>Wed, 23 Sep 2026 07:28:49 GMT</pubDate>
            <atom:updated>2026-09-23T18:23:14.193Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How we built a semantic knowledge layer on top of our warehouse, turned it into an SQL generator, and evolved it into an agent harness for dashboards, analytics, and beyond.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQneTLh_hfZjHoAbdQ5lyQ.png" /></figure><h3><strong>Introducing Zoe: Our Data &amp; Analytics Agent</strong></h3><p>Data access has historically been a human bottleneck. When knowledge about the right tables, relations, and business logic is locked in the heads of a small group, getting an answer becomes a slow dependency for everyone else. While using an AI agent to generate SQL might seem like an obvious fix, the real challenge is deeper: generating reliable, grounded insights. Schemas document structure but not meaning — and structurally valid data can still hide ambiguity, inconsistency, and assumptions that only become visible with additional context. As business definitions shift and assumptions expire, even previously trusted dashboards grow stale. [1]</p><p>The most valuable answers require connecting knowledge across domains: what a table means, how it is filled, what the source application actually generates, what a product launch changed, and how a metric is defined this quarter, and so on. Looking only at the warehouse or ETL shows half the picture, the origins and business semantics of the data often live in the application that produced it. That cross-domain context only gets harder to maintain as data structures and organizations grow. Past a certain scale, no single person can hold it all; <strong>it was never really a human job to begin with.</strong></p><p>Zoe is our internal AI data &amp; analytics agent at Midas. You can ask it anything in plain language. She knows our warehouse, our business definitions, and the institutional knowledge that never made it into any documentation.</p><p>This article is intended to be the part 1 of a series incrementally covering what we have built so far, the decisions behind each piece, and where it’s heading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1wPFlEVKTo5fPrjTX92b8g.jpeg" /><figcaption><em>Zoe’s Web UI</em></figcaption></figure><h3><strong>How Zoe Started: From Business Questions to Trustworthy SQL</strong></h3><p>Zoe did not begin as the broad data and analytics agent it is today. Her first version deliberately had a narrow scope: users should ask data-related questions in plain language, and Zoe should identify the relevant business entities, find the right tables and translate each question into a trustworthy, executable SQL query. This scope gave us a focused starting point for understanding what it takes to navigate our data reliably.</p><p>The first version was a plan-based ReAct agent built around two phases, following the same broader idea of iterative reasoning and interaction that has since been explored specifically for text-to-SQL systems. [2][3]</p><ul><li><strong><em>Entity discovery: </em></strong>read the question, identify business entities (Users, Deposits, Orders), and propose candidate tables.</li><li><strong><em>SQL generation: </em></strong>verify assumptions against the warehouse and refine the query until it is confident.</li></ul><p>To ground each step, we gave Zoe a set of read-only tools: semantic table search over the Knowledge Base (we will get back to this one), schema lookup, EXPLAIN for execution plans, SELECT … LIMIT probes, and distinct-value checks so it would filter on values that actually exist instead of guessing. When a question was ambiguous, it paused and asked a clarifying question, then resumed from where it left off. The final query was handed to the user over the BI platform, where execution and access control already lived.</p><p><strong>What we aimed for</strong> is correctness and trust over convenience. We purposely stopped at SQL generation rather than executing queries and returning final answers. A wrong number is worse than no number, SQL is easy to inspect and correct. Moreover, delegating execution in BI and analytics platforms kept Zoe simple, directly relying on existing BI platform’s RBAC. The goal was the smallest reliable abstraction: get the right query in front of the user, transparently, so they could review and correct it if something seemed off.</p><p><strong>What we got</strong> is a working MVP in 2 months. Grounding the agent in real metadata and forcing it to verify values made the generated SQL genuinely trustworthy, and the clarification loop restrained Zoe from assuming. We had built her with detailed, prescriptive prompts: explicit rules for every reasoning step, hardcoded sequences, and specific output formats. Meanwhile, models gained native tool calling, extended thinking, and MCP integration capabilities, while the UX around similar agents became more conversational, transparent, and interactive, enabling the user to discover their own ways of working. Our rigid architecture could not benefit from these advances without prompt rewrites, each of which added to the risk of behavioral drift or required another full round of testing and evaluation. Stopping at SQL generation, which had felt safe for an MVP, also became a ceiling: users did not want a dry query; they wanted an answer they could trust, keep, and build on.</p><p>Nonetheless, while that MVP was live we gathered a lot of insight for what came next. We understood that <strong>we need to build something evolving and extending with both model capabilities and user expectations</strong>. Five lessons shaped everything that followed:</p><ul><li><strong>Correct SQL is not enough without the evidence behind it.</strong> The right query producing the right data still needs grounding: documentation, the codebase that produced the tables, and execution logs that show what actually ran. Without that backing, even a correct answer is hard to trust.</li><li><strong>Experience matters as much as the quality of the answer.</strong> Users need visibility into intermediate steps, the agent’s thinking, tool decisions, and the context it used — not a black-box query dump. This is especially true for people who don’t write SQL: a dry query they couldn’t read isn’t an answer, it was homework.</li><li><strong>The session is where relevant context is born and living.</strong> Every discovery — the right table, the correct join condition, a clarification the user just made — lives in the conversation. Keep that context in the session, and save what’s valuable for the future instead of throwing it away when the chat ends.</li><li><strong>Don’t assume the user journey.</strong> Needs only become clear once we watch real usage: feedback, human evaluation, focus groups, and intensive care sessions with early users. The product we think people wanted and the product they actually need are never the same.</li><li><strong>Don’t swim against the trends and habits.</strong> Adopt model and tooling advancements as they arrive, and comply with established UX rather than inventing a parallel one. Fighting the ecosystem means constant rewrite cost; moving with it means free gains.</li></ul><h3><strong>The Principles We Built On</strong></h3><p>Before we started building, we wrote down four explicit principles. These drove every architecture decision that followed.</p><p><strong><em>We can’t out-pace model providers.</em></strong><em> Model capability improves at a pace we can’t match. Our differentiation has to be orthogonal: company memory, tribal knowledge, self-learning from how users actually work. Every model release makes Zoe smarter for free. Our job is to build the layer that benefits from that.</em></p><p><strong><em>One agent, not many.</em></strong><em> Every multi-agent split we considered introduced a new context boundary, a new prompt to maintain, and another coordination problem. Rather than orchestrating specialized sub-agents, we keep one agent and give it the right tools. Multi-agent systems can be a strong fit for breadth-first, parallelizable research; our workload instead tends to accumulate shared context and dependent discoveries across a session, so we chose to avoid introducing those extra coordination boundaries. [13]</em></p><p><strong><em>High-level guidance, not step-by-step prompting.</em></strong><em> We keep the system prompt small, containing only durable guidance about the agent’s role and behavior. Domain knowledge, company conventions, and task-specific context are injected at runtime through memories and knowledge retrieval. This keeps prompts maintainable, avoids stuffing permanent instructions, and lets the system evolve without constant prompt rewrites.</em></p><p><strong><em>The data doesn’t all live in the warehouse.</em></strong><em> The data warehouse (DWH) has the numbers. Our git repositories have both the application code that generates the data and the transform queries. The documentation platform has the definition debates. The logging platform has the logs. Other teams have APIs. A useful data agent has to reach all of this. Critically, adding a new tool requires no prompt changes, just configuration.</em></p><p><strong><em>Every interaction should make Zoe better.</em></strong><em> The answer to today’s question shouldn’t disappear when the conversation ends. User corrections, successful investigations, evaluation results, and operational signals are opportunities to improve the system. We capture those signals and turn them into lasting improvements</em></p><p>This philosophy shapes Zoe’s architecture. We think of the system as two connected loops. The inner loop handles today’s request: assembling context, calling tools, and producing an answer. The outer loop continuously improves the system by learning from those interactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V_9yLY8ixShmvK58KnMhUA.png" /><figcaption><em>Zoe at a Glance</em></figcaption></figure><h3><strong>The Data Stack Behind Zoe</strong></h3><p>Before getting into the agent itself, it helps to understand the data stack behind it. Much of what makes Zoe useful comes from the systems it connects to and the layers that make company data discoverable, interpretable, and usable by the agent.</p><p>Our data warehouse (DWH) is managed by script-based migrations and managed by our workflow orchestration platform. On top sits <a href="https://open-metadata.org/">Metadata catalogs</a>, our metadata catalog for tables, columns, lineage, ownership, and descriptions. Zoe’s Knowledge Base (KB) is built from this layer.Our data stack follows an ELT pattern: source data is loaded into the warehouse first, and transformations are applied downstream inside the warehouse. Keeping raw data available is important for Zoe because it can move below curated models when a question requires the original source context. [6]</p><p>Importantly, Zoe reaches more than curated marts. It has access to both the modeled, transformed tables most analytics runs on and the reliable raw layers underneath. So when a question goes beyond what someone already built a mart for, Zoe can drop down to source data, leveraging the full depth of the warehouse, not just its polished surface.</p><p>That depth is bounded by access policy. Zoe queries the warehouse over read-only connections scoped by role, sensitive schemas and columns are excluded from the agent’s reach, and every executed query is logged and attributed to the requesting user.</p><p>This idea of building database-specific familiarity before generation has also been explored directly in text-to-SQL systems, where agents first learn local schema and query patterns before answering user questions. [5]</p><p>A scheduled Workflow orchestration systems DAG converts Metadata catalogs entities into KB documents, generates embeddings, and upserts them into a vector index. Each table becomes a single document and embedding. Rather than rebuilding the entire index, the pipeline diffs each run against the previous snapshot, re-embedding only tables whose metadata has changed while skipping the rest. This keeps the knowledge base continuously synchronized with Metadata catalogs while keeping embedding costs low.</p><p>Zoe’s long-term memory is stored separately from the Knowledge Base. While the Knowledge Base answers questions like <em>“What tables and columns exist?”</em>, memory captures lessons from past interactions, for example company-specific conventions, successful query patterns, and user corrections. Both are embedded and stored as vectors, but they are maintained as separate datasets and retrieved independently when relevant.</p><p>Beyond the warehouse, Zoe reaches the organisation’s git repository collection (multi-repo: backend services, data transform queries, pipeline code), the org-wide documentation platform (internal documentation), and the org-wide internal communication platform (tribal knowledge threads) at query time.</p><p>Code access, in particular, sets Zoe apart from most text-to-SQL tools. A column description tells you what a field is <em>supposed</em> to mean; the application code that generates it and the transform logic reveal how the data is actually created, changed, and stored. When a definition is ambiguous, Zoe can read the transformation that produced the table, trace a value back to the service that emitted it, or check the migration that added a column. <strong>This is how a data engineer actually answers a hard question at Midas: by reading the code, not just the catalog. </strong>It lets Zoe resolve the kind of definitional edge cases that pure schema-based tools have to guess at.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vwTlyH4Ri-4m10QhiPKHqQ.png" /><figcaption><em>Zoe’s Knowledge Architecture</em></figcaption></figure><h3><strong>The Agent Harness</strong></h3><p>At the center is the model and its native capabilities: reasoning, tool calling, and streaming. Around it, the harness has three concerns:</p><ul><li><strong>Infrastructure</strong> — the model proxy and observability that wrap every call</li><li><strong>Context assembly</strong> — the pipeline that determines what each turn sees</li><li><strong>Background jobs</strong> — the work that keeps that context fresh and evaluated</li></ul><h4>Model &amp; Infrastructure</h4><p>Zoe relies on the model’s native reasoning, tool-calling, and streaming capabilities. Rather than reimplementing them, we focus on assembling the right summaries, memories, and knowledge for each turn. That session context layer is where we add value.</p><p><a href="https://github.com/BerriAI/litellm">LiteLLM</a> sits between the application and model providers as a unified proxy. It gives us a consistent interface for running different models, adopting new releases, and switching models without application code changes. Configurable fallback chains help handle rate limits and provider outages, while automatic token-level cost tracking makes model spend visible per workflow. LiteLLM can also act as an MCP gateway, providing a similar abstraction for tool servers. See our <a href="https://engineering.getmidas.com/scaling-llm-usage-with-litellm-monitoring-quotas-and-spend-management-04b7d818a782">engineering post on running LiteLLM in production</a> for more detail.</p><p><a href="https://langfuse.com/">Langfuse </a>handles prompt management and full tracing. Every agent turn produces a trace; every LLM call is a generation span with token counts and cost; every tool call is a tool span with duration and output size. Prompt versions are managed in Langfuse and cached in memory per container restart.</p><h4>Context Management</h4><p>Context management is where the design choices become concrete. Passing the full conversation history into every turn is expensive and noisy; as sessions grow, older turns drift away from relevance. So each turn gets a deliberately assembled slice instead.</p><p>The context has two parts: what goes into the <strong>system</strong> and what gets appended to the <strong>user message</strong>.</p><p><strong>System</strong> (stable, partially cached across requests):</p><ul><li><strong>System prompt:</strong> “You are Zoe, the data and analytics assistant helping at Midas…”</li><li><strong>User profile:</strong> organisational information, compiled user depictions, user preferences</li><li><strong>Skill file manifest:</strong> compact list of available skill handles and descriptions</li><li><strong>Global knowledge: </strong>company-wide curated facts and conventions, always present in the system</li><li><strong>Retrieved memories:</strong> the top-8 most relevant personal and team memories for this turn, by similarity</li></ul><p>The first four layers are eligible for prompt caching; system prompt and user profile in particular get high cache hit rates and meaningfully reduce cost.</p><p><strong>User message</strong> (per-turn, never cached):</p><ul><li>Last 4 conversation turns verbatim</li><li>Conversation summary, prepended once older turns have been compacted</li><li>Current canvas artifact list and dependency graph if the session has artifacts (see detailed in later sections)</li><li>Uploaded CSVs — users can upload files into the session; their metadata is injected so Zoe can query them via the warehouse tool</li></ul><p><strong>Skills</strong> have three paths into context:</p><ul><li>The manifest is always present in the system — Zoe knows what exists without loading anything</li><li>Users can invoke a skill directly with a slash command.</li><li>If Zoe determines a skill is relevant during reasoning, she loads it by fetching the skill file.</li></ul><p>Any user can create a skill for personal use; skills can also be scoped to a domain or company-wide.</p><p>Background jobs run non-blocking after every turn and keep the context fresh for future requests:</p><ul><li><strong>SummarizerJob:</strong> compacts older turns into a rolling summary, using a lighter model, so the recent-turn window always reflects the most recent work</li><li><strong>ExtractionJob:</strong> extracts knowledge from the conversation into memory (three sub-types; covered in the Memory section)</li><li><strong>ContextEvalJob:</strong> evaluates whether Zoe’s context was accurate and sufficient for the turn</li><li><strong>AccuracyEvalJob: </strong>evaluates whether Zoe’s response was faithful to what the tools returned</li></ul><p>When either job detects an issue, it raises a warning or critical event for review. These evaluations also give us a continuous success metric for Zoe: not just whether the request completed, but whether the agent had the right context and stayed grounded in the evidence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V2B_2MJIBYEPUFCa96p_Dg.png" /><figcaption><em>Zoe Runtime: Request Processing and Background Jobs</em></figcaption></figure><h3>Tools</h3><h4><strong>MCP integrations:</strong></h4><p>Each integration is registered independently and can be rolled out gradually (globally, per team, or per user) via feature flags. Some tools are available to everyone; others stay on-demand until a team or person is ready for them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rpjnCmgTafa72TvWqbZyDA.png" /></figure><p><strong>Native tools</strong> (built into the agent):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qo35wlwcD04SKV3A2_gRaw.png" /></figure><ul><li><strong>One registry, filtered per request.</strong> MCP tools and native tools share the same flat list the model sees. Adding a new data source means writing a server module and registering it; nothing else in the loop changes. Each session then receives only the tools she is allowed to use — based on configuration, feature flags, user permissions, agent role, and runtime settings — so the model never sees tools she shouldn’t call. Roles can also change response shape: a SQL-only role, for example, returns answers in a predefined SQL-focused structure. This is enforced by the harness, not by prompt-only instructions.</li><li><strong>Middleware wraps every call.</strong> Every tool goes through a single execution path with before/after hooks. These hooks can inject request-specific context, enforce role policies at call time, and isolate warehouse uploads across sessions. They can modify the request, block the call, or sanitize the result. If any hook fails, the call is blocked by default an unsanitized result is never exposed to the model.</li><li><strong>Errors come back as readable messages.</strong> Every failure path (timeouts, database errors, write attempts on a read-only connection, unexpected exceptions) returns a structured message the LLM can read and act on. Timeout messages include tool-specific recovery hints (tighten the date filter, break into smaller steps). Nothing crashes silently; the agent can explain what went wrong and suggest next steps.</li></ul><h3>Evaluation</h3><p><strong>How we evaluate a chat agent</strong></p><p>Before, evaluation was mechanical: run the generated SQL, run the expected SQL, and compare the outputs. That worked because every task had a deterministic artifact to score. The chat agent made that approach obsolete. There is no single SQL query to diff, no fixed expected output, and no reliable way to replay an open-ended conversation as a batch test.</p><p>The background evaluator runs after every turn and covers two aspects:</p><p><strong>Was the context sufficient?</strong></p><ul><li><strong><em>intent_handling: </em></strong><em>did Zoe understand what the user was actually asking?</em></li><li><strong><em>context_confusion:</em></strong><em> did the conversation summary distort something that affected the answer? Checked by comparing raw pre-summary messages against the summary directly, not just the final response.</em></li><li><strong><em>memory_quality:</em></strong><em> were the right memories retrieved and applied?</em></li></ul><p><strong>Were the facts faithful to what the tools returned?</strong></p><ul><li><strong><em>tool_accuracy:</em></strong><em> does a number in the response match the query output? (“Response states 27 affected users. Tool returned COUNT = 24.”)</em></li><li><strong><em>tool_reliability:</em></strong><em> a deterministic check: did any tool time out or return an error?</em></li></ul><p>Severity runs ok / minor / major / critical with a conservative bias: only flag with specific evidence, never on ambiguity alone.</p><p>In practice, we track high-severity flag counts over time. When we ship something, we watch whether that number moves. These flags aren’t just alarms; they’re signals: inputs to a slower loop that turns what goes wrong into durable fixes.</p><h3>Observability and Self-Analysis</h3><p>Every tool call is traced through Langfuse tool spans and instrumented with Prometheus metrics: a counter and duration histogram per tool, labeled by tool name and status and exposed through /metrics. Zoe’s built-in Admin Panel brings its operational signals together, covering usage, model and tool performance, feedback, evaluations, costs, skills, and memory. These signals also feed our alerting system, so relevant failures and operational issues are surfaced proactively.</p><p>Zoe can analyze herself, too. Her operational data — sessions, tool calls, and evaluation flags — is replicated into the warehouse just like data from every other business domain. Investigating Zoe’s usage therefore requires no special-purpose tooling: it uses the same warehouse, the same access patterns, and the same kinds of questions as any other analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qo63TXfL278rhbr_OUoDdg.jpeg" /><figcaption><em>Zoe’s Admin Dashboard</em></figcaption></figure><h3>Memory: Learn Personally, Promote Collectively</h3><p>Every time someone uses Zoe, they surface something worth keeping: The right table for a metric, the join condition that isn’t obvious from the schema, what a new product launch means for how we count things… That knowledge exists somewhere, in a conversation or in someone’s head, but it doesn’t automatically reach the next person who needs it.</p><p>The memory system is how we capture it. What gets discovered in a session becomes reachable for the next one. But capturing is the easy part. The hard part is keeping that store trustworthy as it grows, so it doesn’t rot into duplicates, stale facts, or one-off personal trivia. That takes three things working together: live extraction during the conversation, and two nightly maintenance workflows. Just like a REM sleep.</p><h4><strong>Scopes</strong></h4><p>Memory exists at three scopes: <strong>User → Domain → Global</strong>. Everything starts in a user’s private memory, visible only to that person and used only in their future conversations. Nothing is shared automatically.</p><p>Each night, the promotion pipeline reviews candidate entries that appear broadly useful. After human review, they can be promoted to <strong>domain</strong> scope, making them available to everyone in that team. Knowledge that is general enough to apply across teams, and not tied to a specific product or domain, can be promoted further to <strong>global</strong> scope, becoming company-wide context.</p><p>Shared entries also carry a lifecycle: <strong>provisional → confirmed → deprecated</strong>, allowing knowledge to be validated, updated, and retired over time rather than deleted outright.</p><p><strong>Extraction — at agent runtime, after every turn</strong></p><p>Three background jobs run non-blocking after each turn, each focused on a different type of knowledge:</p><ul><li><strong><em>technical </em></strong><em>— table-level facts: correct column names, enum values, known gotchas, join conditions that work</em></li><li><strong><em>pattern </em></strong><em>— user-specific knowledge: how this person defines terms, what they mean when they ask for something, their preferences for how data is sliced or presented</em></li><li><strong><em>business</em></strong><em> — living company knowledge: products Midas offers, markets it operates in, features launched or discontinued; what Midas IS and DOES, not how it’s built</em></li></ul><p>All knowledge is stored in positive form. The LLM only ever sees the correct way to do something, not “this was wrong, here’s the fix.” The same jobs can also flag a memory as harmful (success = false) when a stored fact turns out to be wrong, which feeds the cleanup loop below.</p><p><strong>Hygiene — cleanup + dedup, nightly</strong></p><p>Extraction is generous on purpose; a daily job keeps the store healthy:</p><ul><li><strong><em>Cleanup</em></strong><em> removes expired entries and deprecates anything flagged harmful (by the extractor or an explicit user thumbs-down) with a grace period before final deletion. Boring.</em></li><li><strong><em>Dedup</em></strong><em> is the interesting one. Memory naturally accumulates near-duplicates. For each entry, the job pulls its nearest neighbors by cosine similarity and asks the model what to do: </em><strong><em>merge</em></strong><em> into the stronger entry, </em><strong><em>synthesize</em></strong><em> a new combined one, or </em><strong><em>keep both</em></strong><em> if they’re genuinely different. Table names, columns, and enum values are preserved verbatim; only the connecting prose is ever rewritten.</em></li></ul><p><strong>Promotion — raising candidates, nightly</strong></p><p>A second nightly job spreads good knowledge upward: the outer loop that turns one person’s signals into shared knowledge. It <strong>never auto-promotes</strong>; it only raises <em>candidates</em> and pings the right domain reviewer, who approves or rejects in the admin UI. Three independent signals can nominate an entry:</p><ul><li><strong><em>Cluster consensus</em></strong><em> — the same knowledge independently recorded by multiple people. Cross-user agreement is the strongest trust signal we have.</em></li><li><strong><em>Shadow revision</em></strong><em> — if the extractor identifies that an existing domain entry caused an incorrect or incomplete answer, it creates a linked revision candidate. The nightly job synthesizes these proposed updates into a new version for review.</em></li><li><strong><em>Top retrieval</em></strong><em> — one person’s entry shows strong, successful reuse over time, suggesting it’s useful beyond them.</em></li></ul><p>The philosophy across all of it: <em>learn personally, promote collectively</em>. The schedule is staggered (KB refresh first, then memory cleanup, then promotion) so each stage runs on a settled store.</p><p><strong>Context injection</strong></p><p>The top 8 most relevant memories are retrieved per turn using weighted scoring (cosine similarity + source trust + lifecycle stage + recency), and injected as a labeled block in the user message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOVFoARw-LfiIrkoCLjS1g.png" /><figcaption><em>Long-Term Memory Extraction and Promotion</em></figcaption></figure><h3>Artifacts: When Work Outlives the Chat</h3><p>Chat is for conversation. Artifacts are for outputs you want to keep.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ce-OZ9H1LwnAQB5zfS_GeA.jpeg" /><figcaption><em>From Conversation to Dashboard</em></figcaption></figure><p>Most requests end with a chat response. But sometimes the result should live beyond the conversation: a dashboard that can be reopened and refreshed, an analysis that grows across multiple turns, or a report that can be shared with others. That’s what artifacts are for.</p><p>To support this, Zoe has native tools for creating persistent artifact nodes. Today it can create SQL datasets, HTML dashboards, and Markdown reports. Rather than existing in isolation, artifacts can reference one another, allowing larger outputs to be composed from reusable building blocks.</p><p>Every artifact is a named, versioned object that other artifacts can reference. Together they form a dependency graph. If a dataframe changes, any downstream dashboards or reports are automatically marked as stale, making it immediately clear what needs to be refreshed.</p><p>Today Zoe supports three artifact types:</p><blockquote><strong>dataframe</strong> — an SQL-backed dataset pinned to the canvas. The query executes against the warehouse, while preview rows and metadata are stored for quick inspection. The SQL query remains the source of truth, not the cached results.</blockquote><blockquote><strong>html</strong> — It can declare a dependency on a dataframe artifact, and the runtime injects the corresponding data automatically when the dashboard executes. Charts are rendered as inline SVG, so every artifact is completely self-contained.</blockquote><blockquote><strong>report</strong> — a Markdown document for wrapping findings into a shareable analysis. Reports can declare dependencies on dataframe artifacts, preserving the lineage between narrative and data.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9FkM-dwpx3CafdSGOIovzw.jpeg" /><figcaption><em>Artifact Dependency Graph on the Canvas</em></figcaption></figure><p>Dependency tracking is automatic. When one artifact references another — an HTML dashboard pulling from a dataframe, or a report declaring its data sources — the backend detects the reference and records the edge in the graph, no manual wiring needed. Every new edge is validated first, so a dependency cycle is rejected before it can be added. That graph is what powers staleness: change a dataframe, and everything downstream is immediately marked for refresh.</p><p>Artifacts are editable directly. Update a SQL query, click <strong>Run</strong>, and the dataframe re-executes without involving the agent. Any downstream artifacts can then be refreshed against the new results. Uploaded CSVs can also be pulled in: Zoe loads them into temporary warehouse tables so they’re queryable alongside everything else.</p><h4>From Personal Artifacts to Shared Work</h4><p>Artifacts become more valuable when others can reuse and build on them. Zoe supports this through two mechanisms: read-only sharing and independent forking.</p><ul><li><strong>Sharing</strong> is read-only. An owner can share a session or canvas by sending its URL to another Zoe user, who sees the work in a read-only view. There are no collaborator lists or transfers; ownership stays with the creator, and only the owner can edit.</li><li><strong>Forking</strong> is how someone builds on another person’s work. A fork is a point-in-time deep copy owned by the person who forks it: they get their own canvas, their own copy of every artifact (each starting a fresh version history), and the full dependency graph rewired to the new session, free to edit without touching the original. Forks come in two flavors: fork the whole session to carry the chat history along, or fork just the canvas to start clean with only the artifacts. Lineage is preserved on both sides, so it’s always clear what was forked from what.</li></ul><p>Together, direct editing, read-only sharing, and forking make artifacts more than chat outputs; they become reusable, collaboratively-owned units of analysis.</p><p><strong>Where we’re heading:</strong> We see artifacts becoming the primary interface for collaborative data work at Midas. The next pieces are:</p><ul><li><strong>Python artifacts</strong> — executable analysis notebooks that run within the session context.</li><li><strong>Scheduled refreshes</strong> — artifacts that rerun automatically, with notifications when results drift or fail.</li><li><strong>Autonomous investigations</strong> — scheduled monitors detect anomalies, trigger Zoe to investigate, and produce a pre-populated artifact for the on-call analyst instead of just sending an alert.</li></ul><h3>Systematic Access: Agent Profiles and Service Tokens</h3><p>Zoe isn’t just a chat application. Internal services, scheduled jobs, and automations can invoke her programmatically.</p><p>Non-interactive callers are configured with an <strong>agent profile</strong> that constrains the prompt, available tools, tool-level permissions, and response format. This allows the same runtime to support different use cases while exposing only the capabilities each caller needs.</p><p>For example, a SQL-oriented profile exposes only the warehouse tool, restricts it to a predefined set of schemas, removes visualization-oriented capabilities from the tool registry, and returns executable SQL in a structured response. By exposing only the capabilities required for the task, the model has a smaller, more focused context and a simpler output contract.</p><p>Because behavior is configuration-driven, new integrations rarely require application changes. New callers can be assigned an agent profile, and Zoe operates within the capabilities and response contract defined by that profile.</p><p>Feature flags provide a separate rollout mechanism, allowing new capabilities to be enabled gradually for specific users, non-interactive callers, or the entire organization.</p><h3>Why This Changes How Teams Work with Data</h3><p>The real shift isn’t replacing dashboards. It’s moving from static reports to an interactive coworker.</p><p>Instead of navigating dashboards for one-off questions, people ask. Instead of copying numbers into spreadsheets, they create durable artifacts with lineage and source SQL. And instead of ending at an answer, work can continue across conversations, be shared with teammates, or become part of an automated workflow. The interface shifts from consuming reports to collaborating with an agent.</p><h3>Where We Differentiate</h3><p>Early on, we had to be honest about what game we were playing. One path was to push on the model itself: heavier prompt engineering, custom reasoning scaffolds, effectively trying to out-engineer a frontier lab at its own craft. We decided not to. We can’t out-build the foundation model providers on reasoning, and any advantage we squeezed out there would evaporate with the next model release. So instead of racing the model, we bet on building <em>around</em> it.</p><p>That framing is what “we don’t compete on reasoning” actually means. Every improvement that model providers ship makes Zoe better, automatically, for free. Our differentiation is everything the raw model can’t have on its own: our warehouse and code, our company’s accumulated knowledge, and the loop that turns each interaction into a lasting improvement.</p><p>The inner loop answers today’s questions. The outer loop ensures tomorrow’s answers are better. Every interaction produces signals (user corrections, evaluation results, artifact edits, tool failures, and successful investigations) that become lasting improvements: better knowledge, stronger evaluations, improved retrieval, refined skills, and smarter routing.</p><p>That’s what a raw model API can’t provide. The value compounds over time. Every correction and every promoted memory makes the next interaction better, while humans remain in the loop as the source of the highest-quality signals.</p><h3>Where We’re Headed</h3><p>Our goal is bigger than answering questions. We want Zoe to own the full analytics experience: the first place people go with a data question and the place they finish the work, whether that’s exploring, building something durable, or sharing it end to end. What that means for traditional BI tools (replace, reshape, or coexist) follows from there.</p><p>A few directions we’re actively pushing:</p><ul><li><strong>Self-service agent profiles.</strong> Letting other teams shape Zoe for their own use-cases: edit the prompt, pick the tools it can use, define the output format, restrict which tables and schemas are in scope, within limits set centrally — so a team with different requirements gets a Zoe tuned to them without us hand-building it.</li><li><strong>Team spaces and access control.</strong> Folders for organizing sessions and canvases — including public and private team spaces for saved work, with access control in the spirit of BI platform: who can see a dashboard, who can edit it, what stays inside the team. Plus mid-conversation forks so you can branch from a specific message and take the context with you.</li><li><strong>Autonomous analytics.</strong> Letting Zoe proactively identify what is worth investigating without waiting for a user prompt. It could spot a pipeline that has been getting progressively slower, recognize repeated questions that point to a missing data model, or connect recurring operational issues to patterns in the underlying data. Zoe can turn these signals into its own investigation goals, explore them end to end, and surface findings and recommendations back to the team.</li><li><strong>From HTML dashboards to mini apps.</strong> Today artifacts render self-contained HTML; next is letting them grow into small interactive apps, so a dashboard becomes something you click through and manipulate, not just view.</li><li><strong>Code execution and a real workspace.</strong> Giving Zoe a filesystem, better search over it, and the freedom to run code means analysis that isn’t confined to SQL — advanced, multi-step analytics where the agent writes, runs, and iterates on real code.</li></ul><p>Some of this is already shipping in pieces; some is still ahead. The direction is consistent: keep the harness thin, keep knowledge compounding, and expand what a single conversation can finish.</p><p>Static dashboards will not disappear, but they will no longer be the primary interface to company data. The future of analytics is conversational, iterative, and grounded in the full context of how a business operates. Instead of searching for a dashboard that might contain the answer, people will work with an agent that can investigate the question, show its evidence, and turn the result into something they can keep building on.</p><p>That is where we are taking Zoe: from a tool that generates trustworthy SQL into a shared workspace for analytics.</p><p><strong>If you’re building something similar, we’d love to share ideas.</strong> Reach out to talk about in-house data agents, the systems around them, and what it takes to make them reliable in practice.</p><p>Stay tuned for the next part ahead!</p><h3>References</h3><p>[1] <a href="https://arxiv.org/abs/2203.10384">Foidl et al. — <em>Data Smells: Categories, Causes and Consequences, and Detection of Suspicious Data in AI-based Systems</em></a></p><p>[2] <a href="https://arxiv.org/abs/2210.03629">ReAct — <em>Synergizing Reasoning and Acting in Language Models</em></a></p><p>[3] <a href="https://arxiv.org/abs/2608.22651">ReAct-SQL — <em>Iteration Without Elaboration: A Simple ReAct Architecture Suffices for Text-to-SQL Generation</em></a></p><p>[4] <a href="https://open-metadata.org/">OpenMetadata — Metadata Catalog</a></p><p>[5] <a href="https://aclanthology.org/2026.findings-acl.1959/">SQLAgent — <em>Learning to Explore Before Generating as a Data Engineer</em></a></p><p>[6] <a href="https://www.databricks.com/blog/what-is-elt">Databricks — <em>What is Extract, Load, Transform (ELT)?</em></a></p><p>[8] <a href="https://engineering.getmidas.com/scaling-llm-usage-with-litellm-monitoring-quotas-and-spend-management-04b7d818a782">LiteLLM — <em>See also our engineering post on running LiteLLM in production</em></a></p><p>[9] <a href="https://langfuse.com/">Langfuse</a></p><p>[10] <a href="https://code.claude.com/docs/en/agent-sdk/overview">Anthropic — <em>Claude Agent SDK</em></a></p><p>[11] <a href="https://www.latent.space/p/autoresearch-introspection">Autoresearch — <em>The Feedback Loop Behind Self-Improving Agents</em></a></p><p>[12] <a href="https://openai.com/index/inside-our-in-house-data-agent/">OpenAI — <em>Inside Our In-House Data Agent</em></a></p><p>[13] <a href="https://www.anthropic.com/engineering/multi-agent-research-system">Anthropic — <em>How We Built Our Multi-Agent Research System</em></a></p><p>[14] <a href="https://www.databricks.com/blog/data-native-ai-agents-why-agents-must-move-your-data">Databricks — <em>Data-Native AI Agents: Why Agents Must Move to Your Data</em></a></p><p>[15] <a href="https://magazine.sebastianraschka.com/p/components-of-a-coding-agent">Sebastian Raschka — <em>Components of a Coding Agent</em></a></p><p>[16] <a href="https://arxiv.org/abs/2607.13285">Harness Handbook — <em>Making Evolving Agent Harnesses Readable, Navigable, and Editable</em></a></p><p>[17] <a href="https://blog.langchain.dev/planning-agents/">LangChain — <em>Planning Agents</em></a></p><p>[18] <a href="https://pashpashpash.substack.com/p/why-i-no-longer-recommend-rag-for"><em>Why I No Longer Recommend RAG for Autonomous Coding Agents</em></a></p><p>[19] <a href="https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents">Anthropic — <em>Demystifying Evals for AI Agents</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e771192d62cb" width="1" height="1" alt=""><hr><p><a href="https://engineering.getmidas.com/building-zoe-an-evolving-data-analytics-agent-with-company-know-how-e771192d62cb">Building Zoe: An Evolving Data &amp; Analytics Agent with Company Know-How</a> was originally published in <a href="https://engineering.getmidas.com/">Midas Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>