<?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: Beamlaka</title>
    <description>The latest articles on DEV Community by Beamlaka (@bnobody47).</description>
    <link>https://dev.to/bnobody47</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3908815%2F069faf1e-2455-419d-b65c-0241b6df6118.png</url>
      <title>DEV Community: Beamlaka</title>
      <link>https://dev.to/bnobody47</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bnobody47"/>
    <language>en</language>
    <item>
      <title>Why Your Non-Significant Benchmark Result Might Be a Power Problem (Not a Model Problem)</title>
      <dc:creator>Beamlaka</dc:creator>
      <pubDate>Fri, 08 May 2026 18:24:16 +0000</pubDate>
      <link>https://dev.to/bnobody47/why-your-non-significant-benchmark-result-might-be-a-power-problem-not-a-model-problem-5god</link>
      <guid>https://dev.to/bnobody47/why-your-non-significant-benchmark-result-might-be-a-power-problem-not-a-model-problem-5god</guid>
      <description>&lt;p&gt;In Week 11, Tenacious-Bench reported:&lt;/p&gt;

&lt;p&gt;Delta A = -2.34 pts, 95% CI [-11.09, +6.20], p = 0.71 (not significant)&lt;br&gt;
Delta B = +22.18 pts, 95% CI [+14.43, +29.82], p = 0.0 (reported significant)&lt;br&gt;
At first glance, this looks straightforward: one result is meaningful, one is not.&lt;br&gt;
But this interpretation can be wrong if the benchmark is underpowered for the effect sizes we actually care about.&lt;/p&gt;

&lt;p&gt;This post answers two practical questions:&lt;/p&gt;

&lt;p&gt;With 216 binary pass/fail tasks, what size improvement can this benchmark reliably detect at 80% power?&lt;br&gt;
Is reporting p = 0.0 valid when bootstrapping with 2,000 samples?&lt;br&gt;
1) The key statistical gap: significance without power is incomplete&lt;br&gt;
A p-value tells you whether observed data are unusual under a null model.&lt;br&gt;
It does not tell you whether your benchmark was large enough to detect a small-but-real improvement.&lt;/p&gt;

&lt;p&gt;So p = 0.71 can mean either:&lt;/p&gt;

&lt;p&gt;there is truly no effect, or&lt;br&gt;
there is a small effect, but your benchmark has low detection power.&lt;br&gt;
Those are very different decisions for model iteration.&lt;/p&gt;

&lt;p&gt;2) MDE at current benchmark size (216 tasks)&lt;br&gt;
Using a standard two-proportion planning approximation with:&lt;/p&gt;

&lt;p&gt;baseline pass rate ≈ 74%&lt;br&gt;
alpha = 0.05 (two-sided)&lt;br&gt;
power = 0.80&lt;br&gt;
n = 216 tasks&lt;br&gt;
the minimum detectable effect (MDE) is about +10.9 percentage points.&lt;/p&gt;

&lt;p&gt;That is the core result.&lt;/p&gt;

&lt;p&gt;If your practical target is +3 to +5 points, 216 tasks is too small for reliable detection.&lt;/p&gt;

&lt;p&gt;3) Reinterpreting Delta A (p = 0.71)&lt;br&gt;
Given this power profile, Delta A is better interpreted as inconclusive for small effects, not “definitive no improvement.”&lt;/p&gt;

&lt;p&gt;Approximate detection probabilities at n=216:&lt;/p&gt;

&lt;p&gt;true +3 pt effect -&amp;gt; ~11% detection chance&lt;br&gt;
true +5 pt effect -&amp;gt; ~23% detection chance&lt;br&gt;
true +8 pt effect -&amp;gt; ~52% detection chance&lt;br&gt;
So failure to reject at +3/+5 is expected most of the time.&lt;br&gt;
This is exactly why a non-significant p-value should not be read as proof of no effect when power is low.&lt;/p&gt;

&lt;p&gt;4) How large Tenacious-Bench v0.2 should be&lt;br&gt;
At the same baseline and test settings, target task counts are approximately:&lt;/p&gt;

&lt;p&gt;+3 pt detection -&amp;gt; 3,226 tasks&lt;br&gt;
+5 pt detection -&amp;gt; 1,128 tasks&lt;br&gt;
+8 pt detection -&amp;gt; 420 tasks&lt;br&gt;
Design implication:&lt;/p&gt;

&lt;p&gt;If +5 is your minimum meaningful lift, v0.2 should be around ~1.1k+ tasks.&lt;br&gt;
If +3 matters, v0.2 needs multi-thousand scale.&lt;br&gt;
If you only care about large lifts (~+8), 400+ can be enough.&lt;br&gt;
5) Correcting the bootstrap p-value (p = 0.0)&lt;br&gt;
With finite bootstrap/Monte Carlo resampling, p = 0.0 is not valid.&lt;/p&gt;

&lt;p&gt;Use corrected empirical p-value:&lt;/p&gt;

&lt;h1&gt;
  
  
  p
&lt;/h1&gt;

&lt;p&gt;r&lt;br&gt;
+&lt;br&gt;
1&lt;br&gt;
B&lt;br&gt;
+&lt;br&gt;
1&lt;br&gt;
p= &lt;br&gt;
B+1&lt;br&gt;
r+1&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;where:&lt;/p&gt;

&lt;p&gt;B&lt;br&gt;
B = number of resamples&lt;br&gt;
r&lt;br&gt;
r = count of resamples at least as extreme as observed statistic&lt;br&gt;
For &lt;/p&gt;

&lt;h1&gt;
  
  
  B
&lt;/h1&gt;

&lt;p&gt;2000&lt;br&gt;
B=2000, &lt;/p&gt;

&lt;h1&gt;
  
  
  r
&lt;/h1&gt;

&lt;p&gt;0&lt;br&gt;
r=0:&lt;/p&gt;

&lt;h1&gt;
  
  
  p
&lt;/h1&gt;

&lt;p&gt;1&lt;br&gt;
2001&lt;br&gt;
≈&lt;br&gt;
0.00050&lt;br&gt;
p= &lt;br&gt;
2001&lt;br&gt;
1&lt;br&gt;
​&lt;br&gt;
 ≈0.00050&lt;br&gt;
Correct reporting:&lt;/p&gt;

&lt;p&gt;bootstrap p ≈ 0.0005, or&lt;br&gt;
bootstrap p &amp;lt;= 1/2001, or&lt;br&gt;
bootstrap p &amp;lt; 0.001&lt;br&gt;
Not correct: p = 0.0.&lt;/p&gt;

&lt;p&gt;6) Suggested report rewrite&lt;br&gt;
A defensible rewrite is:&lt;/p&gt;

&lt;p&gt;“Under a standard two-proportion planning approximation (baseline ~74%), a 216-task benchmark has an 80%-power MDE of about +10.9 points. Therefore, Delta A = -2.34 pts (95% CI [-11.09, +6.20], p = 0.71) is inconclusive for small practical gains, not definitive evidence of no effect. To detect +3/+5/+8 point gains at 80% power, v0.2 would require approximately 3,226 / 1,128 / 420 tasks. For Delta B with 2,000 bootstrap samples, report p ≈ 0.0005 (or p &amp;lt; 0.001), not p = 0.0.”&lt;/p&gt;

&lt;p&gt;Final takeaway&lt;br&gt;
Evaluation gives you a score difference.&lt;br&gt;
Statistics tells you whether your benchmark could detect the difference you care about.&lt;/p&gt;

&lt;p&gt;For Tenacious-Bench, the Day 4 conclusion is simple and actionable:&lt;/p&gt;

&lt;p&gt;keep reporting CIs and p-values,&lt;br&gt;
but add MDE + power-based sample-size planning as a first-class benchmark design step.&lt;br&gt;
That turns “not significant” from an ambiguous label into a decision-ready result.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>performance</category>
    </item>
    <item>
      <title>Did My LoRA Learn Tenacious Style—or Just Memorize Augmented Patterns?</title>
      <dc:creator>Beamlaka</dc:creator>
      <pubDate>Thu, 07 May 2026 18:17:57 +0000</pubDate>
      <link>https://dev.to/bnobody47/did-my-lora-learn-tenacious-style-or-just-memorize-augmented-patterns-3fi6</link>
      <guid>https://dev.to/bnobody47/did-my-lora-learn-tenacious-style-or-just-memorize-augmented-patterns-3fi6</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1k5sb122vfk2yt8aj3id.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1k5sb122vfk2yt8aj3id.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;In Week 11 Tenacious-Bench, we trained a LoRA adapter on Tenacious-style B2B sales emails using Supervised Fine-Tuning (SFT).&lt;br&gt;
We got a real performance lift: Delta A = +0.263 (p &amp;lt; 0.0001).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But that result exposed a harder question&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Did the adapter learn how Tenacious writes, or just what repeated Tenacious-like samples looked like?&lt;/p&gt;

&lt;p&gt;This post answers that at the mechanism level: cross-entropy token-by-token, LoRA gradient flow, and why low-diversity augmentation can make convergence look better than generalization.&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;What SFT cross-entropy actually optimizes&lt;/strong&gt;&lt;br&gt;
In autoregressive SFT, the model predicts the next token at each step.&lt;br&gt;
Cross-entropy loss measures how much probability mass the model gave the correct next token.&lt;/p&gt;

&lt;p&gt;So the objective is:&lt;/p&gt;

&lt;p&gt;not “be honest,”&lt;br&gt;
not “be cautious,”&lt;br&gt;
not “be Tenacious,”&lt;br&gt;
but: assign high probability to target tokens in the training distribution.&lt;/p&gt;

&lt;p&gt;If your targets consistently reflect Tenacious behavior, style improves indirectly.&lt;br&gt;
But the optimization target is still token prediction.&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;How gradients flow in LoRA when base weights are frozen&lt;/strong&gt;&lt;br&gt;
For each adapted layer:&lt;br&gt;
W = W0 + BA&lt;br&gt;
W 0is frozen&lt;br&gt;
only A and B are trainable&lt;br&gt;
During backprop, gradients pass through the full forward graph, but updates only changeA/B.&lt;br&gt;
That means LoRA acts as a low-rank steering update on top of a fixed backbone.&lt;/p&gt;

&lt;p&gt;Practical interpretation: you are not retraining the model’s full knowledge. You are learning a compact directional adjustment that shifts output tendencies.&lt;/p&gt;

&lt;p&gt;3) &lt;strong&gt;What your seven target modules imply&lt;/strong&gt;&lt;br&gt;
You adapted:&lt;br&gt;
attention projections: q_proj, k_proj, v_proj, o_proj&lt;br&gt;
feed-forward projections: gate_proj, up_proj, down_proj&lt;br&gt;
A useful diagnostic lens:&lt;/p&gt;

&lt;p&gt;Attention-heavy updates often correlate with better context routing (e.g., weak signal -&amp;gt; interrogative phrasing).&lt;br&gt;
MLP-heavy updates often correlate with lexical/phrase-shape adaptation (which can be desired style—or shortcut memorization).&lt;br&gt;
This is why module-level gradient norms matter. Without them, “it improved” is under-explained.&lt;/p&gt;

&lt;p&gt;4) &lt;strong&gt;Why low diversity is a gradient problem, not just a datasheet warning&lt;/strong&gt;&lt;br&gt;
Your datasheet states that 94.3% of training pairs are augmented variants of only 128 originals.&lt;br&gt;
That has direct optimization consequences.&lt;/p&gt;

&lt;p&gt;Near-duplicate examples produce highly aligned gradient directions repeatedly.&lt;br&gt;
Cross-entropy rewards those repeated token patterns quickly. Training loss falls. Metrics can rise.&lt;/p&gt;

&lt;p&gt;But this can represent two different realities:&lt;/p&gt;

&lt;p&gt;Generalizable policy learning (what you want)&lt;br&gt;
Surface-pattern reinforcement (what you fear)&lt;br&gt;
Cross-entropy alone cannot tell which one happened.&lt;/p&gt;

&lt;p&gt;5) &lt;strong&gt;Why your Delta A is real but not fully sufficient&lt;/strong&gt;&lt;br&gt;
A statistically strong Delta A means the adapter improved on your evaluation distribution.&lt;br&gt;
It does not automatically prove robust style generalization out-of-family.&lt;/p&gt;

&lt;p&gt;The defensible claim is:&lt;/p&gt;

&lt;p&gt;“The adapter improved predictive behavior on measured data; generalization vs memorization requires additional diagnostics.”&lt;/p&gt;

&lt;p&gt;That is stronger science and better engineering.&lt;/p&gt;

&lt;p&gt;6) &lt;strong&gt;Minimal diagnostics to separate style learning from memorization&lt;/strong&gt;&lt;br&gt;
A) Grouped holdout by original family&lt;br&gt;
Do not split augmentation siblings across train/held-out.&lt;br&gt;
Keep all variants of one original together in one split.&lt;/p&gt;

&lt;p&gt;Stable performance on grouped holdout -&amp;gt; stronger evidence of true style learning&lt;br&gt;
Large drop -&amp;gt; evidence of augmentation-family memorization&lt;br&gt;
B) Gradient norm breakdown by LoRA module&lt;br&gt;
Log gradient norms for LoRA params and aggregate by:&lt;/p&gt;

&lt;p&gt;q/k/v/o&lt;br&gt;
gate/up/down&lt;br&gt;
This doesn’t “prove style” alone, but it makes your mechanism claim concrete: where did training pressure concentrate?&lt;/p&gt;

&lt;p&gt;7) &lt;strong&gt;Practical conclusion for FDE fine-tuning work&lt;/strong&gt;&lt;br&gt;
This issue generalizes to any narrow, augmented SFT project (sales writing, summarization, code style, domain formatting):&lt;/p&gt;

&lt;p&gt;loss convergence is necessary,&lt;br&gt;
benchmark gain is valuable,&lt;br&gt;
but neither alone proves intended behavior learning.&lt;br&gt;
If you want to claim “learned policy,” add grouped holdout and module-level gradient diagnostics as standard evidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final takeaway&lt;/strong&gt;&lt;br&gt;
Your LoRA adapter likely learned a useful steering update.&lt;br&gt;
But with heavy augmentation concentration, the safest conclusion is:&lt;/p&gt;

&lt;p&gt;“We improved next-token policy on this distribution; we are validating whether that policy generalizes beyond augmentation families.”&lt;/p&gt;

&lt;p&gt;That framing is honest, technically grounded, and production-defensible.&lt;/p&gt;

</description>
      <category>deeplearning</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>nlp</category>
    </item>
    <item>
      <title>Why DeepSeek V3.2 Tool Calls Can Drift from Ordered System Instructions</title>
      <dc:creator>Beamlaka</dc:creator>
      <pubDate>Wed, 06 May 2026 18:32:59 +0000</pubDate>
      <link>https://dev.to/bnobody47/why-deepseek-v32-tool-calls-can-drift-from-ordered-system-instructions-1gb</link>
      <guid>https://dev.to/bnobody47/why-deepseek-v32-tool-calls-can-drift-from-ordered-system-instructions-1gb</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fss2z2vwdisztoge9z91k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fss2z2vwdisztoge9z91k.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;When my partner asked this question, it sounded very specific—but it exposed a broad engineering issue many of us hit in production agent systems:&lt;/p&gt;

&lt;p&gt;When DeepSeek V3.2 selects a tool via tool_choice="auto", what tokens are actually generated, how is that different from older special-token function-calling formats or strict structured calling, and what does that do to ordered system-instruction adherence?&lt;/p&gt;

&lt;p&gt;I expected a simple “function-calling behavior” answer.&lt;br&gt;
What I found is more useful: this is not just a model question. It is a protocol + parser + orchestration question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The core insight&lt;/strong&gt;&lt;br&gt;
For open-weight DeepSeek V3.2 workflows, tool calling in auto mode is typically:&lt;/p&gt;

&lt;p&gt;model emits textual wrapper content (DSML-like blocks),&lt;br&gt;
runtime/parser extracts tool calls from that text,&lt;br&gt;
runtime normalizes into tool_calls[] objects.&lt;br&gt;
So the system is often text-generation first, structure recovery second.&lt;/p&gt;

&lt;p&gt;That differs from strict constrained function-calling stacks where decoding itself is grammar/schema constrained and invalid next tokens are masked out during generation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In one line:&lt;/strong&gt;&lt;br&gt;
auto parser-based calling is a best-effort protocol; constrained calling is a decode-time enforcement regime.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What the model is actually doing at generation time&lt;/strong&gt;&lt;br&gt;
To make this concrete, separate three layers that are often mixed together:&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;Surface token generation&lt;/strong&gt;&lt;br&gt;
The model generates tokens that can become:&lt;/p&gt;

&lt;p&gt;normal assistant prose,&lt;br&gt;
reasoning content,&lt;br&gt;
tool-wrapper text signaling an invocation.&lt;br&gt;
2) &lt;strong&gt;Prompt serialization&lt;/strong&gt;&lt;br&gt;
Your system message, tool descriptions/schemas, and user turn are serialized into one prompt context (with model-specific formatting).&lt;/p&gt;

&lt;p&gt;3) &lt;strong&gt;Parser/runtime recovery&lt;/strong&gt;&lt;br&gt;
A parser interprets emitted text and converts it into structured tool-call objects.&lt;/p&gt;

&lt;p&gt;If your generation crosses boundaries cleanly, everything looks reliable.&lt;br&gt;
If boundaries are malformed, delayed, truncated, or ambiguous, you get drift—even when the model’s intent looked close.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why ordered instruction adherence can fail&lt;/strong&gt;&lt;br&gt;
Suppose your system instruction says:&lt;/p&gt;

&lt;p&gt;“First inspect context, then call Tool A, then Tool B, then summarize.”&lt;/p&gt;

&lt;p&gt;In parser-first auto paths, failures can happen for structural reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Branch competition at decode time&lt;/strong&gt;&lt;br&gt;
At the action boundary, the model can continue prose/reasoning or begin tool-wrapper output. Without strict masking, this is free competition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt-distance pressure&lt;/strong&gt;&lt;br&gt;
Ordered rules often appear far earlier than the local action boundary where tool wrappers begin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reasoning/action boundary leakage&lt;/strong&gt;&lt;br&gt;
If transitions around reasoning tags and tool wrappers are imperfect, parser classification can degrade.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Truncation at sensitive points&lt;/strong&gt;&lt;br&gt;
Cutting generation inside wrapper syntax can break tool recovery entirely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parser coercion side effects&lt;/strong&gt;&lt;br&gt;
Some runtimes “helpfully” coerce arguments post-hoc. Useful in some cases, but not equivalent to strict schema-safe decoding.&lt;/p&gt;

&lt;p&gt;So “instruction drift” here is often not just “model ignored rules.”&lt;br&gt;
It can be “the protocol boundary and recovery path were fragile.”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparison: three reliability regimes&lt;/strong&gt;&lt;br&gt;
A) Parser-based auto mode (common in open/self-hosted paths)&lt;br&gt;
flexible, capable&lt;br&gt;
but more exposed to wrapper malformation, partial emits, and order drift&lt;br&gt;
needs robust validation and retries&lt;br&gt;
B) Named/required tool choice with stronger control&lt;br&gt;
reduces branch ambiguity&lt;br&gt;
improves order and tool-selection predictability&lt;br&gt;
still depends on schema/tool design quality&lt;br&gt;
C) Strict constrained structured decoding&lt;br&gt;
strongest structural guarantee&lt;br&gt;
invalid next tokens masked at decode time&lt;br&gt;
structure reliability is highest, though semantic quality can still vary&lt;br&gt;
&lt;strong&gt;Practical engineering implications&lt;/strong&gt;&lt;br&gt;
If your workflow is order-sensitive or high-risk, treat parser-first auto as best effort, not guaranteed protocol obedience.&lt;/p&gt;

&lt;p&gt;The most effective mitigations I’d recommend:&lt;/p&gt;

&lt;p&gt;-Keep tool set and schema text compact&lt;br&gt;
Less scaffolding noise near the decision boundary.&lt;/p&gt;

&lt;p&gt;-Encode order criteria twice&lt;br&gt;
In system/developer instructions and inside tool descriptions.&lt;/p&gt;

&lt;p&gt;-Reserve token headroom&lt;br&gt;
Prevent truncation mid-wrapper or mid-argument.&lt;/p&gt;

&lt;p&gt;-Validate after parse&lt;br&gt;
Tool name, required args, arg types, and instruction-order checks.&lt;/p&gt;

&lt;p&gt;-Add repair/retry policy&lt;br&gt;
If parse fails or order check fails, reprompt with explicit corrective instruction.&lt;/p&gt;

&lt;p&gt;-Checkpoint long chains&lt;br&gt;
Split long multi-tool sequences into staged turns instead of one long free-decoded pass.&lt;/p&gt;

&lt;p&gt;-Use stricter selection modes when correctness dominates&lt;br&gt;
Named/required tools or constrained-decoding paths for critical flows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimal test you can run this week&lt;/strong&gt;&lt;br&gt;
A fast A/B experiment will make this real:&lt;/p&gt;

&lt;p&gt;Fix one ordered workflow (A -&amp;gt; B -&amp;gt; summarize)&lt;br&gt;
Same prompts, same cases&lt;br&gt;
Compare:&lt;br&gt;
parser-based auto&lt;br&gt;
stricter named/required selection (or constrained path where available)&lt;br&gt;
Track:&lt;br&gt;
order violation rate&lt;br&gt;
malformed parse rate&lt;br&gt;
argument schema violation rate&lt;br&gt;
end-to-end success&lt;br&gt;
latency overhead&lt;br&gt;
This turns an abstract debate into measurable engineering tradeoffs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope note&lt;/strong&gt;&lt;br&gt;
This post focuses on publicly documented DeepSeek V3.2 open-weight behavior and common parser/runtime patterns. It does not claim undocumented hosted internals beyond published API contracts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final takeaway&lt;/strong&gt;&lt;br&gt;
The key lesson for agent/tool-use internals is:&lt;/p&gt;

&lt;p&gt;Tool reliability is not only “how smart the model is.”&lt;br&gt;
It is the combined behavior of decoding regime, serialization format, parser recovery, and orchestration checks.&lt;/p&gt;

&lt;p&gt;For ordered system-instruction adherence, that distinction matters a lot.&lt;br&gt;
If you need deterministic correctness, pair model capability with protocol discipline and runtime enforcement.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Why front-loaded rules drift in long evaluator and agent loops</title>
      <dc:creator>Beamlaka</dc:creator>
      <pubDate>Mon, 04 May 2026 19:46:06 +0000</pubDate>
      <link>https://dev.to/bnobody47/why-front-loaded-rules-drift-in-long-evaluator-and-agent-loops-1j3p</link>
      <guid>https://dev.to/bnobody47/why-front-loaded-rules-drift-in-long-evaluator-and-agent-loops-1j3p</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F92ye0f4mma17n41td6ua.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F92ye0f4mma17n41td6ua.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;strong&gt;Subtitle: In context is not the same as in control.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By Beamlak Adane&lt;/p&gt;

&lt;p&gt;A colleague asked a sharp question that many of us hit once we move from demos to production evaluators and agents:&lt;/p&gt;

&lt;p&gt;In multi-turn evaluation or agent loops, models often begin to ignore the initial rules in the system prompt even though those tokens are still inside the context window. What is happening at the token level during decoding that causes early “anchor” tokens to lose influence over time in a streaming context, and how do attention sinks, KV-cache reuse, and prefix caching affect this? Beyond increasing context length, what can engineers do to preserve instruction fidelity and judgment consistency across long sessions?&lt;/p&gt;

&lt;p&gt;This post is my answer after digging into the mechanism and mapping it to something concrete I ship: a sales-email evaluator loop.&lt;/p&gt;

&lt;p&gt;The core idea: visible is not the same as influential&lt;br&gt;
Keeping the system prompt inside the window is a storage guarantee, not an influence guarantee.&lt;/p&gt;

&lt;p&gt;In a decoder-only transformer, each new token is produced by forming a fresh query and comparing it against keys from all prior positions (under the causal mask). A past token affects the next token only through how much attention mass the current query assigns to that token’s key, after softmax normalization and any positional biases.&lt;/p&gt;

&lt;p&gt;So the system rules do not “disappear” in the sense of vanishing from the input. They can stop mattering because the active computation at the current step no longer routes enough probability mass through those early positions—or because later tokens have become fresher, more specific carriers of a different trajectory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why multi-turn loops drift harder than one long completion&lt;/strong&gt;&lt;br&gt;
Three forces show up again and again in evaluator and agent traces:&lt;/p&gt;

&lt;p&gt;Recency competition. Each turn adds user text, tool output, and prior model generations. Those tokens are often semantically closer to the immediate subtask than a long rubric paragraph at the front. They compete for attention mass on every decode step.&lt;/p&gt;

&lt;p&gt;Self-conditioning. Autoregressive models always condition on what they already generated. A slightly off-rubric line becomes part of the context and can steer the next line. Drift compounds because the model is partly “arguing with its own last move.”&lt;/p&gt;

&lt;p&gt;Turn boundaries change the query geometry. Instruction-following research suggests attention to system tokens can look relatively stable within a single answer, then shift more abruptly across turns. That matches engineering reality: each loop iteration injects new observations that compete directly with the original rubric.&lt;/p&gt;

&lt;p&gt;Attention sinks, KV cache, and prefix caching (what they actually do)&lt;br&gt;
Attention sinks&lt;br&gt;
Attention sinks are a subtle but important correction to naive “early tokens always win” stories. In long streaming settings, some early tokens can receive surprisingly persistent attention mass—even when they are not semantically “the rule.” Softmax attention must allocate probability somewhere; when the model does not need to attend strongly to many past tokens, mass can pool in early positions that function partly as normalization anchors rather than semantic instruction consultation.&lt;/p&gt;

&lt;p&gt;Practical implication: seeing high attention on the beginning of the prompt does not automatically mean the model is faithfully executing the rubric text that follows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KV cache reuse&lt;/strong&gt;&lt;br&gt;
KV caching is primarily an inference optimization: once a token’s key and value tensors are computed, they can be reused during autoregressive decoding instead of recomputing the full prefix every step.&lt;/p&gt;

&lt;p&gt;Behaviorally, cached states are frozen snapshots of earlier positions. They remain available to future queries, but they are not continuously reinterpreted as the conversation evolves. Each new token still has to “re-win” attention against an expanding set of competitors—often including very recent, task-specific states.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prefix caching&lt;/strong&gt;&lt;br&gt;
Prefix caching (serving systems that reuse KV blocks for a shared static prefix across requests) is different again. It does not magically fix “the model stopped obeying rules inside one endless chat thread.”&lt;/p&gt;

&lt;p&gt;Its biggest win is operational: it makes it cheap to replay a canonical rubric and tool schema on every call, which enables an architecture where you stop relying on one ever-growing mutable conversation as the carrier of policy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A concrete example from my evaluator work&lt;/strong&gt;&lt;br&gt;
In my Week 11 bench, part of the scoring contract encodes “don’t overcommit under weak evidence” using simple lexical cues—downgrade language versus hard commitment language. That is a deliberate simplification, but it makes the drift mechanism obvious:&lt;/p&gt;

&lt;p&gt;If the loop injects urgency language from tool output, the model may echo that tone.&lt;br&gt;
Once it emits an overconfident phrase, that phrase becomes recent context on the next step.&lt;br&gt;
The original rubric may still be present in the window, but the next-token distribution is increasingly steered by the trajectory, not only by the static policy block.&lt;br&gt;
The point is not that lexical checks are enough for production. The point is that decode-time routing + self-conditioning can break instruction fidelity even when the rules are technically still “in context.”&lt;/p&gt;

&lt;p&gt;What to do in production (beyond “use a bigger window”)&lt;br&gt;
These are the interventions I take seriously for evaluators, judges, and agent planners:&lt;/p&gt;

&lt;p&gt;Prefer stateless or quasi-stateless calls. Rebuild each step from an immutable rubric plus compact task state plus the current item. Do not assume one long thread keeps policy alive just because it fits.&lt;/p&gt;

&lt;p&gt;Separate policy memory from episodic memory. Summarize observations and decisions; do not summarize the controlling rules into the same lossy blob unless you are okay with slow policy erosion.&lt;/p&gt;

&lt;p&gt;Re-anchor rules near the decision. If a constraint matters for this verdict, repeat a compressed version of it immediately before the judgment step—not only at the front of a huge trace.&lt;/p&gt;

&lt;p&gt;Add an explicit rule-recall pass. Make the model name the applicable rubric items before it commits to a final answer. This is a cheap guardrail against silent drift.&lt;/p&gt;

&lt;p&gt;Structure the output. Schemas and checklists make violations easier to detect and correct than free-form prose alone.&lt;/p&gt;

&lt;p&gt;Keep hard guarantees outside the model when possible. Deterministic validators, allowlists, and post-checks should enforce what you cannot afford to “mostly” follow.&lt;/p&gt;

&lt;p&gt;Measure drift, not just accuracy. Track instruction adherence over turns and variance across seeds. Evaluators fail quietly; your metrics should be loud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I am explicitly not claiming&lt;/strong&gt;&lt;br&gt;
This post focuses on inference-time mechanics and systems patterns. Training-time fixes (instruction hierarchy fine-tuning, verifiable RL-style constraint learning, etc.) matter too, but they are a different lever. Get the loop architecture right first; otherwise you are paying training costs to compensate for a bad control path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Further reading&lt;/strong&gt;&lt;br&gt;
Vaswani et al., Attention Is All You Need — attention definition and decoding stack: &lt;a href="https://arxiv.org/pdf/1706.03762" rel="noopener noreferrer"&gt;https://arxiv.org/pdf/1706.03762&lt;/a&gt;&lt;br&gt;
Xiao et al., StreamingLLM — attention sinks and long streaming behavior: &lt;a href="https://arxiv.org/pdf/2309.17453" rel="noopener noreferrer"&gt;https://arxiv.org/pdf/2309.17453&lt;/a&gt;&lt;br&gt;
Hugging Face Transformers — KV caching / generation: &lt;a href="https://huggingface.co/docs/transformers/cache_explanation" rel="noopener noreferrer"&gt;https://huggingface.co/docs/transformers/cache_explanation&lt;/a&gt;&lt;br&gt;
vLLM — prefix caching design: &lt;a href="https://docs.vllm.ai/en/stable/design/prefix_caching/" rel="noopener noreferrer"&gt;https://docs.vllm.ai/en/stable/design/prefix_caching/&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Closing&lt;/strong&gt;&lt;br&gt;
If you take one line away, take this: instruction drift in long loops is often a control-path failure, not a storage failure. Tokens can remain visible while losing authority; sinks can make early attention misleading; caches change cost and architecture, not the fundamental competition between old rules and new trajectory. The strongest fixes replay policy intentionally, separate policy from trajectory, re-anchor at decision time, and enforce hard constraints outside the model’s narrative.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Tenacious-Bench v0.1: a small B2B sales-outreach benchmark with contamination checks</title>
      <dc:creator>Beamlaka</dc:creator>
      <pubDate>Sat, 02 May 2026 10:22:22 +0000</pubDate>
      <link>https://dev.to/bnobody47/tenacious-bench-v01-a-small-b2b-sales-outreach-benchmark-with-contamination-checks-4foj</link>
      <guid>https://dev.to/bnobody47/tenacious-bench-v01-a-small-b2b-sales-outreach-benchmark-with-contamination-checks-4foj</guid>
      <description>&lt;p&gt;General sales benchmarks often miss how real outbound agents fail: overclaiming on weak signals, unsafe “bench” commitments, tone that drifts into pushy follow-ups, and gaps between what the rep promises and what delivery can support. For a class project (TRP1 Week 11), I built Tenacious-Bench v0.1, a compact, machine-scored task set aimed at those failure modes—not generic helpfulness.&lt;/p&gt;

&lt;p&gt;What’s in the dataset&lt;/p&gt;

&lt;p&gt;The public release is on Hugging Face: &lt;a href="https://huggingface.co/datasets/Bnobody/tenacious_bench_v0.1" rel="noopener noreferrer"&gt;https://huggingface.co/datasets/Bnobody/tenacious_bench_v0.1&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It currently exposes 168 rows in the hub viewer, with splits aligned to how I train and evaluate: train (105) and validation (63). Tasks mix several authoring modes—programmatic sweeps, multi-LLM synthesis with judge filtering, trace-informed scenarios, and hand-authored adversarial cases—so the bench isn’t a single-generator monoculture.&lt;/p&gt;

&lt;p&gt;Each row includes structured inputs (prospect context, stack, headcount, signal confidence, bench availability, etc.), a candidate outreach payload (subject/body/CTA), explicit ground-truth expectations (e.g. when to hand off vs. qualify), and a versioned scoring rubric so scores are reproducible without hand-waving.&lt;/p&gt;

&lt;p&gt;Why contamination and provenance matter&lt;/p&gt;

&lt;p&gt;Synthetic benchmarks leak in boring ways: near-duplicate phrasing across splits, embedding neighbors that are too close, or “eval” tasks that are effectively the same scenario as training with a date tweak. I run n-gram overlap, embedding similarity, and an explicit signal-window / provenance policy (train/dev vs. held-out time labeling) and record outcomes in a JSON report in the repo. The goal isn’t perfection—it’s to make leakage visible and actionable.&lt;/p&gt;

&lt;p&gt;Training angle (Path B)&lt;/p&gt;

&lt;p&gt;I’m not publishing a giant SFT corpus here; the project emphasizes a preference-style critic path (ORPO/DPO-style data prep + LoRA training) to catch inconsistency and unsafe commitments. The dataset is the artifact reviewers can actually load; training code and logs live alongside the project README.&lt;/p&gt;

&lt;p&gt;Limitations (stated plainly)&lt;/p&gt;

&lt;p&gt;Tasks are synthetic and English-first; they don’t replace live A/B tests or compliance review. The bench is meant as a regression harness for product teams iterating on sales agents, not as proof of real-world lift.&lt;/p&gt;

&lt;p&gt;Call to action&lt;/p&gt;

&lt;p&gt;If you’re building outbound agents, try grading your model on a slice of these tasks and compare against your internal rubric. I’m especially interested in cases where the model is “fluent” but violates bench/signal safety—those are the rows worth expanding next.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
