[{"data":1,"prerenderedAt":647},["ShallowReactive",2],{"blog-evidence-not-rules-shop-assistant":3},{"id":4,"title":5,"author":6,"body":7,"date":637,"description":638,"extension":639,"meta":640,"navigation":641,"path":642,"seo":643,"sitemap":644,"stem":645,"__hash__":646},"blog\u002Fblog\u002Fevidence-not-rules-shop-assistant.md","Give the Model the Evidence, Not a Rule","Simon Mavsar",{"type":8,"value":9,"toc":616},"minimark",[10,14,28,33,36,39,43,46,49,52,56,139,142,145,148,151,157,163,166,172,176,179,183,186,190,193,196,199,203,206,279,282,285,288,292,295,298,302,305,310,375,378,385,388,392,395,493,496,500,503,579,582,586,589,592,595,599,602,605,609],[11,12,13],"p",{},"A visitor asks our pilot online shop's assistant about shipping. It answers with the costs. A question later it says: \"the shipping costs I gave are not in my information.\" The costs were right. The assistant had read them from the shop's pages and then lost sight of them.",[11,15,16,17,22,23,27],{},"This post is about why that happens, how we measured it, the fix that did not hold, and the one that did. All figures come from our staging environment: a test setup with the pilot shop's real catalogue, not production. Earlier posts cover ",[18,19,21],"a",{"href":20},"\u002Fblog\u002Fteaching-a-shop-assistant-to-know-its-products","how we measure the assistant"," and ",[18,24,26],{"href":25},"\u002Fblog\u002Fmcp-for-evals-on-neurotko","the MCP endpoint we read it through",".",[29,30,32],"h2",{"id":31},"why-it-takes-facts-back","Why It Takes Facts Back",[11,34,35],{},"On each turn the model gets the conversation so far, but only the text of its earlier replies. The excerpts from the shop's pages and the results of product look-ups that a reply stood on are gone: the search puts new excerpts in front of the model every turn, and tool results are dropped when the turn ends.",[11,37,38],{},"So on turn three the model reads its own turn-one claim, cannot find it in what it sees, and cannot tell a fact it read from one it made up. It does what a careful assistant does and takes it back.",[29,40,42],{"id":41},"measure-the-cost-and-the-retractions","Measure the Cost and the Retractions",[11,44,45],{},"We ran scripted conversations of one to seven questions, 40 in the first run, each costed in the ledger, and counted every conversation that took back an earlier reply. The runner counts these itself now: it flags a sentence that corrects an earlier reply, and any model call cut off at its output limit. A second suite, one question per conversation, scores quality as before (48 points at most).",[11,47,48],{},"The first runs set the baseline: a median of 1.74 credits a conversation (0.0174 EUR; 100 credits are 1 EUR on the customer's bill), 1.50 credits (0.0150 EUR) after two feed fixes. The traces showed one waste: for English questions to a German shop, a call that translated the search query also translated the last reply, writing 1,000 to 2,048 tokens and taking 4 to 8 seconds, longer than the reply itself. We replaced it with a call that writes a short search query. That call first failed in 10 of 21 traced cases, because the model's own thinking used up the output limit, and it did not fail in any of the next 118.",[11,50,51],{},"Retractions were the harder problem. Reading them by hand, we found the model took back true facts, and now and then corrected a real slip, which is what we want.",[29,53,55],{"id":54},"step-by-step","Step by Step",[57,58,59,81],"table",{},[60,61,62],"thead",{},[63,64,65,69,72,75,78],"tr",{},[66,67,68],"th",{},"Step",[66,70,71],{},"What the model has",[66,73,74],{},"Conversations with a retraction, of 34, a run",[66,76,77],{},"Against the baseline",[66,79,80],{},"Credits a conversation (price to the customer in EUR)",[82,83,84,105,122],"tbody",{},[63,85,86,93,96,99,102],{},[87,88,89],"td",{},[90,91,92],"strong",{},"Baseline",[87,94,95],{},"A search tool and a rule to look a fact up before calling it missing; it sees only the text of its earlier replies",[87,97,98],{},"14.3",[87,100,101],{},"the baseline",[87,103,104],{},"1.72 (0.0172)",[63,106,107,110,113,116,119],{},[87,108,109],{},"Plus a record of what each reply stood on",[87,111,112],{},"The pages and products each reply used, shown beside it",[87,114,115],{},"5.7",[87,117,118],{},"-60 %",[87,120,121],{},"1.84 (0.0184)",[63,123,124,127,130,133,136],{},[87,125,126],{},"Same, tidied",[87,128,129],{},"The record tagged as the system's, and the excerpts moved out of the system prompt",[87,131,132],{},"4.7",[87,134,135],{},"-67 %",[87,137,138],{},"1.50 (0.0150)",[11,140,141],{},"Each figure is the average of the three runs of that step. The tidied step is the state after both changes, which the text below describes one by one.",[11,143,144],{},"The credits in this table were priced before we counted the provider's cache writes in full, so they are a little low; the tables further down count them.",[11,146,147],{},"Fewer retractions are better. The baseline is the search tool and its look-up rule without the note and without the record: the model sees only the text of its earlier replies. From the baseline to the tidied step the mean fell by 67 %, from 14.3 to 4.7 conversations in 34. A repeat of that step with the same code gave 6.0, so a gap of a conversation or two between steps is within what one code version produces.",[11,149,150],{},"Quality stayed in the same band throughout: 46 to 48 of 48 on the single-question suite, scored with the fixed rules described below.",[11,152,153,156],{},[90,154,155],{},"The note helped, and it was a patch."," Before the baseline, with the same search tool, we had told the model in the prompt that its evidence was out of view, and retractions fell to 7 of 34 in one run. That is a sentence about a gap, not the evidence. When we removed it, retractions came back (16 of 34, and 14 and 13 in two repeats). Reading the 51 retraction sentences of the three runs: 33 took back or doubted a claim only because the model had not checked it again this turn, 9 corrected a real slip, and 9 were about two addresses (below). The look-up rule made it worse in one way: the model now held its earlier replies to the standard of \"did I check this?\", and could not see what they stood on.",[11,158,159,162],{},[90,160,161],{},"The general fix gives the model the evidence."," Code, not a model, keeps a record for each reply: which products a tool returned, which pages the search found. The record sits beside the reply it belongs to and is shown to the model before the next visitor message. Nothing in it is summarised.",[11,164,165],{},"Doubts about claims not checked again fell from about 11 a run to 4, 2 and 2 with the record. Two side effects needed care. In 3 of 102 conversations the model took the record for text the visitor had pasted (\"the data you pasted\"), because it sat in the visitor's message. Tagging it as added by the system, in a section of the system prompt that is the same every turn, brought that to 0, and the doubts to 0 in both runs with the tag.",[11,167,168,171],{},[90,169,170],{},"Then the cache started to work."," The excerpts sat in the system prompt, and they change every turn, so the provider's cache covered little. Next we moved them into the visitor's message, so the system prompt is the same on every turn and the cache covers more of it. The share of input read from the cache rose from 33 and 45 % to 46, 48 and 48 %, and the retractions stayed where the tagged record had them.",[29,173,175],{"id":174},"what-evidence-does-not-fix","What Evidence Does Not Fix",[11,177,178],{},"Two things were left. First, the model sometimes gives a stock date different from the feed's and corrects it a turn later; we have not found the cause. Second, the shop's own pages give two different addresses, one in the footer and one in the imprint, and nothing says which is the shop and which is the company's seat. The assistant swapped them between turns: four of the eight retraction sentences in the run with the search tool. That belongs in the shop's pages, not in our prompt.",[29,180,182],{"id":181},"the-lesson","The Lesson",[11,184,185],{},"When a model contradicts its own earlier answer, the temptation is to write a rule: do not retract. We wrote one, and it worked for a while. It worked because it covered a gap, and the gap was real: the model could not see what its replies stood on. Showing it the evidence removed the cause. The rule only hid it.",[29,187,189],{"id":188},"how-we-worked","How We Worked",[11,191,192],{},"An AI coding agent did the analysis, reading staging through Neurotko's MCP endpoint: traces, token use, settings and the product store. The live eval runner counts retractions, calls cut at their output limit and credits per purpose without a person reading each report first.",[11,194,195],{},"The work also changed the endpoint. Three MCP additions came straight out of it: token use per conversation, the conversation behind each traced call, and reading traces by time window. Before, the runner polled every 5 seconds and lost calls when more than 50 came between two reads. Now it reads a run once, after it ends.",[11,197,198],{},"Before we built the evidence record, a second model reviewed the design, and we revised the plan after its review. And two of our scoring rules turned out to be stale: one expected a product to be out of stock that had since come back, and one counted too few products as children's products. Both had scored right answers 1 of 2. Scored again, the runs moved from 46, 46 and 45 to 48, 48 and 47. A measure needs a review as much as the thing it measures.",[29,200,202],{"id":201},"update-18-november-how-much-the-reply-thinks","Update, 18 November: How Much the Reply Thinks",[11,204,205],{},"After the evidence record, the reply call was still 94 % of a conversation's cost. The model thinks before it answers, and 54 % of its output tokens were thinking the visitor never sees. We added a setting for each agent instance: the model's default, low effort, or thinking off. Each got three cost runs and three quality runs on staging; the default has five cost runs.",[57,207,208,227],{},[60,209,210],{},[63,211,212,215,218,221,224],{},[66,213,214],{},"Setting",[66,216,217],{},"Credits, median (price to the customer in EUR)",[66,219,220],{},"Reply time, 90th percentile",[66,222,223],{},"Quality, of 48",[66,225,226],{},"Conversations with a retraction, mean of 34",[82,228,229,245,262],{},[63,230,231,234,236,239,242],{},[87,232,233],{},"Default",[87,235,104],{},[87,237,238],{},"10.5 s",[87,240,241],{},"47.7",[87,243,244],{},"5.0",[63,246,247,250,253,256,259],{},[87,248,249],{},"Low effort",[87,251,252],{},"1.44 (0.0144)",[87,254,255],{},"8.7 s",[87,257,258],{},"47.0",[87,260,261],{},"3.3",[63,263,264,267,270,273,276],{},[87,265,266],{},"Thinking off",[87,268,269],{},"1.06 (0.0106)",[87,271,272],{},"5.3 s",[87,274,275],{},"44.3",[87,277,278],{},"3.0",[11,280,281],{},"Low effort costs 16 % less and the reply comes 17 % sooner. The quality is 0.7 points lower, which is inside the spread of three runs. It also makes the answers shorter, not only the thinking, so we call it effort. The retractions fall from 5.0 to 3.3, but the same code gave between 2 and 9 in three runs, so we do not claim that as a gain.",[11,283,284],{},"Thinking off costs 38 % less and halves the reply time, but quality falls by three points, and the same three questions lose a point in every run. We do not use it. The pilot shop's assistant on staging runs at low effort.",[11,286,287],{},"One of our own checks went wrong here as well. Two runs started in the same second shared an id, so a cost run counted 24 quick one-question chats as its own and showed a median of 0.50 credits. We saw it because replies a conversation read 2.4, not 3, and ran it again.",[29,289,291],{"id":290},"update-19-november-a-step-we-dropped","Update, 19 November: A Step We Dropped",[11,293,294],{},"One failure was left. The record named the pages a reply stood on, not what they said. In one conversation the shop's page said a free calendar comes with any dog food. The assistant said so, and a turn later took it back: the new excerpts held no calendar, and the record gave only the page's address.",[11,296,297],{},"We tried showing the model the first 250 characters of each passage a reply stood on, beside it. It cost 12 % more a conversation at first (1.62 credits, 0.0162 EUR, against 1.44, 0.0144 EUR), and 8 % more once we halved the text (1.56 credits, 0.0156 EUR). Reading a sample of the retractions afterwards, we found it no better than low effort alone: the calendar was taken back three times in the sample, each time at the default effort or before the record, and in none of the ten retractions we read at low effort. So we removed it. The record of pages and products stays.",[29,299,301],{"id":300},"all-stages-side-by-side","All Stages Side by Side",[11,303,304],{},"We name each stage by what the model sees, not by the number of the run. Each row averages the runs of that stage (three cost runs and three quality runs).",[306,307,309],"h3",{"id":308},"progress-at-a-glance","Progress at a glance",[57,311,312,330],{},[60,313,314],{},[63,315,316,318,321,324,327],{},[66,317],{},[66,319,320],{},"Wrong withdrawals a run",[66,322,323],{},"Cost a conversation, credits (EUR to the customer)",[66,325,326],{},"Slowest replies, 9 in 10 are faster",[66,328,329],{},"Correct answers, of 48 points",[82,331,332,348],{},[63,333,334,337,340,342,345],{},[87,335,336],{},"At the start (stage 1)",[87,338,339],{},"5.9",[87,341,104],{},[87,343,344],{},"9.8 s",[87,346,347],{},"46.7",[63,349,350,353,360,366,372],{},[87,351,352],{},"At the end, on the released build",[87,354,355,356,359],{},"0.0 (",[90,357,358],{},"-100 %",")",[87,361,362,363],{},"1.43 (0.0143), ",[90,364,365],{},"-17 %",[87,367,368,369],{},"8.6 s, ",[90,370,371],{},"-12 %",[87,373,374],{},"46.3",[11,376,377],{},"The wrong withdrawals nearly disappear, a conversation costs 17 % less, and replies come 12 % sooner, at about the same quality (46.3 against 46.7). The chart shows every stage.",[11,379,380],{},[381,382],"img",{"alt":383,"src":384},"Three bar charts across four stages of the shop assistant, on staging. Wrong withdrawals a run: 5.9 at stage 1, then 1.6, 0.0 and 0.0. Cost a conversation in credits: 1.72, 1.72, 1.44 and 1.43. Slowest replies, 9 in 10 are faster, in seconds: 9.8, 10.5, 8.7 and 8.6.","\u002Fblog\u002Fevidence-not-rules-stages.png",[11,386,387],{},"The percentages for the unwanted retractions come from a sample we read and carry wide ranges (stage 1: 3.1 to 9.6 a run), so read them as \"from several a run to about one or none\", not as exact. Cost and reply time are measured on every conversation of the runs, and the reply time moves with the time of day: runs of the same code differed by 2 s.",[306,389,391],{"id":390},"which-retractions-are-left","Which retractions are left",[11,393,394],{},"A retraction, which the tables call a withdrawal, is a reply that takes back or corrects an earlier one, and not all of them are bad. We want the ones that correct a real slip, and the ones that show the shop's own data disagreeing with itself (two addresses, two stock dates). We do not want a true fact taken back, or a doubt about a true claim that the assistant raises only because it did not check the claim again. The count of all retractions cannot tell these apart, so we read a random sample of 20 retractions for each stage (all of them where there were fewer), sorted by a script where the shop's product store settles the case and otherwise by hand. The table shares each stage's retractions a run by what we read.",[57,396,397,416],{},[60,398,399],{},[63,400,401,404,407,410,413],{},[66,402,403],{},"Stage",[66,405,406],{},"All withdrawals a run",[66,408,409],{},"Wrong withdrawals a run (95 % range)",[66,411,412],{},"Corrections of a real slip or a shop-data conflict (fewer is better)",[66,414,415],{},"Not settled",[82,417,418,437,457,475],{},[63,419,420,423,426,431,434],{},[87,421,422],{},"1. Baseline: sees only its earlier answers",[87,424,425],{},"17.0",[87,427,428,430],{},[90,429,339],{}," (3.1 to 9.6)",[87,432,433],{},"9.4",[87,435,436],{},"1.7",[63,438,439,442,445,451,454],{},[87,440,441],{},"2. + Sources listed",[87,443,444],{},"6.6 (-61 %)",[87,446,447,450],{},[90,448,449],{},"1.6"," (0.7 to 3.1)",[87,452,453],{},"4.6",[87,455,456],{},"0.3",[63,458,459,462,465,471,473],{},[87,460,461],{},"3. + Low effort",[87,463,464],{},"3.3 (-81 %)",[87,466,467,470],{},[90,468,469],{},"0.0"," (0.0 to 0.9)",[87,472,278],{},[87,474,456],{},[63,476,477,480,483,488,491],{},[87,478,479],{},"Released build",[87,481,482],{},"2.0 (-88 %)",[87,484,485,487],{},[90,486,469],{}," (0.0 to 0.8), all six read",[87,489,490],{},"2.0",[87,492,469],{},[11,494,495],{},"The unwanted retractions fall from about 5.9 a run to about 1 or fewer once the record is shown beside each reply. The retractions that remain are mostly wanted: the assistant correcting its own slip, or the shop's data disagreeing with itself. The same code can read differently from one set of runs to the next: for the step that lists the sources, our first eight runs found no wrong withdrawal in the sample we read, and the next five found 1.6 a run. So a gap between neighbouring rows may be noise. A right correction is the better result of a slip or of a conflict in the shop's data; the best result is that none happens, so the numbers in that column fall as the assistant improves. A reader can judge a case differently, and several of ours were close.",[306,497,499],{"id":498},"what-a-conversation-costs-how-fast-how-good","What a conversation costs, how fast, how good",[11,501,502],{},"Fewer credits, a shorter reply time and a higher quality are better. The percentages are against the first row.",[57,504,505,520],{},[60,506,507],{},[63,508,509,511,514,516,518],{},[66,510,403],{},[66,512,513],{},"Conversations with a withdrawal, of 34",[66,515,323],{},[66,517,326],{},[66,519,329],{},[82,521,522,534,549,564],{},[63,523,524,526,528,530,532],{},[87,525,422],{},[87,527,98],{},[87,529,104],{},[87,531,344],{},[87,533,347],{},[63,535,536,538,541,544,547],{},[87,537,441],{},[87,539,540],{},"5.0 (-65 %)",[87,542,543],{},"1.72 (0.0172), 0 %",[87,545,546],{},"10.5 s, +7 %",[87,548,258],{},[63,550,551,553,556,559,562],{},[87,552,461],{},[87,554,555],{},"3.3 (-77 %)",[87,557,558],{},"1.44 (0.0144), -16 %",[87,560,561],{},"8.7 s, -11 %",[87,563,258],{},[63,565,566,568,571,574,577],{},[87,567,479],{},[87,569,570],{},"2.0 (-86 %)",[87,572,573],{},"1.43 (0.0143), -17 %",[87,575,576],{},"8.6 s, -12 %",[87,578,374],{},[11,580,581],{},"Low effort costs 16 % less and its replies come 11 % sooner, at the same quality.",[29,583,585],{"id":584},"a-check-on-the-released-code","A Check on the Released Code",[11,587,588],{},"After the changes we ran the released build (low effort) three times. Each run is 44 conversations on the cost suite and 24 questions on the quality suite. A conversation cost 1.43 credits on average (0.0143 EUR), the 90th percentile reply time was 8.6 s, and the quality 46.3 of 48 (45, 48 and 46; the lowest run lost two points on the shipping to Austria, where the answer said it had no data for Austria and then gave the German prices). The runs held six replies that withdrew or corrected an earlier one, two a run. We read all six: four showed the shop's stock dates disagreeing with themselves, two corrected the assistant's own slip, and none took a true fact back.",[11,590,591],{},"Two scripts are a thin sample for a failure we care about, so we wrote ten more. Each starts with a fact only a shop page holds (a free calendar with dog food, free shipping from 150 EUR, delivery within two weeks, 14 days to withdraw, the opening hours), then moves on to products, so the search puts other excerpts in front of the model. Three of the ten are in English, against a German page. Three runs, 59 conversations (a server error cost one): the fact was stated at the start 70 times, and in one conversation a reply took it back a turn later, the free calendar. The same scripts on the build with the passage text we dropped gave none in 60 conversations. One in 59 against none in 60 is not a difference we can rely on, so we kept the simpler build.",[11,593,594],{},"The check had a flaw of its own. Our first list of words missed \"2 weeks\" written with a digit, so two conversations looked as if the fact was never stated. We fixed the list and scored the runs again.",[29,596,598],{"id":597},"a-loop-that-improves-itself","A Loop That Improves Itself",[11,600,601],{},"The work is a loop. When the agent hit a gap in a run, say it had to poll where an id would do, it named the gap, and we extended the MCP endpoint in the same iteration. The goal of each round of tests is to improve the tooling and the assistant we profile.",[11,603,604],{},"The endpoint now gives token use per conversation, traces by time window and by conversation, text search in the knowledge base, and one write tool that sets the reasoning effort between runs. Each run's report stores the settings the endpoint reported before the run started, and every write is in the audit log under the token's name, so the agent cannot mix up its own experiments.",[29,606,608],{"id":607},"next","Next",[11,610,611,612,27],{},"All of this ran on staging. The measurements are done, and production is next. If you run an online shop, Neurotko can answer your visitors from your own product feed and pages. ",[18,613,615],{"href":614},"mailto:info@neurarod.com","Talk to us",{"title":617,"searchDepth":618,"depth":618,"links":619},"",2,[620,621,622,623,624,625,626,627,628,634,635,636],{"id":31,"depth":618,"text":32},{"id":41,"depth":618,"text":42},{"id":54,"depth":618,"text":55},{"id":174,"depth":618,"text":175},{"id":181,"depth":618,"text":182},{"id":188,"depth":618,"text":189},{"id":201,"depth":618,"text":202},{"id":290,"depth":618,"text":291},{"id":300,"depth":618,"text":301,"children":629},[630,632,633],{"id":308,"depth":631,"text":309},3,{"id":390,"depth":631,"text":391},{"id":498,"depth":631,"text":499},{"id":584,"depth":618,"text":585},{"id":597,"depth":618,"text":598},{"id":607,"depth":618,"text":608},"2026-11-18","Our shop assistant took back true facts it had stated. Showing the model what each reply stood on fixed it, a lower thinking effort made it 17 % cheaper, and an AI agent improved the tooling and the assistant round by round. Measured on staging.","md",{},true,"\u002Fblog\u002Fevidence-not-rules-shop-assistant",{"title":5,"description":638},{"loc":642},"blog\u002Fevidence-not-rules-shop-assistant","bR_WxeZ0E7WVvh7C21OPk-AU3Fty32PMK7dLuNCREo8",1795354276200]