DFilterForge Retrospective 00: Overview

DFilterForge has an LLM write a Wireshark display filter from a plain-English request, then checks it with a pinned tshark against synthetic captures. This post is the overview of the retrospective series: it walks through one example end to end, gives the three main sets of numbers and a timeline of more than two months, and points out where the pitfalls cluster, which post covers each of the ten pitfalls most worth reading about, and what remains unfinished.

Published
Reading time
11 min read
Category
Retrospectives
Tags
Translated from
the Chinese original
Contents8 sections

This is the overview of the DFilterForge retrospective series.

DFilterForge does this: give an LLM a plain-English request, have it write a Wireshark display filter, then run that filter with a pinned tshark 4.6.8 over several synthetic captures and check whether the packets it selects are right. The project ran from September 3 to November 9. The source code and records cited in this series are all pinned to the commit of November 91.

What each post covers

The first four posts are about design, the last two about engineering:

PostWhat it covers
01 Three wrong answers scored full marksThe verifier that judges right and wrong: where labels come from, and how to test the test data itself
02 Show the model the packet that disproves itHow the model’s input is designed, and the repair round that attaches a counterexample
03 The only significant result was an artifact of rate limitingThe evaluation protocol: freezing, pre-registration, rerun noise, rate limiting, statistical conventions, and the LLM-as-a-judge comparison
04 A small model that errs more quietlySupervised fine-tuning (SFT) for Qwen3-1.7B, and how far you can get without training
05 A pinned tshark, keyless CI, and on-demand GPUsPlatform engineering: running tshark safely, freezing the field catalog, a CI without keys, GPUs on Modal, the Windows host
06 Every number has a source, yet one digit was still missing on a phoneThe website: every value carries its provenance and is recomputed independently by tests, and the kinds of errors this chain still misses

One answer, end to end

Let me walk through the whole flow with one question. The request: find all TCP segments with source port 443 and the FIN flag set, whether or not ACK is also set. The reference answer is tcp.flags.fin == 1 && tcp.srcport == 443.

  1. Answering. The model has four answering conditions: write the filter directly, or hand over a typed intent IR (a piece of JSON) that code compiles into a filter; each of the two forms is further split by whether the prompt includes 16 retrieved fields, giving C1 through C4. Under C4 (typed intent plus retrieved fields), qwen3-32b’s answer compiles to:

    Text
    (tcp.srcport == 443 && tcp.completeness.fin == true)
  2. What’s wrong. tcp.completeness.fin is tshark’s conversation completeness field; it describes the whole TCP conversation, not this packet’s own FIN flag. The 16 retrieved fields don’t include tcp.flags.fin, and the only one whose display name is FIN is this one. From the list, it looks like the FIN flag itself.

  3. Scoring. tshark runs this filter over three scoring probes. A probe is a script-generated capture; each frame’s label depends only on how the packet was constructed. This filter compiles and runs, but selects no packets at all, missing the one frame each probe says should be selected: a FIN+ACK sent from port 443, frame 60 on semantic-37.

  4. Repair. The repair round shows the model a counterexample card: a FIN+ACK frame from another, unscored feedback probe. The model changes its answer to (tcp.srcport == 443 && tcp.flags.fin == true), and it is right on all three probes.

The protocol defines eight outcomes in total; the four this series mentions most often are:

  • strong exact: the frames selected on all three probes match the labels exactly, at least one probe’s labels are not the empty set, and no disallowed fields or constants were used;
  • silent-wrong: it compiles and runs, but on at least one probe it disagrees with the labels. The answer above is one;
  • invalid: it doesn’t compile, or doesn’t run;
  • shortcut: it matches on all three probes, but uses disallowed fields or constants, such as frame numbers.

This trajectory is on the website’s front page, chosen by a rule registered in advance. But on this question the model also fixes its answer when it is only told “wrong” and shown no card, so it says nothing about what cards do. An example that only a card can fix is in the second post.

Three sets of numbers

The numbers below mostly come from the frozen test split: 40 questions that can be answered directly (called cases below), each asked in two ways, each way being one item, 80 items in all; plus 32 items that need clarification or cannot be expressed as a filter.

Judging right and wrong.

  • Four hosted models under four conditions submitted 1,280 answers in total; 971 compile and run, of which 165 are silent-wrong.
  • Each probe ends with 33 witness packets, placed there specifically to tell apart answers that differ from the reference only slightly. Removing them and replaying, 731 of the 971 would be judged strong exact, of which 11 are actually silent-wrong.
  • An LLM (deepseek-v4-pro-0813, thinking disabled) was asked to judge these 971 answers one by one. Of the 165 silent-wrong ones, it judged 58 “correct”; showing it the reference answer didn’t help either — 62.

Repair. Of the 320 answers the four hosted models gave under C4, 75 are silent-wrong or invalid. Each gets one more chance, and the three ways of giving it fix:

  • with a counterexample card: 35, 0.467 [0.347, 0.590];
  • only saying “your filter was incorrect”: 21, 0.280 [0.161, 0.435];
  • resending the first round’s prompt unchanged: 4, 0.053 [0.014, 0.113].

Training.

  • After QLoRA fine-tuning of Qwen3-1.7B, strong exact on the test split under C4 rose from 0.063 [0.025, 0.113] to 0.396 [0.296, 0.492] (mean over three seeds). Paired by case, the difference is +0.333 [0.233, 0.433], with 29 cases better and 1 worse.
  • The two no-training steps are each inconclusive: first constraining decoding with a JSON schema gives 0.088; then adding 8 training examples to the prompt gives 0.100. Fine-tuning beats these two steps combined by 0.296 [0.196, 0.404]. These two steps were added post hoc.
  • It also errs more quietly: of the base model’s 80 answers, 49 originally failed to compile or had the wrong format; after fine-tuning, each seed has 32 to 35 that become executable, of which 17 to 18 are silent-wrong.

Brackets are 95% intervals, computed with case-level bootstrap; how they’re computed is in the third post.

As of November 9, the whole project cost at most USD 9.64: hosted models at most USD 2.38, LLM judging at most USD 0.95, and Modal’s bill USD 6.32. “At most” because the first two items are computed from billing upper bounds; the total is the sum of the three before rounding.

Timeline

DateEvent
Sep 3First commit: an evaluation environment running in Docker, 57 files
Sep 5–12Preliminary research: the runner, the frozen field catalog, the semantic benchmark, executable replay
Sep 15Replanning; the evaluation protocol written down; a spending cap of USD 50. The commit message says the original pilot plan of self-hosting a 27B “could not fund a training result and put the first model call weeks away”
Sep 23First call to a real model: qwen3-32b on the dev split, 64 requests, costing USD 0.0059. The three wrong answers that got full marks came from this run
Sep 26Test split frozen
Oct 1First test-split requests sent: four models, plus one rerun of qwen3-32b
Oct 4–5Repair rounds on the dev and test splits
Oct 6Website up, repository public, decided to move GPU work to Modal. 69 commits this day, the most of the whole project
Oct 8SFT with three seeds finished; that night the inference container running the tests was preempted
Oct 9–17No commits except one Dependabot dependency upgrade merged on the 10th
Oct 18Headline SFT results
Oct 19–31Failure analysis; a test rerun of the seed-2026 fine-tuned model on the same service (pass B); the LLM-judge comparison; the exhibits page showing what witness packets do; the 1.7B repair round. Requests sent on Oct 28 hit the key-sorting accident; found and fixed on the 31st
Nov 9The no-training baseline ladder and the cost, i.e. the commit this series is pinned to

As of November 9, main has 608 commits in total (including merge commits), spread over 32 days, with 46 PRs merged. By physical lines, the Python under src is about 21k lines, scripts about 25k, the Python under tests about 48k, and the website’s TypeScript about 16k (of which over 5k are tests); docs/results holds 10,442 record files.

Where the pitfalls cluster

Looking back, most pitfalls are not in the models but on the measurement side: the verifier, the evaluation protocol, the engineering platform, and the website. They also look alike: the check passes, but the thing being checked is wrong.

silent-wrong is itself this shape: it compiles and runs, but selects the wrong packets. Yet the same thing happened at every layer of the project: the verifier gave wrong answers full marks; of the 12 registered baseline comparisons, the only significant one came from rate limiting; fine-tuning made errors quieter; the local build stayed green because of caching; the website displayed a bill as USD 0.2 on mobile, and the tests couldn’t see it.

The ten pitfalls most worth reading about

  1. Three wrong answers got full marks. The first run of a real model on the dev split: no packet in the probes could separate these three answers from the reference. After adding witness packets and rescoring, the whole run went from 28 strong exact and 7 silent-wrong to 25 and 10. (01)
  2. 97.22% passed the threshold, and the one it missed was exactly the one that mattered. When the benchmark was set up on September 9, each of the 36 cases got one hand-written wrong example. With a single probe, 35 of them were judged wrong (97.22%), above the 95% threshold. The missed case’s wrong example differs from the reference only on SYN-ACK packets, and that probe deliberately had no SYN-ACK. A ratio threshold hides the counterexamples it misses. (01)
  3. The prompt didn’t say how to write values. In the first dev-split run (16 items), C3 wrote all integers and booleans as strings. The +0.375 of C4 minus C3 mostly measures “does the prompt give the types of values”, not retrieval itself. (02)
  4. The only significant result was an artifact of rate limiting. Of the 12 registered condition comparisons on the test split, the only interval excluding 0 is deepseek-v4-pro-0813’s C2 minus C1, 0.138 [0.013, 0.263]. But C1 has 20 directly answerable items whose three attempts were all HTTP 429, so no answer was obtained, and by the rules they count as not answered correctly; of the 11 cases C2 won, 10 contain such items. (03)
  5. The unit for pooling statistics was wrong. When the dev-split repair round pooled four models, the protocol didn’t specify the unit for pooling, and the code counted cell by cell, “model × case”. Comparing “with a counterexample” and “only told it was wrong”, by cells it’s 15 cells, 13 to 2, conclusive; by cases it’s 8, 6 to 2, inconclusive. Later, before preparing any test repair prompt, the rule was set to count by case; on the test split by case, all three comparisons are still conclusive. (03)
  6. The LLM judge. Of the 165 answers that tshark can disprove with a single frame, the LLM judge called 58 “correct”; showing it the reference answer didn’t help either. (03)
  7. Erring more quietly. After fine-tuning, strong exact rose, but of the answers that originally failed to compile or had the wrong format and became executable, about half are silent-wrong: they run but select the wrong packets. (04)
  8. 80 identical answers. The client sorted the keys of every request body, including the schema used for constrained decoding. After the model wrote the two keys the prompt asked for first, only one form remained: abstain, saying the request cannot be expressed as a filter (not_expressible). All 80 answers across two dev-split runs were the same object; no step in the whole flow reported an error, and the two test runs had already been sent out. (04)
  9. Local stayed green. After Wireshark released a new version, it moved the 4.6.8 source tarball out of the original download directory. The hosted CI build failed; the local build stayed green because of cached layers. (05)
  10. Every number has a source, and it can still be wrong. The website’s tests only compare each value with its own source; swap two values, and the tests still pass. Before the merge it was also found that on a 320 px-wide phone, a USD 0.27 bill was cut through the middle of the number by the frame edge, reading as USD 0.2, while the text in the page was completely correct and no existing test could see it. (06)

A few lessons across posts

  • Test data needs testing too. Whether a set of probes can judge wrong answers depends on whether it can separate the reference answer from each of its neighbors, and mutants are ready-made neighbors (01). The website’s tests were later checked with mutants too (06).
  • Readings must be fixed before results are seen. The test split is frozen, and every reading is registered before the requests (03); checkpoints are fixed in advance, and all seeds are reported (04); the front-page trajectory is also chosen by a rule registered in advance (01, 06). A prediction written down at registration was rewritten after the test results came out; once found, the original text was restored, and the measured fact was added as a separate line with its date (03).
  • Checks must look at what the reader sees. The page’s text can be entirely correct while the pixels on a phone are wrong; the HTML with JavaScript disabled must also be scanned (06).
  • A single accuracy number hides errors moving around. Fix the loud errors, and the quiet ones may grow (02, 04).
  • Count what you checked. The rescoring loop must count checking zero directories as a failure (05); “every item goes into the denominator” is right, but count where the failures fall (03).
  • If something can be executed, execute it. Filters can run, so let tshark judge them; don’t ask another model to read them (03).

What remains unfinished

  • Preference training. SFT has been measured; next is DPO using the verifier’s labels, with a control of continued SFT matched for steps and token count, three seeds each (README).
  • The website. Detail pages for each case and each answer (the case page and the receipt page) are not built yet.

The details and sources for each post are in their main text.

Footnotes

  1. The repository is WeiGuang-2099/DFilterForge. The source code and documents linked in the text are all pinned to the commit 09bb537 of November 9, 2026. ↩︎