<?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 Luisa Rodrigues on Medium]]></title>
        <description><![CDATA[Stories by Luisa Rodrigues on Medium]]></description>
        <link>https://medium.com/@luisarodriguees?source=rss-1f7c85ae5e2f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OwQxka2XmH-1l9s4f9jC2w.png</url>
            <title>Stories by Luisa Rodrigues on Medium</title>
            <link>https://medium.com/@luisarodriguees?source=rss-1f7c85ae5e2f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 08:42:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@luisarodriguees/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[Inside Tars, the QuintoAndar’s Data Agent]]></title>
            <link>https://medium.com/quintoandar-tech-blog/inside-tars-the-quintoandars-data-agent-3e8494d276db?source=rss-1f7c85ae5e2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e8494d276db</guid>
            <category><![CDATA[ai-skills]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[agentic-development]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Luisa Rodrigues]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 17:36:29 GMT</pubDate>
            <atom:updated>2026-11-25T17:36:29.009Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A brief story of how we created a data agent based on the idea of getting our own business context into a shape a model could read.</em></p><p>At QuintoAndar, a simple data question used to take two hops: someone in Product, Design, or Operations would look for a dashboard, fail to find one, and then message a data engineer or data scientist: which table has this? What’s the join key? Why does this number disagree with the other dashboard?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rbtiDBhzcG52CY8UOoYo4w.png" /></figure><p>The knowledge required to answer these questions already existed in our analytics monorepo, spread across table definitions, column metadata, lineage, and years of production legacy SQL, but in practice it also lived in the heads of a few people who had accumulated context over years, and those people became a search engine with many others responsibilities.</p><p>This initiative was first released in February 2026 as an attempt to shorten the data user path, answering business questions in natural language by writing and running SQL against our data lake. Now, in a recent monthly window it was already used by several hundred employees across six lines of business, who ran roughly 47,000 queries and took about 9,000 questions from asked to answered, also saving thousands of work hours.</p><p>And yes, we named it after the robot from the Interstellar movie because of some similarities: TARS does the unglamorous work of the mission, it pilots, it hauls, it takes the readings nobody else can take, and eventually it rides into a black hole to gather the data the whole plan depends on. But that turned out to describe this project better than we knew when we picked the name. Grab a coffee, it’s a bit of a journey.</p><h3>The cheapest possible first version</h3><p>Our initial plan was quite different from where we are now: we considered building dedicated infrastructure for Tars, with its own server and interface, and at the time, AI tools were still mostly used by engineers, but we expected their adoption to expand across the company. So, instead of building a new place for people to use Tars, we decided to bring the MVP to where our technical users already were: Cursor.</p><p>Our data engineering monorepo was already available for our technical stakeholders we wanted to help, and it already contained metadata files covering different layers and business contexts, and that made it a natural starting point for Tars. The first version was built and run on an external AI platform, and with a simple “@tars, hey, could you help me calculate last month’s NPS?”, the model would switch into a Data Analyst role and use the available context to help answer the question.</p><p>Looking back, that decision proved to be an important one. As AI tools expanded beyond engineering, we later made Claude available to hundreds of employees across the company. Because Tars was built as a plugin, it could be used there with very little friction, allowing the project to reach people far beyond its original audience.</p><p>But as mentioned before, we have many business contexts and each of them has its own specificities, rules, metrics and distinct ways of calculating numbers. And that’s why we defined that each core business entity got a markdown file with a fixed set of sections: overview, glossary and synonyms, main tables, key metrics, relationships with other entities, dos and don’ts, and golden queries. Data engineers picked the entities for their own domains, focusing on concepts that kept coming up in stakeholder questions rather than whatever was easiest to document.</p><p>To check whether this was worth anything, we built a ten-question evaluation over a single domain and ran each question twice: once against the repository with no Tars rule, and once against the branch where the rule and the entity files lived. The scoring was deliberately simple: 1.0 if the answer pointed to the right path and respected the relevant filters and business nuances, 0.5 if the path was right but something important was missed, and 0.0 if the path was wrong.</p><p>The gap was clear enough to keep going, although it understated the difference. Even where both configurations scored a full point, the grounded answers were more specific and easier to trust, giving more human-like answers. But ten questions in just one domain is not a benchmark, and we knew it. More importantly, the evaluation gave us a list of why the grounded version still failed so we went a few more meters deeper into our data lake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nAG6GXgQtCAAY6Bs" /><figcaption>Photo by <a href="https://unsplash.com/@bobbiwu?utm_source=medium&amp;utm_medium=referral">Bobbi Wu</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Why we reframed the project perspective</h3><p>Since we were relying on our Tars discoveries through our metadata files, we needed to validate if they were good enough for such responsibility, so we used the FAIR principles to guide us: data must be Findable, Accessible, Interoperable, Reusable. Applied to a real data catalog rather than to a research dataset, each letter becomes a concrete question:</p><ul><li>Findable: does this table carry a description a colleague could search for, and a declared owner?</li><li>Accessible: can they reach it through the catalog without asking a person?</li><li>Interoperable: do its naming, types, and keys line up with the datasets it will be joined to?</li><li>Reusable: are the grain, the provenance, and the caveats documented well enough that someone who did not build the table can use it and be right?</li></ul><p>Our FAIRness report showed that roughly <strong>75% of table metadata had low quality</strong>: descriptions that were generic restatements of the column name, missing, or accurate three schema changes ago; column naming that made sense to whoever built the table in 2022; redundant models nobody had retired; and tables with ambiguous grain.</p><p><strong>Tars did not create any of these problems but it brought them to surface, making it impossible to postpone the resolution</strong>. An agent reading your metadata is a very literal reader, and when an answer is wrong, you can trace the problem to a specific sentence in a specific file. That sentence usually turns out to have been wrong for humans too.</p><p>At this point, the project stopped being just about Tars and became a <strong>collaborative Data Governance initiative</strong>. We could have spent the next six months tuning Tars, but its performance would still be limited by the quality of the knowledge it receives. So we shifted our focus to the knowledge itself: who owns it, how it is validated, how it gets to the agent, and how we detect when it becomes outdated.</p><h3>Organizing the knowledge</h3><p>We decided to divide the corpus of our Data Products into two document types, because we realised we were asking one document to answer two different questions: <em>where does this data live?</em> and <em>how is this number officially calculated?</em> The first is about navigating the data model; the second is about capturing business definitions and rules that are often not visible in the warehouse itself. <strong>Keeping them separate made each document more focused, easier to maintain, and easier for Tars to use for the right kind of question</strong>.</p><p><em>The </em><strong><em>domain entity</em></strong><em> is a routing guide. It answers where the data lives: which tables exist for a domain, how they join, what the jargon means, and which traps to avoid.</em></p><p>For example, in our rent business, a termination happens when one of the parties asks to end the rental contract, and it is a complex process that touches many smaller steps so the entity needs to be well defined and leave no room for ambiguity. So our <strong>termination entity</strong> records that <em>ts_termination_request</em>, <em>dt_termination</em>, and <em>ts_termination_finished</em> are three different dates answering three different questions; that cancelled terminations should be filtered out when measuring effective volume; and that maybe a wide pre-joined table already covers inspections, repairs, reports, mediation, and discounts, so users do not need to join them by hand.</p><p><em>The </em><strong><em>metric entity</em></strong><em> is a calculation contract. It answers how a metric is computed, officially: the formula, the canonical filter, the weight sources, and the golden query that reproduces the number the business actually reports.</em></p><p>The second type came later and solved a problem we had underestimated: operations teams reporting official numbers apply additional treatment on top of it, usually in large datasets feeding dashboards or spreadsheets, encoding rules that exist nowhere in the data engineering monorepo. Tars had no visibility into that layer, partly because we did not either, but without it, <strong>the agent could produce a number that did not match the official number presented in an important meeting</strong>.</p><p>The process of creating both files is skill-guided, following a pattern defined for each type of entity and the owner answers questions based on it, closing the loop for the <strong>Authoring Journey</strong>. This keeps stakeholders as the owners of each Data Product, aligning what Tars sees and uses to what is presented in official reports and presentations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A5atDtypZNl3kOkY8nxYIA.png" /></figure><h3>How to share data ownership</h3><p>There is also an organisational detail underneath all of this: maybe the person who owns the KPI definition business line is usually not a person who can open a pull request. They own spreadsheets, ad-hoc queries, and the institutional knowledge of which filter makes a number official, but some have GitHub access but <strong>most do not</strong>.</p><p>That’s when a second actor plays an important role in this process, <strong>Luigi, our junior data engineer agent</strong>. Luigi is a plugin in our internal chat, so the business owner sends &quot;<em>/luigi hi&quot;</em>, and select the menu option to attach the Data Product file, and answers questions one at a time in a direct message. The interview questions are not hardcoded, because Luigi fetches the authoring skill from the analytics repository at runtime, <strong>so the interview stays aligned with the repository contract</strong>. A validator runs the structural check plus an LLM fidelity check and rejects in chat, before any pull request exists.</p><p>When it passes, Luigi opens the pull request as a GitHub App on the submitter’s behalf. A poller sends the status back to the chat thread: CI validation failures, reviewer change requests with inline comments rewritten into user-friendly language, and further, merge confirmation. Our data engineers can also use the two authoring skills in their IDE that interview them and write against the same template, so both paths converge in one of two Data Products types. This is what we call the <strong>Publishing Journey</strong>.</p><h3>Git is the source of truth but DataHub is the serving layer</h3><p>After merge, a CD pipeline in Woodpecker turns each markdown file into a DataHub Data Product. The document body becomes the product description, golden queries become query entities with deterministic URNs derived from the entity slug, the tables section becomes linked datasets, and the glossary becomes glossary terms.</p><p>Then comes the rule the whole architecture rests on: <strong>Tars never reads the monorepo and the </strong>DataHub GraphQL is its only metadata source. So it does not read context files or reference markdown, and it does not use SHOW TABLES, DESCRIBE, or information_schema for discovery. That constraint gives us four things:</p><ol><li>There is one place to fix a wrong answer, and fixing it there fixes it for everyone.</li><li>A context change ships without releasing a new plugin version.</li><li>Tars in Cursor, Tars in Claude, and Tars inside the test harness can see byte-identical context.</li><li>The quality gates on the merge path become the only path context takes to production.</li></ol><p>When the logic is ready to be used as SQL queries, Tars authenticates each user through SSO and executes under their own permissions, including column-level access control in Trino. <strong>Nobody gets data they could not already have queried themselves, relying on our Data Contract structure</strong>. This is the answer to the first question anyone asks about a tool like this, and it is worth being clear that widening access to data and widening access to the <em>catalog</em> are different things.</p><h3>Our fences</h3><p>When pull request touching entity documents is opened, it triggers an evaluation harness built on top of <a href="https://inspect.aisi.org.uk/evals/">Inspect AI</a>, a valuation framework designed to rigorously assess the capabilities of AI agents. It clones the agent at a pinned reference and runs it in a fully mocked environment: Trino calls intercepted with canned responses, DataHub GraphQL answered by an in-process mock. The agent generates SQL for the affected questions, an LLM judge scores each result from one to five against the expected query, and a score below four fails. The suite must pass above 90% overall.</p><p>Running every validation on every pull request would be unaffordable given our monorepo usage. Metadata-only edits, such as a change to the ownership section, skip SQL generation entirely but we have other validation steps that guarantee our metadata files updates do not interfere in Data Products consistency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gdsmdee7HV0STSmQcNX_5g.png" /></figure><h3>The observability layer</h3><p>Every query Tars runs carries a session ID, the user’s question, response category, business domain, the DataHub URNs consulted, and the tables that passed the schema gate; that comment stays in Trino’s own query log, and the SQL shown to the user stays clean. Separately, a Vector agent ships structured events to Loki: session start, DataHub probes, query outcomes with typed error classes, per-turn summaries carrying the generated SQL and self-review verdicts, and user feedback.</p><p>We monitor both Datahub infrastructure and Tars usage metrics using Grafana dashboards, and we have also defined alerts to tell us when it needs extra resources or even show what are the main types of errors raised to our users.</p><h3>A new era for our data engineers</h3><p>Since Tars now handles most of the data discovery questions now, and faster than someone replying between two other tasks, our data engineers have more time to do more significant tasks.</p><p>Three tables for the same concept is no longer a tolerable inheritance, because the agent has to pick one and sometimes picks wrong, and in front of a stakeholder. <strong>Our data modelling process became more accurate and strict, with more guardrails</strong>.</p><p>The FAIR score used to be a report nobody actively acted on, because nothing downstream punished a bad metadata. <strong>Now writing good documents helps answering thousands of questions or even the same question repeatedly</strong>.</p><h3>Real Tars Numbers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Q7bMNFpozYI5sJ-ozpM_Q.png" /></figure><h3>What we learned so far</h3><p>Looking back to our journey, some learnings stand out and we can use to guide us into our next challenges:</p><ol><li><strong>LLMs cannot compensate for poor context</strong>: Tars made existing data quality problems harder to ignore and visible at scale, showing us that improving the knowledge behind the answers matters as much as improving the agent itself.</li><li><strong>Data discovery and business official definitions are different problems</strong>: knowing where a dataset lives, how tables relate, and which joins to avoid is not the same as knowing how a KPI is officially calculated. Separating domain entities from metric entities helped us capture both kinds of knowledge and bring official business definitions into the same workflow.</li><li><strong>Governance is the main lever for stakeholders trust: </strong>Treating context as a governed Data Product, with ownership, validation, and a controlled publishing process, made these guarantees of keeping context consistent across different interfaces, and ensuring that every query respected the user’s existing data permissions as the center of the architecture.</li></ol><p>If you believe that good answers start with good context and want to help us build this big ecosystem, <em>we’re hiring</em>:<a href="https://carreiras.quintoandar.com.br/vagas-abertas/"> https://carreiras.quintoandar.com.br/vagas-abertas/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e8494d276db" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quintoandar-tech-blog/inside-tars-the-quintoandars-data-agent-3e8494d276db">Inside Tars, the QuintoAndar’s Data Agent</a> was originally published in <a href="https://medium.com/quintoandar-tech-blog">Blog Técnico QuintoAndar</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>