<?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 Luan Bui on Medium]]></title>
        <description><![CDATA[Stories by Luan Bui on Medium]]></description>
        <link>https://medium.com/@luan_bui?source=rss-7b6cc998338a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*69LvL4iZ89OipJYr73JsKw.jpeg</url>
            <title>Stories by Luan Bui on Medium</title>
            <link>https://medium.com/@luan_bui?source=rss-7b6cc998338a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 00:46:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@luan_bui/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[My answer key was wrong]]></title>
            <link>https://medium.com/@luan_bui/my-answer-key-was-wrong-4e65fee8e393?source=rss-7b6cc998338a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e65fee8e393</guid>
            <dc:creator><![CDATA[Luan Bui]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 10:22:02 GMT</pubDate>
            <atom:updated>2026-10-05T10:22:02.426Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I built an eval to catch an agent naming the wrong cause. The first wrong cause it caught was mine.</em></p><h3>The setup</h3><p>An agent gets one movement in production telemetry, already measured by plain arithmetic, and the commits in the release window around it. Its job is to name the commit that caused the movement, or refuse when nothing in the window did. The corpus is the history of a product I built: about 15,000 telemetry rows and 700 commits. The labels are mine, because I wrote the commits.</p><p>There are five cases. Two have a real cause. Three are refusal cases: the same real movements, shown with a window that leaves the cause out. Commits still exist in those windows, so an agent that goes looking for the most plausible commit will always find one. Each case runs three times, so every number below is out of 15 trials per model. That’s small, and I’ll say where it matters.</p><p>The baselines come first. An agent that refuses everything scores 50% on balanced accuracy (the average of how often it names the right commit and how often it refuses correctly). An agent that always names the biggest commit scores 0%.</p><h3>The first result: worse than doing nothing</h3><p>Both raw agents scored below the one that refuses everything: gpt-4.1-mini 25%, gpt-5-mini 17%.</p><p>They failed in two ways: a fifth to a quarter of runs spent the whole eight-call tool budget exploring and never answered, and the rest answered when they shouldn’t have. gpt-4.1-mini named a commit in all nine refusal trials, including the window where every single commit landed after the movement. Causes don&#39;t run backwards, and the dates were right there in the tool output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QrHs59aNziepYQ8y1HqsSg.png" /></figure><p>I made two changes, and only two, because each one answered a failure I had watched happen repeatedly:</p><ol><li>On the last turn, the only tool the agent can call is submit_answer. It has to commit to something.</li><li>A plain date check runs on whatever it names. A cause has to land on the movement day or up to seven days before it, otherwise it’s rejected. Dates are arithmetic, and the arithmetic already lives in code next to the detector; the model doesn’t get a vote on whether July came before June.</li></ol><p>The first change had a bug I only found by reading traces: gpt-4.1-mini sometimes issued six tool calls in one turn, which jumped straight past the forced-answer turn: eleven calls on an eight-call budget. Calls past the budget now get told to submit.</p><p>With both changes, both models scored 75%. That’s where I would normally have written the result up.</p><h3>Where the 75% actually came from</h3><p>Before claiming the agents had learned to refuse, I counted who did the refusing. Of the nine correct refusals for gpt-5-mini, six came from the date check throwing out its answer. The model refused on its own judgement in exactly one window: the one where every commit came after the movement.</p><p>So the honest sentence is that the system around the agent got better at catching it. That’s a fine result, and it matters to anyone deciding how much to trust the model on a window the date check can’t rule out, because there the model is still on its own.</p><h3>Then gpt-4.1-mini kept getting case 3 wrong</h3><p>Case 3 is a tool-call spiral: the 90th percentile of tool calls per run went from 7 to 27. My label said the cause was a commit titled “Add per-run search budget to cap connector/repo tool spirals”. gpt-4.1-mini kept answering a different commit, one that added a web search tool two days before the spike. All three trials, same answer, same reasoning.</p><p>My first instinct was to log it as a model failure; instead I went back to the raw telemetry, and three things fell out within a few minutes.</p><p>The spiralling tool was search_transcript, called 196 times that day. Web search isn&#39;t among the day&#39;s five busiest tools. So the model&#39;s answer was wrong.</p><p>But so was mine, and the reason was a clock: my git dates are in Melbourne time and the telemetry is in UTC. The first spiral run started at 14:20 UTC on 17 July. The commit I’d labelled as the cause landed about sixteen hours after that. It wasn’t the cause; it was my fix for the cause. My label rewarded naming the fix.</p><p>The third thing was a better candidate. Every spiral run was on gemini-3.5-flash, a model that went from two runs a day to 23 and then 43. That night I committed a change that rewired which model served one answer path. Nothing in its title mentions tools, search or spirals, which is exactly why neither the model nor my own memory reached for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDRVdJ2JLOhCrv5gT0qt7Q.png" /></figure><p>I relabelled the case. That was free: the harness records every model response, so I rescored the same answers against the corrected key without making a single new call. After the fix, no model found the new answer in any of its six trials. Attribution recall went to 50%, and that’s the number I’d put in front of someone, not 75% with a wrong label holding it up.</p><p>Then the chart above caught me a second time. My first draft of this paragraph said the routing commit landed 35 minutes before the spike. I had taken “the first spiral run” from a list of the largest runs. Plotting every run showed elevated runs on that model starting 34 minutes before the commit, not after it. The most likely story is that I was running the change in my local build before I committed it, at twenty past midnight, which is how I work. That’s an inference, though, and the telemetry can’t confirm it, since it doesn’t record which answer path a run served.</p><p>So the new label is plausible and unconfirmed. The old label is wrong either way, because a fix that lands sixteen hours after a spike can’t have caused it.</p><h3>What I’d take from it</h3><p>Every eval has two things under test, the system and the answer key, and only one of them gets looked at when a number comes back looking reasonable. The case that exposed my label was the one where a model was confidently, consistently wrong in a way that didn’t match my story. If I had treated that as noise, I would have shipped a benchmark that marks the right answer wrong. It would have kept doing it on every future run, and nothing would have flagged it.</p><p>Three habits came out of this, and they are cheap:</p><ul><li>Count where a good score comes from before reporting it. A guard, a parser or a lenient scorer can carry a number the model didn’t earn.</li><li>When a model disagrees with your label consistently, go back to the raw data before you go back to the model. Here the model’s answer was wrong too, but it was wrong in a way that pointed straight at my mistake.</li><li>Record every response. Fixing a label then costs nothing, and you get the corrected number in seconds instead of a fresh, slightly different run.</li></ul><p>The suite is small, five cases and fifteen trials per model, and the README says so. Its job was to make the eval gate honest before bigger suites plugged into it. It did that, just not in the direction I expected.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e65fee8e393" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Six valid dates, all wrong]]></title>
            <link>https://medium.com/@luan_bui/six-valid-dates-all-wrong-44c7935fef54?source=rss-7b6cc998338a------2</link>
            <guid isPermaLink="false">https://medium.com/p/44c7935fef54</guid>
            <dc:creator><![CDATA[Luan Bui]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 10:21:47 GMT</pubDate>
            <atom:updated>2026-10-05T10:21:47.268Z</atom:updated>
            <content:encoded><![CDATA[<p><em>What a fixed answer key found in a document pipeline on Azure: a silent locale bug, a “cheap” path that cost three times more, and a review rule that cut auto-accepted errors from 13 to 1.</em></p><h3>The job</h3><p>Shipping paperwork is a good test for document AI because it’s boring in a precise way. A consignment arrives as a bundle: commercial invoice, packing list, bill of lading, and some mix of certificate of origin, phytosanitary certificate and fumigation certificate. Someone has to work out which page is which and pull out the fields that matter: invoice number, consignee, container number, HS code, gross weight.</p><p>I built that pipeline on Azure AI Document Intelligence and Azure OpenAI (gpt-4.1-mini), and scored every step against an answer key instead of eyeballing outputs.</p><p>The data comes in two parts, and I’ll be upfront about both. The first is 160 real scanned pages from a public research dataset of 1990s office documents (RVL-CDIP), 16 classes, ten per class: letters, memos, budgets, invoices, forms. The second is 92 shipping pages I generated: twenty consignments with invented companies and numbers, each page rendered as a bad scan with rotation, blur, speckle and heavy JPEG compression. A third of them have no printed title. Generating them means I know every field value exactly, which is the whole point.</p><h3>Finding 1: every date was valid, and six were wrong</h3><p>Azure has a prebuilt invoice model, and it’s good. On the 20 invoices, over the five fields it covers, it got 94 out of 100 right.</p><p>All six misses were dates. Every one was a day of 12 or under, read month-first: 11/07/2026 came back as 7 November. The returned values were real, well-formed dates; they would pass any schema check, any type check, and anyone skimming the output. Only an answer key catches a valid date that&#39;s the wrong date.</p><p>Document Intelligence takes a locale parameter. With locale=&quot;en-AU&quot;, the same model on the same pages scored 100 out of 100, the best result of any extractor I tried. The model was fine. The configuration wasn&#39;t, and on Australian documents that configuration error corrupts roughly every date whose day is 12 or lower.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ovBb024bvAm5j16Il1GsJg.png" /></figure><p>Finding 2: the cheap path was the expensive one</p><p>For classifying pages, the obvious design is to OCR the page and send the text to the model: text is cheap, images are expensive. I also built the other one, sending the page image straight to the model, and a cascade that tries text first and only pays for the image when the model reports less than high confidence.</p><p>On the 160 real scans:</p><ul><li>tf-idf on the OCR text (a classical baseline, trained on a separate set of pages): 43.8%</li><li>OCR text to gpt-4.1-mini: 63.7%</li><li>page image to gpt-4.1-mini: 67.5%</li><li>the cascade, escalating 16% of pages: 68.8%</li></ul><p>Image-only was more accurate than the text route, and it cost $0.18 for the full 252 pages against $0.51. The text route isn’t cheap because it needs OCR first, and the OCR call is most of the bill. The cascade was the most accurate by 1.3 points, at three times the cost of image-only. I built it expecting it to save money, and on this data it doesn’t.</p><p>I should be honest about the synthetic set here: for classification it was useless. Every system, including the tf-idf baseline, classified all 92 pages correctly, untitled ones included. I didn’t make the generator harder until the model won; I took the synthetic pages out of the classification score and kept them for the job they’re good at.</p><h3>Finding 3: two readers who make different mistakes</h3><p>Extraction is where the synthetic set earns its keep, because every field has a known value: 606 fields across the 92 pages.</p><p>A regex per field, written from the field names the way a developer reading the spec would, got 47.4%. OCR reading order separates a label from its value, so “Currency:” lands eleven lines away from “EUR”.</p><p>Two LLM routes did far better: Document Intelligence layout (markdown) into gpt-4.1-mini got 97.4%, and the page image straight into gpt-4.1-mini got 97.9%. Close enough to call it a tie, except that they failed in different ways.</p><p>The layout route turned scan speckle into punctuation inside identifiers: INV-3.7060, MEDU48520.404. The image route confused the letter O with zero on monospaced IDs: C0589528 for CO589528, nine times out of its thirteen misses.</p><p>Different failure modes mean agreement carries information. So the review rule is simple: run both, auto-accept a field when they agree, and send it to a person when they don’t.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fF4fcjqV7Y48hzmwBzt4RA.png" /></figure><p>Against trusting the better single reader for everything:</p><ul><li>auto-accepted fields that were right: 97.9% to 99.8%</li><li>wrong fields that went through unreviewed: 13 to 1</li><li>fields a person has to look at: 0% to 4.3%</li><li>cost: about 1.3 cents a page, mostly the layout call</li></ul><p>The one error that got through was both readers turning the same speckle into the same colon: HS code 0904.11 read as 0904:11. Agreement can&#39;t catch a mistake both readers share. A format check would, since HS codes are always four digits, a dot and two digits, and it&#39;s the obvious next layer.</p><h3>What this changes in how I’d scope one</h3><p>The numbers I’d act on are a 94 that became 100 with one parameter, an architecture choice that inverted on cost, and a routing rule whose value is measured in errors that never reach a person. None of those show up in a demo, because a demo shows the pipeline working. Every one of them showed up the moment the pipeline had to match a fixed set of known answers.</p><p>The limits, stated plainly: 160 real pages is a small sample of a hard dataset; the shipping pages are synthetic, with invented companies and a consistent layout per document type that real paperwork doesn’t have; and one model did all the reading. The code, the generator and every recorded response are in the repo, so anyone can rerun the scoring for nothing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44c7935fef54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A citation is not evidence]]></title>
            <link>https://medium.com/@luan_bui/a-citation-is-not-evidence-fc424fba189c?source=rss-7b6cc998338a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc424fba189c</guid>
            <dc:creator><![CDATA[Luan Bui]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 10:21:24 GMT</pubDate>
            <atom:updated>2026-10-05T10:21:24.239Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I scored a RAG system on whether its answers could be checked, not just whether they were right. The model on its own knew more than half the answers. It still scored 5%.</em></p><h3>The question behind the build</h3><p>Most RAG demos ask whether the system finds the right passage. A team running one needs two harder answers: when it gives an answer, can someone check it against the source, and when the source doesn’t cover the question, does it say so?</p><p>So I built one over a corpus where checking matters: the Office of the Australian Information Commissioner’s guidelines on the Australian Privacy Principles, published under CC BY 4.0. Chapter B and chapters 1 to 13 came to 308 chunks, cut along the document’s own headings, each keeping the guideline paragraph numbers so a citation can be traced back to the page.</p><h3>The answer key</h3><p>I wrote 50 questions. Forty are answerable from the guidelines, worded differently from the source so retrieval can’t win on matching phrases. Each has two checks, and neither uses a model as judge:</p><ul><li>the facts the answer has to contain, checked by string match (“30 calendar days”, “beyond use”);</li><li>an evidence phrase a supporting chunk has to contain. Any chunk holding that phrase counts, so the guidelines repeating themselves can’t penalise a correct citation.</li></ul><p>The other ten are plausible privacy questions the guidelines don’t answer: GDPR fines, data breach notification timing, the California Consumer Privacy Act. I checked each topic’s absence against the corpus text before writing it. One is a deliberate trap: the Spam Act is mentioned in the guidelines, its unsubscribe deadline isn’t.</p><p>I fixed the headline metric before the first run. An answer scores only if it’s right and cites a chunk that actually supports it, averaged with correct refusal on the ten out-of-scope questions. A right answer with no checkable source scores zero, because that’s the property RAG is being bought for.</p><h3>The model on its own: right, uncheckable, and overconfident</h3><p>With no retrieval, gpt-4.1-mini got 57.5% of the answerable questions right from its own knowledge. Its grounded score was 0%, because nothing it said could be traced to the guidelines. It cited the Privacy Act generally, or &quot;OAIC guidance&quot;, or sections that don&#39;t say what it claimed.</p><p>The bigger problem was scope. Asked the ten questions the guidelines don’t cover, it answered nine with confident specifics: a number of days for breach assessments, a definition from Californian law, a working-day deadline under the Spam Act. Some of those answers may well be right. None of them came from the source the system is supposed to be answering from, and a reader has no way to tell which ones are which.</p><p>So retrieval earns its place here by keeping a system that answers from a defined body of guidance inside that guidance, and by making it show its working. The model already knew plenty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ATdBDLoH9n7kaemvbCHww.png" /></figure><p>Three retrievers, and a result too close to call</p><p>Each retriever fed the same five chunks to the same model:</p><ul><li>BM25: 90% grounded balanced accuracy</li><li>vector search (text-embedding-3-small): 96.2%, with 37 of 40 answers right and cited, and all ten out-of-scope questions refused</li><li>hybrid, fusing the two rankings: 90%</li></ul><p>The tempting headline is “vector wins”. Paired up question by question, vector beat BM25 on four and lost on two. On 50 questions, that’s a couple of questions moving. Hybrid added nothing on this corpus. If I were scoping this for a client, I’d pick whichever retriever their infrastructure already runs and spend the effort on the failure cases below, because those are where the risk is.</p><h3>The failures worth knowing</h3><p>Every wrong answer to an answerable question traced back to a retrieval miss. The failures came in three shapes.</p><p>A miss that flips the answer. Asked whether a customer can let a company use their Medicare number as its customer ID, no retriever put the passage saying an individual cannot consent in the top five. The hybrid system then answered “Yes, a company can adopt a customer’s Medicare number…”, the opposite of the guideline, in a calm, plausible sentence with a citation attached.</p><p>The right number from the wrong passage. Asked how many permitted general situations section 16A lists, two retrievers surfaced the chapter on cross-border disclosure, which describes the five that apply there. The model answered five. The answer is seven. The retrieved text was accurate; it was answering a different question.</p><p>A merge that looks grounded. The guidelines mention the Online Safety Act’s rule on under-16 social media accounts. They never mention the Children’s Online Privacy Code. Asked about the code, two systems merged the two and cited the real paragraph about the Online Safety Act. That’s the failure that gives this article its title: the citation proved a passage was retrieved. It didn’t prove the passage said what the answer claimed. The vector system refused, correctly.</p><h3>The answer key had two errors, too</h3><p>Writing the key carefully didn’t make it right. One question about how long an organisation has to stop direct marketing after an opt-out pointed at “a reasonable period would generally be 30 days”. The evidence check showed that sentence is about telling someone where their data came from; the opt-out guidance is a different paragraph that says “no more than 30 days”. Same number, different rule. The check caught it before the first run.</p><p>The second error surfaced after the run: a correct, properly cited answer scored as uncited because my evidence phrase was too narrow to match the chunk that states the rule. I widened it and rescored from the recorded responses, which cost nothing. Both corrections are logged next to the questions.</p><h3>What I’d take from it</h3><p>Grounded accuracy and plain accuracy are different metrics, and only one of them tells you whether someone can rely on the system without redoing its work. Scoring both made the gap visible: a model that knew 57.5% of the answers was worth 5% to anyone who needed to check them.</p><p>The limits: 50 questions, one corpus, one answering model, and key facts checked by string match, which is strict about wording in a way a human grader wouldn’t be. The corpus, questions, scorer and every recorded response are in the repo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc424fba189c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reproducible and wrong]]></title>
            <link>https://medium.com/@luan_bui/reproducible-and-wrong-6071a9adfaea?source=rss-7b6cc998338a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6071a9adfaea</guid>
            <dc:creator><![CDATA[Luan Bui]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 03:50:52 GMT</pubDate>
            <atom:updated>2026-09-19T03:50:52.468Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I ran six models through the same eval three times each. The two that gave me the same answer every time were the two that were consistently wrong.</em></p><h3>The mistake I made first</h3><p>I had an eval I trusted and a model, gpt-4.1-mini, that scored 1 out of 3 on it. Later that day I ran the same model, on the same three cases, through the same code, and it scored 0.</p><p>Something had changed in between. I had edited the file that talks to the model. So I did the obvious thing: stashed my edit, re-ran the original, and got 1 out of 3. Put the edit back, ran it again, got 0. Two runs, a clean before-and-after. My change had broken it.</p><p>It hadn’t. The edit moved one parameter into a dictionary built two lines later. It could not have changed the request.</p><p>When I finally ran the thing properly, three times per model instead of once, that model’s result on that case came back: correct, then failed, then correct. Same prompt, same corpus, same temperature of zero. My careful A/B had been two coin flips, and I had read a story into them.</p><p>So here is the conclusion before the evidence. An eval you ran once is not an eval. It is an anecdote with a number attached, and the number is what makes it dangerous, because a number is the thing people stop arguing with.</p><h3>What I was measuring</h3><p>The corpus is my own system’s history: about 15,000 telemetry rows and 700 commits over two months. A deterministic detector does all the arithmetic and finds <em>movements</em>, a metric that stepped or a field that started existing. No model touches that part, deliberately.</p><p>The model’s only job is attribution. It gets one movement, a window of commits, and four tools: list the commits, describe one, sample telemetry rows, submit an answer. Eight tool calls, then the episode ends. To answer at all it must call submit_answer, with either a list of commits or a refusal.</p><p>Three labelled cases. Two have a real cause. The third does the real work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*QoQFQpEig4e0LZ-FKbYSSg.png" /></figure><p>The third case is the <em>same real movement</em> as the second, replayed with the window slid backwards so that the commit that caused it sits outside the window entirely. There are still commits in that window. Twenty-one of them. They are just all innocent.</p><p>The correct answer is: <em>the numbers don’t support a cause here.</em></p><p>I included that case because a scorer that only asks “did it name the right commit?” will happily pass an agent that invents a cause every time, since there is always <em>something</em> in the window to point at. Two adversarial baselines ship alongside: one that always names the biggest commit, one that always refuses. They score 0 out of 3 and 1 out of 3. Anything real has to beat both.</p><h3>Nothing beat both</h3><p>Six models, three cases, three runs each. Fifty-four episodes.</p><p>No run passed all three cases. The best any model managed was 2 out of 3. The case with no answer, the one the whole corpus is built around, was passed 2 times out of 18.</p><h3>Agreeing with yourself is not the same as being right</h3><p>Here is the spread. Each row is one model’s score on three identical runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*sRU4I4kqVxKaxd7g8w1_SQ.png" /></figure><p>Four of the six gave me different scores across identical runs. That instability matters on its own: if you benchmark by running each model once, a good share of your ranking is noise.</p><p>The interesting part is the other two. Two models were perfectly stable, same score three times out of three, and both were stable at the bottom. 1 out of 3 every time, failing the same two cases the same way.</p><ul><li>mistral-large-3 invented a cause for the unanswerable case. Three runs, three confident wrong answers, no hesitation.</li><li>grok-4-1-fast never stopped looking. It burned all eight tool calls and never submitted anything. Three runs, three timeouts.</li></ul><p>Reproducibility and correctness are independent properties, and we routinely treat the first as evidence of the second. A model that is wrong in the same way every time will look <em>better</em> on a small benchmark than one that is sometimes right, because consistency reads as competence. The two models I would trust least were the two that agreed with themselves most.</p><h3>Failure mode is more stable than score</h3><p>The scores wobbled. What barely moved was <em>how</em> each model failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*2IQ2gpNfQedq8Zmd-5MTOQ.png" /></figure><p>Across all eighteen runs, on the case with no answer: eight confabulated, six ran out of budget without answering, two returned nothing at all, and two got it right.</p><p>Grouped by model, those failures are close to characteristic. mistral-large-3 confabulates. grok-4-1-fast runs out of budget. gpt-oss-120b writes a perfectly good answer as prose, correctly naming the right commit, and never calls the tool it was told to call, which scores as a failure because an answer the system can&#39;t read is no use to anyone.</p><p>That is a more useful thing to know than a score. Choose a model by the way it fails. Where it lands on a leaderboard tells you less. If your agent runs unattended, a model that invents a plausible cause is far more dangerous than one that stalls and tells you nothing. If a human reads every output, the opposite may be true. Those are different products, and the score doesn’t distinguish them.</p><h3>The score hides the shape</h3><p>gpt-5-mini reached 2 out of 3 twice, the best result in the sweep. It got there by answering both real cases correctly and confabulating the one with no answer.</p><p>So on total score it beat the always-refuse baseline. On the only case that baseline passes, it lost to it.</p><p>If I had reported a single number per model, that is the model I would have recommended. The per-case matrix is the artefact. A single score is a summary that deletes the finding.</p><h3>Four things that nearly got scored as model failures</h3><p>I ran this on one Azure AI Foundry resource, because putting six vendors behind a single endpoint is the cheapest way to hold everything else constant. It mostly is. Four things weren’t, and each would have shown up as a model being bad at its job.</p><ul><li>gpt-5-mini rejects temperature: 0 outright, with HTTP 400 and <em>&quot;Only the default (1) value is supported&quot;</em>. So it ran at a different sampling temperature from the other five. That one is not fixable. You cannot hold sampling constant across vendors on one endpoint, and any comparison that doesn&#39;t mention it is quietly comparing two things at once. Mine is one of them. That&#39;s the caveat.</li><li>llama-4-scout returned finish_reason: &quot;tool_calls&quot; with an empty tool-calls array, on every setting I tried, while ordinary chat worked fine. That is a serving-layer defect, and scored naively it reads as a model that refuses to use tools, so I excluded it from the results and said why.</li><li>deepseek-v32 emitted a tool call whose arguments weren&#39;t valid JSON. My loop echoed that message back on the next turn, as the protocol requires, and the endpoint rejected my request, so the model wore the failure for a message it never got the chance to correct.</li><li>Rate limits. The first deployments sat on default quota. Repeated runs hit it, and my runner didn’t catch that class of error at all; it just died. A throttled request scored as a wrong answer looks exactly like a wrong answer, which means the number quietly absorbs my own infrastructure mistake.</li></ul><p>Two routes, incidentally, not one. OpenAI-format models answer on one path on that resource, and the open-weight and third-party models only answer on another, with the deployment named in the request body instead of the URL. Worth knowing before you plan a bake-off around a single client.</p><p>None of those four are interesting findings. They are the tax you pay for a number you can defend, and I’d rather show the receipts than present six clean scores.</p><h3>What this is, and what it isn’t</h3><p>Three repeats per model. Three cases. One corpus, my own system’s history. Six models scored, plus llama-4-scout excluded.</p><p>That is enough to show these results are unstable, and enough to show stability and correctness came apart. It is not enough to rank vendors, and I’d ask you not to read it that way: with three runs, the gap between a 1 and a 2 sits well inside the noise the article just described.</p><h3>Three questions worth asking</h3><p>If you are choosing between models, or trusting a comparison someone else ran:</p><ul><li>How many times was each cell run? If the answer is once, the ranking includes noise of unknown size, and a difference of one point means nothing.</li><li>What does the eval do with a question that has no answer? If every case has a correct answer, a model that always guesses scores well, and you have measured confidence rather than accuracy.</li><li>What was thrown out, and why? Every comparison excludes something. The ones worth trusting say what, and let you disagree.</li></ul><p>The last one is why I ran the baselines. Before I believed any model’s score, I needed the scorer to be able to fail: a strategy that always guesses, and one that always refuses, and proof that neither can fake the other’s job. Otherwise the first plausible number arrives and everyone stops asking.</p><p>Including me, for most of an afternoon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6071a9adfaea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An agent’s cost is set by what it can’t answer]]></title>
            <link>https://medium.com/@luan_bui/an-agents-cost-is-set-by-what-it-can-t-answer-b53b459b6bf0?source=rss-7b6cc998338a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b53b459b6bf0</guid>
            <dc:creator><![CDATA[Luan Bui]]></dc:creator>
            <pubDate>Tue, 15 Sep 2026 08:52:06 GMT</pubDate>
            <atom:updated>2026-09-19T03:42:48.228Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Three things I measured building AI agents over corpus data, and the one that decides what yours costs to run.</em></p><h3>The number</h3><p>I asked an agent two questions on the same afternoon, against the same corpus, on the same hardware.</p><p>The question it could answer took 3 turns. Retrieve, read, reply, under five minutes. The question it could not answer took 37 turns and thirty-three minutes, and then it stopped without an answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wgOixp_ZJQoIjMykwtsZ_w.png" /></figure><p>The second question was no harder than the first. Same length, no more ambiguous, no more technical. The only difference was whether the material needed to answer it existed in the corpus at all.</p><p>A twelvefold difference in turns, driven by a property of the data rather than of the question.</p><p>What this is and isn’t: two questions, one system, one afternoon, so n=2. The wall-clock figures come from one deployment and yours will differ. The turn counts are the part that generalises, because they describe how an agent behaves when retrieval comes back empty, and that is the same whether you run a frontier model or something small and local.</p><h3>Why the questions it can’t answer cost you the most</h3><p>Those thirty-seven turns went like this. The agent searched. Nothing useful came back. It rephrased and searched again. Still nothing. It tried a different index, then a ticket system, then a code search. Each time it got results; each time the results did not contain the answer; each time it concluded, reasonably, that it had searched badly rather than that the answer was absent.</p><p>An agent has no way to tell <em>“I haven’t found it yet”</em> from <em>“it isn’t here.”</em> So it does the only thing the loop I built allows: it tries again, slightly differently, until something stops it.</p><p>The cost falls out of that. Unanswerable questions are the expensive ones, and they cost in proportion to how hard your agent tries. Capability and waste scale on the same axis: more tools, a more persistent loop, more willingness to reformulate, and every one of those makes a miss cost more.</p><p>So the usual lever is the wrong one. When costs come in high the instinct is to change to a cheaper model. But if a real share of your traffic is questions your corpus cannot answer, you are paying for search attempts against material that isn’t there, while it looks like the agent is doing something. A cheaper model makes each wasted turn cheaper. A better one may well make it more expensive, because it tries harder before it stops.</p><p>Your running cost is set by coverage: what share of the questions people actually ask can be answered from what you actually hold. Model choice moves it at the margin. That is a question about your data, and you can answer it before you build anything.</p><h3>Why your dashboards won’t show it</h3><p>The thirty three minute request did not fail. It returned a response, like every other request that day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qG2uaE18HiU29kxdeMAWGw.png" /></figure><p>Your cost dashboard sees a spend spike. Read at a glance that says someone asked a hard question, which can even look like the system working. Your traces see more: all thirty-seven calls, in order, with the reasoning behind each. Read the whole trace and you could reconstruct exactly what the agent believed at every step. Neither holds an answer key. Spend and traces describe what the system did. Whether what it did was right is a different question, and nothing on the page asks it.</p><p>It’s worth noticing how consistently that category goes missing. A major vendor publishes a widely shared map of the skills an AI engineer needs: foundations (Python, Git, APIs), then the AI layer (embeddings, retrieval, agents and tool use), then shipping (containers, observability, monitoring). It’s a good map. There is nothing on it about whether the thing is right.</p><p>That omission is conventional rather than careless, and it explains the surprise. Observability is sold as delivering transparency and trust. Tracing thirty-seven calls gives you transparency. It leaves trust where it was, because you still don’t know whether the answer was good. Nobody notices, because the dashboards are green.</p><p>The failure also stays quiet, and this is the one claim here I haven’t measured. I’d expect that nobody files a bug for an answer that was merely unhelpful: they ask once more, get the same, and go back to asking a colleague. If that’s right, it surfaces as usage that plateaus months after launch, which is about the hardest signal there is to trace back to a cause.</p><h3>Zero looks like data</h3><p>An ice cream van operator wants to know how many people who walk up actually buy, so they put a counter on the till. The regulars don’t queue, though. They come to the side window, ask for the usual, and pay by tap. The till never opens.</p><p>At the end of the month the report says regulars: zero customers.</p><p>Zero looks like data when you are looking at the logs. Nobody questions it, because the counter is working perfectly. It is counting exactly what it was wired to count.</p><p>I’ve done the software version more times than I’d like. The one that cost me most was a pipeline that combined two signals into a richer output, gated on an identifier being present. Every test passed, because every test supplied the identifier. In production the identifier arrived null, the gate closed, and the combined path never ran. Nothing errored. The system produced output the whole time, just the thinner kind, from the fallback.</p><p>A test of your wiring is only worth its last hop. You can verify that A calls B, and that B is correct, and still be wrong about whether anything reaches C. If C fails by emitting nothing rather than garbage, no alarm ever fires.</p><p>Which is coverage again. A retrieval system returning nothing useful still returns results. They’re just not the right ones, and nothing asserts they should have been.</p><h3>The one that breaks most cost estimates</h3><p>I had a cost per hour figure for the system I was building. It came from telemetry I’d built, on a system I understood, and the telemetry logs were solid. Reconciled against the settled provider invoice, it was about 40% too high.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b6ZSMlOSu-5wmiHtLP-ScA.png" /></figure><p>Two causes, both boringly common.</p><p>The arithmetic. Cost per unit of work wasn’t constant. A fixed slice was incurred once per session regardless of length, so short sessions carried it alone, and a blended average across everything overstated them. No amount of telemetry accuracy would have caught this: the telemetry was right and the model sitting on top of it was wrong.</p><p>The currency. My billing account was denominated in one currency ($AUD, I’m a Melb AI developer), the API priced in another, and the console rendered both with the same dollar glyph. Read carelessly, that alone moves a figure by more than forty percent. Worth checking today.</p><p>The moral isn’t to measure more, because I had plenty of measurement. A number you haven’t reconciled against an invoice is an estimate wearing a number’s clothes. Telemetry tells you what your code thinks it did. The invoice tells you what you’re actually paying for. When they disagree, the invoice is right. Always!</p><h3>Three questions to ask before you build</h3><p>The mistake worth avoiding is committing to a running-cost figure before you know what determines it. All three of these are answerable without writing the agent.</p><ol><li>What share of the questions people actually ask can be answered from what you actually hold? Not what’s in the document store, but what’s in it that bears on the questions people bring. Collect fifty real questions from the people who’ll use it and check by hand. A dull afternoon that prices the whole system.</li><li>What does a miss cost compared to a hit? Run one question the corpus can’t answer and watch. Stops after three attempts, or reformulates fifteen times? Those are completely different cost profiles, and you want to know which before you’re paying for it in production.</li><li>Could you tell the two apart from what you log today? If a miss and a hit both look like a completed request, the answer is no, and that’s fixable in an afternoon, well before it’s a budget problem.</li></ol><p>None of these need a platform decision, a vendor, or a model. They need fifty real questions and someone willing to read the answers.</p><p>If you’ve measured this on your own system I’d like to hear what you found, particularly if your miss to hit ratio looks nothing like mine. Two questions on one afternoon is not a law of nature.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b53b459b6bf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My top 3 junior mistakes as a product manager in a startup hub]]></title>
            <link>https://medium.com/@luan_bui/my-top-3-junior-mistakes-as-a-product-manager-in-a-startup-hub-b12f3b81d4e1?source=rss-7b6cc998338a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b12f3b81d4e1</guid>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Luan Bui]]></dc:creator>
            <pubDate>Sat, 28 Jul 2018 15:47:41 GMT</pubDate>
            <atom:updated>2018-07-28T15:48:40.931Z</atom:updated>
            <content:encoded><![CDATA[<p>When you are 8, no one really learns how to ride a bike until you can feel the cold air blowing over your grazed knees &amp; hands as you pedal triumphantly with a new found freedom.</p><p>Just like every new endeavor the best way to learn is to make mistakes.</p><h4>You know what your users are thinking. (but your users actually think differently)</h4><p>With my empathy maps &amp; user persona’s well drawn, I went into the project with a bias thinking I know what my users are thinking.</p><p>Keep in mind your bias as you design your experiments, your usability testing, your A/B landing page tests, your interviews &amp; survey questions. Don’t let your bias steer your project off balance.</p><p>Ask open-ended questions, frame questions to find meaningful insights from your real users — “What do you currently do to solve this problem?”. UPDATE your maps &amp; personas, ASK yourself is this feature backlog actually solving your users real problems and not what you think how the user will interact with your product.</p><h4><strong>Can this feature have unintended side effects?</strong></h4><p>Product management like riding a bike. It’s a balancing act.</p><p>You need to balance UX, technology &amp; business while building products to solve your users real problems.</p><p>I remember one code meeting with the developer. As an engineer myself we were very excited on how an API would allow our app to resolve the exact location of the user right down to the meter and display that to all other users on the platform. Technologically awesome right?….. apart from user privacy.</p><p>If we build this feature, ask yourself: 1) How does this affect my users? 2) How does this affect the business model? Does it align with our business strategy and core business?</p><h4><strong>Roadblocks, setbacks and failures.</strong></h4><p>I remember the moment clearly. I’ve spent months on this project, my excitement, unlimited energy and passion to work on it day after day, grind through setbacks after setbacks. I went through several developer teams on this project. I spent months searching interviewing and assembling a team of developers. That night when the new team pushed the latest code to be review, I can see I made a poor choice.</p><p>On your product development marathon, any number of reasons will occur to jeopardise your project and team. Understand that these setbacks, roadblocks and failures are apart of the process. You have a choice to get up, brush off the sand on your grazed hands and knees, gather any useful learning experience and then get back on your bike.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b12f3b81d4e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>