<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Murno</title>
    <description>The latest articles on DEV Community by Murno (@murno).</description>
    <link>https://dev.to/murno</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4286755%2F07215b2c-1e6a-4764-9c49-35729ca187ee.png</url>
      <title>DEV Community: Murno</title>
      <link>https://dev.to/murno</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/murno"/>
    <language>en</language>
    <item>
      <title>Building structured client-memory and deterministic rule-checking tools for B2B agencies</title>
      <dc:creator>Murno</dc:creator>
      <pubDate>Sun, 06 Dec 2026 17:32:16 +0000</pubDate>
      <link>https://dev.to/murno/building-structured-client-memory-and-deterministic-rule-checking-tools-for-b2b-agencies-10e1</link>
      <guid>https://dev.to/murno/building-structured-client-memory-and-deterministic-rule-checking-tools-for-b2b-agencies-10e1</guid>
      <description>&lt;p&gt;In March, a client tells your agency: &lt;em&gt;"Email only. And please, no calls before 11."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Months later, a teammate who never saw that thread books a 9am call. The rule was sitting in message #37 of a thread nobody has time to re-read.&lt;/p&gt;

&lt;p&gt;I ran a controlled benchmark to test whether an LLM can reliably carry standing client rules across noisy B2B agency email threads—and where every common approach still slips.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;A synthetic client history was tested at &lt;strong&gt;44 messages&lt;/strong&gt; and &lt;strong&gt;300 messages&lt;/strong&gt;, with five standing rules buried inside routine replies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send a link instead of attachments&lt;/li&gt;
&lt;li&gt;Format dates as &lt;code&gt;DD/MM&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;No calls before 11am&lt;/li&gt;
&lt;li&gt;Weekly updates instead of daily&lt;/li&gt;
&lt;li&gt;No &lt;em&gt;"I hope you're well"&lt;/em&gt; openers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Four approaches answered nine new emails under identical conditions (&lt;code&gt;qwen2.5:7b&lt;/code&gt; via Ollama, five automated checks per reply):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Long-context (&lt;code&gt;long_context&lt;/code&gt;):&lt;/strong&gt; Paste as much thread history as fits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rolling summary (&lt;code&gt;summary&lt;/code&gt;):&lt;/strong&gt; Maintain a running summary of the thread.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval (&lt;code&gt;retrieval&lt;/code&gt;):&lt;/strong&gt; Fetch messages matching the current email.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured rulebook (&lt;code&gt;memory&lt;/code&gt;):&lt;/strong&gt; Extract standing rules once and draft from the structured rule set—tested both &lt;strong&gt;pre-guard&lt;/strong&gt; and &lt;strong&gt;with deterministic post-guards&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Scoreboard
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;memory&lt;/code&gt; (pre-guard)&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;memory&lt;/code&gt; (with deterministic post-guards)&lt;/th&gt;
&lt;th&gt;&lt;code&gt;long_context&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;retrieval&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;summary&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;44 messages&lt;/strong&gt; (&lt;code&gt;7_long_buried_rules&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;98% (44/45)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100% (45/45)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;89% (40/45)&lt;/td&gt;
&lt;td&gt;91% (41/45)&lt;/td&gt;
&lt;td&gt;84% (38/45)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;300 messages&lt;/strong&gt; (&lt;code&gt;8_huge_history&lt;/code&gt;, truncated)&lt;/td&gt;
&lt;td&gt;98% (44/45)&lt;/td&gt;
&lt;td&gt;--&lt;/td&gt;
&lt;td&gt;89% (40/45)&lt;/td&gt;
&lt;td&gt;89% (40/45)&lt;/td&gt;
&lt;td&gt;87% (39/45)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What Stood Out
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On a 44-message thread, unguarded approaches are close:&lt;/strong&gt; 98% vs. 91% is 3 checks apart out of 45.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Much smaller context per reply:&lt;/strong&gt; Structured rules used &lt;strong&gt;906 characters&lt;/strong&gt; per reply vs. &lt;strong&gt;2,622 characters&lt;/strong&gt; for long-context on the 44-message thread.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where unguarded models still trip:&lt;/strong&gt; Formatting dates (&lt;code&gt;DD/MM&lt;/code&gt; vs. month names), negative constraints (&lt;em&gt;"no calls before 11am"&lt;/em&gt;), and inventing placeholder URLs when asked to share files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structure enables deterministic enforcement:&lt;/strong&gt; Pairing structured rules with a deterministic post-check layer pushed &lt;code&gt;7_long_buried_rules&lt;/code&gt; from 98% (44/45) to &lt;strong&gt;100% (45/45)&lt;/strong&gt;—a layer that unstructured long-context, retrieval, or summary baselines cannot apply directly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Known Limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;All benchmark threads are synthetic; 45 checks per scenario shows a clear pattern across 9 test emails, not a production-scale evaluation.&lt;/li&gt;
&lt;li&gt;Naive clock-time checks treat any time before 11:00 as a violation, including negative phrasing like &lt;em&gt;"I can't do before 11am"&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Naive attachment checks flag any &lt;code&gt;"attach"&lt;/code&gt; substring, including &lt;em&gt;"I can't attach"&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Replacing an old rule whose wording shares no keywords with the new rule (e.g., &lt;em&gt;"weekly on Fridays"&lt;/em&gt; -&amp;gt; &lt;em&gt;"daily progress summary"&lt;/em&gt;) depends on the extraction pass flagging the removal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Inspect the Benchmark Logs
&lt;/h2&gt;

&lt;p&gt;The underlying extraction and deterministic guard engine powers &lt;strong&gt;Murno&lt;/strong&gt; and is kept proprietary. The benchmark methodology, per-scenario breakdown, and raw scored outputs (&lt;code&gt;results.md&lt;/code&gt; and &lt;code&gt;results.json&lt;/code&gt;) are published here:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/shreemurno-source/agency-client-memory-benchmark" rel="noopener noreferrer"&gt;agency-client-memory-benchmark on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>rag</category>
      <category>python</category>
    </item>
  </channel>
</rss>
