Research log Small Model Experimentation
GitHub

Qwen Verified Skill Memory RAG

Handing it a solved example did not help

The one idea you need

Before a small model reformats messy data — dates, phone numbers, addresses — into a target style, it is handed a verified, already-solved example of a similar reformatting job, like glancing at the answer key for a related puzzle before tackling your own.

The question

When a small model reformats messy data like dates and phone numbers, does handing it a verified, already-solved example of a similar job make more batches come out perfectly right?

What we found

No. Handing the model a matched, verified example made it slightly worse, not better: every value came out correct on 47.5% of jobs, versus 50% when it worked through each value alone with no example. The lookup itself worked — the fetched example was the same kind of task 77.5% of the time — yet across 40 jobs it improved none and hurt one. Relevant context was not the missing ingredient.

Why it matters

If you run a small model through repetitive data-cleanup, do not count on a library of similar solved examples to lift reliability. Here the gains came from clean one-value-at-a-time prompting, not from looking up past work — even accurate lookups added nothing.

Working alone vs given a matched example50% → 47.5%share of jobs where every value was exactly right
Fetched example was the right kind of task77.5%versus 20% for a random pick — the lookup worked
Jobs the matched example improved0 of 40and it made one job worse
Given a random, unrelated example instead42.5%jobs fully correct — worse still
On this page
  1. Results at a glance
  2. Overview
  3. Report
    1. Question
    2. Setup
    3. Main Result
    4. Interpretation
    5. Charts
    6. Deltas Versus Direct Row Baseline
    7. Retrieval Diagnostics
    8. Task Details
    9. Files
  4. Experiment log
  5. Figures
  6. Data files
  7. Reproduce
  8. Related

Results at a glance 8

How often each method got a whole batch perfectly right

How to read

Each bar is one working style; taller means more jobs where every value was exactly right. The leftmost bar is the model working through values one at a time alone; the others add a looked-up example or process the whole batch at once. Taller is better.

0%20%40%60%direct row-by-rowdirect row-by-row50%skill RAGskill RAG47.5%corrupted skill RAGcorrupted skill RAG45%direct batchdirect batch42.5%random skill RAGrandom skill RAG42.5%

Takeaway → The plain one-at-a-time bar is tallest; every version that adds a looked-up example or batches the job sits lower, so the extra example never paid off.

Data table
methodfull-task exact
direct row-by-row50%
skill RAG47.5%
corrupted skill RAG45%
direct batch42.5%
random skill RAG42.5%

Numbers from analysis/summary.csv

Technical framing

Strict full-task exact accuracy by method — Retrieving a verified analogous skill card did not help: skill RAG lands below plain row-by-row inference and near its controls.

How often each method got a single value right

How to read

Each bar is one working style; taller means more individual values exactly correct — a looser test than needing the whole batch perfect. The leftmost bar is the model working one value at a time alone. Taller is better.

0%20%40%60%80%direct row-by-rowdirect row-by-row70.8%skill RAGskill RAG65.2%corrupted skill RAGcorrupted skill RAG63.1%direct batchdirect batch65.2%random skill RAGrandom skill RAG67.1%

Takeaway → Working alone stays tallest even under this gentler scoring; every added-example or batched version lands lower, confirming the pattern is not an artifact of strict grading.

Data table
methodrow exact
direct row-by-row70.8%
skill RAG65.2%
corrupted skill RAG63.1%
direct batch65.2%
random skill RAG67.1%

Numbers from analysis/summary.csv

Technical framing

Row-level exact accuracy by method — The same ordering holds at the row level: every skill-card and batching variant loses rows versus direct row-by-row inference.

How many jobs each shortcut helped versus hurt

How to read

For each working style, two bars count the jobs it improved versus the jobs it worsened, against the model working one value at a time alone. Across 40 jobs, a taller help bar and a shorter hurt bar is better.

01234skill RAGskill RAG01corrupted skill RAGcorrupted skill RAG02direct batchdirect batch03random skill RAGrandom skill RAG14

Takeaway → Help bars sit at or near zero everywhere while hurt bars climb; the matched example improved none of the 40 jobs and worsened one.

Data table
methodtasks helpedtasks hurt
skill RAG01
corrupted skill RAG02
direct batch03
random skill RAG14

Numbers from analysis/method_deltas.csv

Technical framing

Tasks helped vs hurt relative to direct row-by-row (40 tasks) — Skill RAG helped 0 of 40 tasks and hurt 1 versus the direct baseline; no variant produced net wins.

How often the lookup found a genuinely similar example

How to read

Two bars: the real lookup versus a random pick. Each shows how often the fetched example came from the same kind of task. Taller means the fetched example was more relevant to the job at hand.

0%20%40%60%80%skill RAG retrieverskill RAG retriever77.5%random skill controlrandom skill control20%

Takeaway → The real lookup fetched a genuinely similar example most of the time, far above the random pick, so the flat result is not a broken lookup.

Data table
retrieval conditionsame-family at rank 1
skill RAG retriever77.5%
random skill control20%

Numbers from analysis/retrieval_summary.csv

Technical framing

Retrieval quality: top-1 same-family hit rate — The retriever worked (77.5% same-family vs 20% random), so the null result is not a retrieval failure — the skill cards just didn't help.

Tiny six-job trials swung wildly from run to run

How to read

Each group is one working style; the three bars within it are three separate tiny trials of only six jobs each. Height is the share of values correct. Watch how much the matched-example bars jump between trials.

0%25%50%75%100%direct_rowdirect_row77.8%77.8%77.8%direct_batchdirect_batch83.3%83.3%83.3%skill_ragskill_rag61.1%83.3%88.9%random_skill_ragrandom_skill_rag77.8%83.3%83.3%corrupt_skill_ragcorrupt_skill_rag55.6%77.8%83.3%

Takeaway → The matched-example bars swing from worst to best across the three tiny trials, showing six jobs are too few to trust and motivating the full 40-job test.

Data table
MethodPilot top-3 skillsPilot top-3 repeatPilot top-1 skill
direct_row77.8%77.8%77.8%
direct_batch83.3%83.3%83.3%
skill_rag61.1%83.3%88.9%
random_skill_rag77.8%83.3%83.3%
corrupt_skill_rag55.6%77.8%83.3%

Numbers from runs/pilot_qwen_6/summary.csv, runs/pilot_qwen_6_v2/summary.csv, runs/pilot_qwen_6_top1/summary.csv

Technical framing

Pilot runs were unstable: row accuracy across three 6-task pilots — skill_rag swung from worst (61%) to best (89%) across 6-task pilots, motivating the 40-task main run where its edge vanished.

On the hardest task type, examples did not rescue accuracy

How to read

Ten of the hardest number-formatting jobs run along the bottom. For each, one bar is the model working alone and the other is the model given a matched example. Height is the share of values correct; taller is better.

0%25%50%75%100%00000800000833.3%16.7%00001500001533.3%0%00001600001666.7%33.3%000022000022100%33.3%000028000028100%100%00002900002933.3%66.7%000043000043100%100%00004900004950%25%00007500007566.7%66.7%00007700007733.3%66.7%

Takeaway → On these number jobs the matched-example bars are mostly equal or shorter — shorter on five of the ten and taller on just two — so the failures are not about finding a relevant example.

Data table
Number-family task IDDirect row-by-rowRetrieved skill card
00000833.3%16.7%
00001533.3%0%
00001666.7%33.3%
000022100%33.3%
000028100%100%
00002933.3%66.7%
000043100%100%
00004950%25%
00007566.7%66.7%
00007733.3%66.7%

Numbers from analysis/task_details.csv

Technical framing

Hardest family (Number): skill cards do not rescue per-task accuracy — On the weakest family, skill retrieval loses on 4 of 10 tasks and wins on 2; the numeric-rounding failures are not a retrieval problem.

Only processing the whole batch at once broke the format

How to read

Each bar is one working style; height is the share of jobs whose output could be read back cleanly. Taller is better. The bar worth watching is the one that processes the whole batch in a single pass.

0%25%50%75%100%direct_rowdirect_row100%skill_ragskill_rag100%corrupt_skill_ragcorrupt_skill_rag100%random_skill_ragrandom_skill_rag100%direct_batchdirect_batch95%

Takeaway → Every style produced clean, readable output except processing the whole batch at once, which garbled the format on a small slice of jobs.

Data table
MethodParse success rate
direct_row100%
skill_rag100%
corrupt_skill_rag100%
random_skill_rag100%
direct_batch95%

Numbers from analysis/summary.csv

Technical framing

Output-format reliability: only batched decoding drops parses — All prompt-augmented methods parse cleanly; direct batched JSON output fails to parse on 5% of tasks, part of its full-task gap.

The single best-matched example is the most relevant

How to read

Two lines run across the first, second, and third best-matched examples. One tracks how similar the match is; the other tracks how often it is the same kind of task. Higher means more relevant.

0.40.60.811.211.522.53Same-family hit rateSame-family hit r…Mean similarity scoreMean similarity s…

Takeaway → Both lines slope downward from the top match, so lower-ranked examples are less relevant — the reason only the single best example was ever handed to the model.

Data table
Retrieval rankMean similarity scoreSame-family hit rate
10.7831
20.7020.833
30.6310.833

Numbers from runs/pilot_qwen_6/retrieval_summary.csv

Technical framing

Retrieval quality decays with rank in the top-3 pilot — Ranks 2-3 retrieve weaker, more off-family skills, which is why the main run kept only the top-1 skill card.

In the author’s words from the Report · “Interpretation”

The retrieved-skill method changes strict full-task exact by -2.5 points relative to row-by-row direct inference and by 5.0 points relative to direct batched inference. The random-skill control scores 42.5% full-task exact and the corrupted-skill control scores 45.0%. A retrieval-memory gain is only meaningful if skill_rag beats both controls and the direct baselines. This run is negative for the tested retrieval-memory mechanism. Top-1 retrieval found a same-family verified skill 77.5% of the time, so the retriever was not random, but skill_rag helped 0 tasks and hurt 1 task relative to row-by-row direct inference. … Read the full result →

Overview

Standalone experiment testing whether train-only verified transformation examples help Qwen solve public text-transformation tasks more consistently.

Main Run

  • Run directory: runs/main_qwen_skill_memory_40_top1
  • Markdown report: reports/qwen_verified_skill_memory_rag_report.md
  • HTML report: reports/qwen_verified_skill_memory_rag_report.html
  • Persistent log: experiment_log.md

Key CSVs

  • analysis/summary.csv: method-level metrics.
  • analysis/method_deltas.csv: wins/losses versus direct row-by-row inference.
  • analysis/task_details.csv: task-level outputs and exactness.
  • analysis/row_details.csv: row-level outputs and exactness.
  • analysis/retrieval_details.csv: retrieved skill cards per task.
  • analysis/retrieval_summary.csv: retrieval quality summary.

Key Charts

Data Placement

Large benchmark data is kept outside the experiment directory under:

/workspace/large_artifacts/qwen_verified_skill_memory_rag

Report

Rendered from reports/qwen_verified_skill_memory_rag_report.md

Question

Can a frozen language model solve text-transformation tasks more consistently when it retrieves analogous verified transformation skills from a train-only memory?

The experiment evaluates strict full-task exact: a task is correct only if every held-out row is exactly correct.

Setup

  • Dataset root: /workspace/large_artifacts/qwen_verified_skill_memory_rag/prose-benchmarks
  • Run: main_qwen_skill_memory_40_top1
  • Model: Qwen/Qwen3-4B
  • Evaluation tasks: 40
  • Memory tasks: 269
  • Retrieved skills per task: 1
  • Skill-card examples: 4
  • Train examples per target task: 4
  • Held-out cap per task: 6
  • Generation rows: 364

Main Result

methodtasksrow_exactfull_task_exactparse_okavg_outputs
direct_row4070.8%50.0%100.0%5.100
skill_rag4065.2%47.5%100.0%5.100
corrupt_skill_rag4063.1%45.0%100.0%5.100
direct_batch4065.2%42.5%95.0%5.100
random_skill_rag4067.1%42.5%100.0%5.100

Interpretation

The retrieved-skill method changes strict full-task exact by -2.5 points relative to row-by-row direct inference and by 5.0 points relative to direct batched inference.

The random-skill control scores 42.5% full-task exact and the corrupted-skill control scores 45.0%. A retrieval-memory gain is only meaningful if skill_rag beats both controls and the direct baselines.

This run is negative for the tested retrieval-memory mechanism. Top-1 retrieval found a same-family verified skill 77.5% of the time, so the retriever was not random, but skill_rag helped 0 tasks and hurt 1 task relative to row-by-row direct inference. The failure is therefore not retrieval failure alone; adding a verified analogous skill card did not reliably improve the model's target transformation.

Charts

Full-task exact by method

Row versus full-task accuracy

Family heatmap

Retrieval family agreement

Top retrieval scores

Wins and losses versus direct

Deltas Versus Direct Row Baseline

methodtasksfull_task_deltarow_exact_deltatasks_helpedtasks_hurttasks_tied
skill_rag40-2.5%-5.6%0139
corrupt_skill_rag40-5.0%-7.7%0238
direct_batch40-7.5%-5.6%0337
random_skill_rag40-7.5%-3.7%1435

Retrieval Diagnostics

methodrankmean_scoresame_family
corrupt_skill_rag10.71477.5%
random_skill_rag10.00020.0%
skill_rag10.71477.5%

Task Details

task_idfamilymethodrow_exactfull_task_exactparse_okparse_statusoutput_count
Address.000002Addresscorrupt_skill_rag33.3%FalseTrueok3
Address.000013Addresscorrupt_skill_rag66.7%FalseTrueok6
BillingCode.000007BillingCodecorrupt_skill_rag0.0%FalseTrueok3
City.000010Citycorrupt_skill_rag100.0%TrueTrueok3
City.000011Citycorrupt_skill_rag100.0%TrueTrueok4
Column.000001Columncorrupt_skill_rag100.0%TrueTrueok6
DateTime.000004DateTimecorrupt_skill_rag100.0%TrueTrueok6
DateTime.000007DateTimecorrupt_skill_rag100.0%TrueTrueok6
DateTime.000017DateTimecorrupt_skill_rag66.7%FalseTrueok6
DateTime.000025DateTimecorrupt_skill_rag100.0%TrueTrueok6
DateTime.000027DateTimecorrupt_skill_rag66.7%FalseTrueok6
DateTime.000034DateTimecorrupt_skill_rag100.0%TrueTrueok6
DateTime.000051DateTimecorrupt_skill_rag0.0%FalseTrueok3
DateTime.000076DateTimecorrupt_skill_rag83.3%FalseTrueok6
DateTime.000081DateTimecorrupt_skill_rag66.7%FalseTrueok6
DateTime.000094DateTimecorrupt_skill_rag100.0%TrueTrueok4
DateTime.000104DateTimecorrupt_skill_rag100.0%TrueTrueok6
DateTime.000108DateTimecorrupt_skill_rag100.0%TrueTrueok6
DateTime.000111DateTimecorrupt_skill_rag100.0%TrueTrueok6
DateTime.000114DateTimecorrupt_skill_rag0.0%FalseTrueok6
DateTime.000115DateTimecorrupt_skill_rag0.0%FalseTrueok6
DateTime.000116DateTimecorrupt_skill_rag50.0%FalseTrueok6
FilePath.000001FilePathcorrupt_skill_rag100.0%TrueTrueok6
Gender.000001Gendercorrupt_skill_rag0.0%FalseTrueok3
Language.000002Languagecorrupt_skill_rag100.0%TrueTrueok6
Name.000028Namecorrupt_skill_rag100.0%TrueTrueok6
Number.000008Numbercorrupt_skill_rag16.7%FalseTrueok6
Number.000015Numbercorrupt_skill_rag0.0%FalseTrueok6
Number.000016Numbercorrupt_skill_rag33.3%FalseTrueok6
Number.000022Numbercorrupt_skill_rag33.3%FalseTrueok6
Number.000028Numbercorrupt_skill_rag100.0%TrueTrueok3
Number.000029Numbercorrupt_skill_rag66.7%FalseTrueok3
Number.000043Numbercorrupt_skill_rag100.0%TrueTrueok6
Number.000049Numbercorrupt_skill_rag25.0%FalseTrueok4
Number.000075Numbercorrupt_skill_rag50.0%FalseTrueok6
Number.000077Numbercorrupt_skill_rag0.0%FalseTrueok3
Phone.000008Phonecorrupt_skill_rag100.0%TrueTrueok6
Phone.000011Phonecorrupt_skill_rag66.7%FalseTrueok3
ShippingCode.000008ShippingCodecorrupt_skill_rag0.0%FalseTrueok3
UserAgent.000003UserAgentcorrupt_skill_rag100.0%TrueTrueok6
Address.000002Addressdirect_batch33.3%FalseTrueok3
Address.000013Addressdirect_batch66.7%FalseTrueok6
BillingCode.000007BillingCodedirect_batch0.0%FalseTrueok3
City.000010Citydirect_batch100.0%TrueTrueok3
City.000011Citydirect_batch75.0%FalseTrueok4
Column.000001Columndirect_batch100.0%TrueTrueok6
DateTime.000004DateTimedirect_batch100.0%TrueTrueok6
DateTime.000007DateTimedirect_batch100.0%TrueTrueok6
DateTime.000017DateTimedirect_batch83.3%FalseTrueok6
DateTime.000025DateTimedirect_batch100.0%TrueTrueok6
DateTime.000027DateTimedirect_batch66.7%FalseTrueok6
DateTime.000034DateTimedirect_batch100.0%TrueTrueok6
DateTime.000051DateTimedirect_batch0.0%FalseTrueok3
DateTime.000076DateTimedirect_batch66.7%FalseTrueok6
DateTime.000081DateTimedirect_batch0.0%FalseTrueok6
DateTime.000094DateTimedirect_batch100.0%TrueTrueok4
DateTime.000104DateTimedirect_batch100.0%TrueTrueok6
DateTime.000108DateTimedirect_batch100.0%TrueTrueok6
DateTime.000111DateTimedirect_batch83.3%FalseTrueok6
DateTime.000114DateTimedirect_batch33.3%FalseTrueok6
DateTime.000115DateTimedirect_batch0.0%FalseTrueok6
DateTime.000116DateTimedirect_batch50.0%FalseTrueok6
FilePath.000001FilePathdirect_batch100.0%TrueTrueok6
Gender.000001Genderdirect_batch66.7%FalseTrueok3
Language.000002Languagedirect_batch100.0%TrueTrueok6
Name.000028Namedirect_batch100.0%TrueTrueok6
Number.000008Numberdirect_batch16.7%FalseTrueok6
Number.000015Numberdirect_batch66.7%FalseTrueok6
Number.000016Numberdirect_batch0.0%FalseFalseparse_fail6
Number.000022Numberdirect_batch33.3%FalseTrueok6
Number.000028Numberdirect_batch100.0%TrueTrueok3
Number.000029Numberdirect_batch0.0%FalseTrueok3
Number.000043Numberdirect_batch100.0%TrueTrueok6
Number.000049Numberdirect_batch0.0%FalseFalseparse_fail4
Number.000075Numberdirect_batch66.7%FalseTrueok6
Number.000077Numberdirect_batch66.7%FalseTrueok3
Phone.000008Phonedirect_batch100.0%TrueTrueok6
Phone.000011Phonedirect_batch100.0%TrueTrueok3
ShippingCode.000008ShippingCodedirect_batch33.3%FalseTrueok3
UserAgent.000003UserAgentdirect_batch100.0%TrueTrueok6
Address.000002Addressdirect_row33.3%FalseTruerow_clean3
Address.000013Addressdirect_row66.7%FalseTruerow_clean6
BillingCode.000007BillingCodedirect_row33.3%FalseTruerow_clean3
City.000010Citydirect_row100.0%TrueTruerow_clean3
City.000011Citydirect_row100.0%TrueTruerow_clean4
Column.000001Columndirect_row100.0%TrueTruerow_clean6
DateTime.000004DateTimedirect_row100.0%TrueTruerow_clean6
DateTime.000007DateTimedirect_row100.0%TrueTruerow_clean6
DateTime.000017DateTimedirect_row66.7%FalseTruerow_clean6
DateTime.000025DateTimedirect_row100.0%TrueTruerow_clean6
DateTime.000027DateTimedirect_row33.3%FalseTruerow_clean6
DateTime.000034DateTimedirect_row100.0%TrueTruerow_clean6
DateTime.000051DateTimedirect_row33.3%FalseTruerow_clean3
DateTime.000076DateTimedirect_row50.0%FalseTruerow_clean6
DateTime.000081DateTimedirect_row50.0%FalseTruerow_clean6
DateTime.000094DateTimedirect_row100.0%TrueTruerow_clean4
DateTime.000104DateTimedirect_row100.0%TrueTruerow_clean6
DateTime.000108DateTimedirect_row100.0%TrueTruerow_clean6
DateTime.000111DateTimedirect_row100.0%TrueTruerow_clean6
DateTime.000114DateTimedirect_row0.0%FalseTruerow_clean6
DateTime.000115DateTimedirect_row0.0%FalseTruerow_clean6
DateTime.000116DateTimedirect_row50.0%FalseTruerow_clean6
FilePath.000001FilePathdirect_row100.0%TrueTruerow_clean6
Gender.000001Genderdirect_row66.7%FalseTruerow_clean3
Language.000002Languagedirect_row100.0%TrueTruerow_clean6
Name.000028Namedirect_row100.0%TrueTruerow_clean6
Number.000008Numberdirect_row33.3%FalseTruerow_clean6
Number.000015Numberdirect_row33.3%FalseTruerow_clean6
Number.000016Numberdirect_row66.7%FalseTruerow_clean6
Number.000022Numberdirect_row100.0%TrueTruerow_clean6
Number.000028Numberdirect_row100.0%TrueTruerow_clean3
Number.000029Numberdirect_row33.3%FalseTruerow_clean3
Number.000043Numberdirect_row100.0%TrueTruerow_clean6
Number.000049Numberdirect_row50.0%FalseTruerow_clean4
Number.000075Numberdirect_row66.7%FalseTruerow_clean6
Number.000077Numberdirect_row33.3%FalseTruerow_clean3
Phone.000008Phonedirect_row100.0%TrueTruerow_clean6
Phone.000011Phonedirect_row100.0%TrueTruerow_clean3
ShippingCode.000008ShippingCodedirect_row33.3%FalseTruerow_clean3
UserAgent.000003UserAgentdirect_row100.0%TrueTruerow_clean6
Address.000002Addressrandom_skill_rag33.3%FalseTrueok3
Address.000013Addressrandom_skill_rag66.7%FalseTrueok6
BillingCode.000007BillingCoderandom_skill_rag33.3%FalseTrueok3
City.000010Cityrandom_skill_rag100.0%TrueTrueok3
City.000011Cityrandom_skill_rag50.0%FalseTrueok4
Column.000001Columnrandom_skill_rag100.0%TrueTrueok6
DateTime.000004DateTimerandom_skill_rag100.0%TrueTrueok6
DateTime.000007DateTimerandom_skill_rag100.0%TrueTrueok6
DateTime.000017DateTimerandom_skill_rag83.3%FalseTrueok6
DateTime.000025DateTimerandom_skill_rag83.3%FalseTrueok6
DateTime.000027DateTimerandom_skill_rag66.7%FalseTrueok6
DateTime.000034DateTimerandom_skill_rag100.0%TrueTrueok6
DateTime.000051DateTimerandom_skill_rag33.3%FalseTrueok3
DateTime.000076DateTimerandom_skill_rag66.7%FalseTrueok6
DateTime.000081DateTimerandom_skill_rag66.7%FalseTrueok6
DateTime.000094DateTimerandom_skill_rag100.0%TrueTrueok4
DateTime.000104DateTimerandom_skill_rag100.0%TrueTrueok6
DateTime.000108DateTimerandom_skill_rag100.0%TrueTrueok6
DateTime.000111DateTimerandom_skill_rag83.3%FalseTrueok6
DateTime.000114DateTimerandom_skill_rag50.0%FalseTrueok6
DateTime.000115DateTimerandom_skill_rag0.0%FalseTrueok6
DateTime.000116DateTimerandom_skill_rag50.0%FalseTrueok6
FilePath.000001FilePathrandom_skill_rag100.0%TrueTrueok6
Gender.000001Genderrandom_skill_rag66.7%FalseTrueok3
Language.000002Languagerandom_skill_rag100.0%TrueTrueok6
Name.000028Namerandom_skill_rag100.0%TrueTrueok6
Number.000008Numberrandom_skill_rag16.7%FalseTrueok6
Number.000015Numberrandom_skill_rag0.0%FalseTrueok6
Number.000016Numberrandom_skill_rag16.7%FalseTrueok6
Number.000022Numberrandom_skill_rag33.3%FalseTrueok6
Number.000028Numberrandom_skill_rag100.0%TrueTrueok3
Number.000029Numberrandom_skill_rag100.0%TrueTrueok3
Number.000043Numberrandom_skill_rag100.0%TrueTrueok6
Number.000049Numberrandom_skill_rag0.0%FalseTrueok4
Number.000075Numberrandom_skill_rag50.0%FalseTrueok6
Number.000077Numberrandom_skill_rag0.0%FalseTrueok3
Phone.000008Phonerandom_skill_rag100.0%TrueTrueok6
Phone.000011Phonerandom_skill_rag100.0%TrueTrueok3
ShippingCode.000008ShippingCoderandom_skill_rag33.3%FalseTrueok3
UserAgent.000003UserAgentrandom_skill_rag100.0%TrueTrueok6
Address.000002Addressskill_rag33.3%FalseTrueok3
Address.000013Addressskill_rag66.7%FalseTrueok6
BillingCode.000007BillingCodeskill_rag0.0%FalseTrueok3
City.000010Cityskill_rag100.0%TrueTrueok3
City.000011Cityskill_rag100.0%TrueTrueok4
Column.000001Columnskill_rag100.0%TrueTrueok6
DateTime.000004DateTimeskill_rag100.0%TrueTrueok6
DateTime.000007DateTimeskill_rag100.0%TrueTrueok6
DateTime.000017DateTimeskill_rag66.7%FalseTrueok6
DateTime.000025DateTimeskill_rag100.0%TrueTrueok6
DateTime.000027DateTimeskill_rag50.0%FalseTrueok6
DateTime.000034DateTimeskill_rag100.0%TrueTrueok6
DateTime.000051DateTimeskill_rag0.0%FalseTrueok3
DateTime.000076DateTimeskill_rag66.7%FalseTrueok6
DateTime.000081DateTimeskill_rag66.7%FalseTrueok6
DateTime.000094DateTimeskill_rag100.0%TrueTrueok4
DateTime.000104DateTimeskill_rag100.0%TrueTrueok6
DateTime.000108DateTimeskill_rag100.0%TrueTrueok6
DateTime.000111DateTimeskill_rag100.0%TrueTrueok6
DateTime.000114DateTimeskill_rag0.0%FalseTrueok6
DateTime.000115DateTimeskill_rag0.0%FalseTrueok6
DateTime.000116DateTimeskill_rag50.0%FalseTrueok6
FilePath.000001FilePathskill_rag100.0%TrueTrueok6
Gender.000001Genderskill_rag0.0%FalseTrueok3
Language.000002Languageskill_rag100.0%TrueTrueok6
Name.000028Nameskill_rag100.0%TrueTrueok6
Number.000008Numberskill_rag16.7%FalseTrueok6
Number.000015Numberskill_rag0.0%FalseTrueok6
Number.000016Numberskill_rag33.3%FalseTrueok6
Number.000022Numberskill_rag33.3%FalseTrueok6
Number.000028Numberskill_rag100.0%TrueTrueok3
Number.000029Numberskill_rag66.7%FalseTrueok3
Number.000043Numberskill_rag100.0%TrueTrueok6
Number.000049Numberskill_rag25.0%FalseTrueok4
Number.000075Numberskill_rag66.7%FalseTrueok6
Number.000077Numberskill_rag66.7%FalseTrueok3
Phone.000008Phoneskill_rag100.0%TrueTrueok6
Phone.000011Phoneskill_rag100.0%TrueTrueok3
ShippingCode.000008ShippingCodeskill_rag0.0%FalseTrueok3
UserAgent.000003UserAgentskill_rag100.0%TrueTrueok6

Files

  • runs/main_qwen_skill_memory_40_top1/generations.csv
  • runs/main_qwen_skill_memory_40_top1/task_details.csv
  • runs/main_qwen_skill_memory_40_top1/row_details.csv
  • runs/main_qwen_skill_memory_40_top1/retrieval_details.csv
  • analysis/summary.csv
  • analysis/task_details.csv
  • analysis/row_details.csv
  • analysis/retrieval_details.csv
  • analysis/retrieval_summary.csv
  • analysis/method_deltas.csv

Experiment log 11

Show the running log (11 entries, 2026-06-27)

Objective

Test whether a frozen model becomes more task-consistent when it can retrieve analogous verified transformation skills from a train-only memory.

The primary metric is strict full-task exact on held-out rows: a task is counted correct only when every held-out output is exact.

The experiment is standalone. It stores run-local caches, retrieval records, summaries, charts, Markdown report, and HTML report under this directory. Large benchmark data is referenced through /workspace/large_artifacts/qwen_verified_skill_memory_rag.

Initial Plan

  1. Create a fresh experiment directory and separate large-artifact root.
  2. Load public text-transformation tasks.
  3. Split tasks into an evaluation set and a train-only skill-memory set.
  4. Build verified skill cards from memory tasks.
  5. Retrieve analogous skill cards for each evaluation task using only the task's training examples.
  6. Compare:

    • direct row-by-row Qwen
    • direct batched Qwen
    • retrieved-skill batched Qwen
    • random-skill control
    • corrupted-skill control
  7. Generate CSVs, charts, Markdown report, and HTML report.

Run Notes

2026-06-27 08:45 UTC - Scaffold

2026-06-27 08:46 UTC - No-Qwen Smoke

Command:

python -m py_compile /workspace/experiments/qwen_verified_skill_memory_rag/src/qwen_verified_skill_memory_rag.py
python /workspace/experiments/qwen_verified_skill_memory_rag/src/qwen_verified_skill_memory_rag.py \
  --run_name smoke_no_qwen \
  --task_limit 4 \
  --heldout_cap 3 \
  --top_k 2 \
  --no_qwen

Result:

  • Smoke completed on 4 tasks.
  • CSVs, charts, Markdown report, and HTML report were generated.
  • Retrieval diagnostics were structurally valid; top retrievals were same-family on the tiny smoke sample.
  • Metrics are not interpreted because --no_qwen leaves uncached generations blank.

2026-06-27 08:47 UTC - Real-Qwen Pilot, Top-3 Retrieval

Command:

python /workspace/experiments/qwen_verified_skill_memory_rag/src/qwen_verified_skill_memory_rag.py \
  --run_name pilot_qwen_6 \
  --task_limit 6 \
  --heldout_cap 3 \
  --top_k 3

Result:

  • 6 evaluation tasks.
  • direct_batch: 83.3% row exact, 66.7% full-task exact.
  • direct_row: 77.8% row exact, 66.7% full-task exact.
  • skill_rag: 61.1% row exact, 50.0% full-task exact.
  • random_skill_rag: 77.8% row exact, 66.7% full-task exact.
  • corrupt_skill_rag: 55.6% row exact, 33.3% full-task exact.

Diagnosis:

  • Top-3 retrieval over-steered the model on a date-format task: retrieved date examples pulled the model into a different format even though target examples were clear.
  • Prompt needed to make target examples more authoritative.

2026-06-27 08:50 UTC - Prompt Iteration

Changed the memory prompt so the target examples appear first and are explicitly described as authoritative. Reference transformations are labeled optional and ignorable when they conflict with the target.

2026-06-27 08:51 UTC - Real-Qwen Pilot, Top-3 Retrieval With Stronger Target Authority

Command:

python /workspace/experiments/qwen_verified_skill_memory_rag/src/qwen_verified_skill_memory_rag.py \
  --run_name pilot_qwen_6_v2 \
  --task_limit 6 \
  --heldout_cap 3 \
  --top_k 3

Result:

  • direct_batch: 83.3% row exact, 66.7% full-task exact.
  • direct_row: 77.8% row exact, 66.7% full-task exact.
  • skill_rag: 83.3% row exact, 50.0% full-task exact.
  • random_skill_rag: 83.3% row exact, 66.7% full-task exact.
  • corrupt_skill_rag: 77.8% row exact, 50.0% full-task exact.

Diagnosis:

  • The stronger prompt reduced row-level damage but still failed to beat direct baselines.
  • Top-3 retrieval still looked too intrusive.

2026-06-27 08:52 UTC - Real-Qwen Pilot, Top-1 Retrieval

Command:

python /workspace/experiments/qwen_verified_skill_memory_rag/src/qwen_verified_skill_memory_rag.py \
  --run_name pilot_qwen_6_top1 \
  --task_limit 6 \
  --heldout_cap 3 \
  --top_k 1

Result:

  • direct_batch: 83.3% row exact, 66.7% full-task exact.
  • direct_row: 77.8% row exact, 66.7% full-task exact.
  • skill_rag: 88.9% row exact, 66.7% full-task exact.
  • random_skill_rag: 83.3% row exact, 66.7% full-task exact.
  • corrupt_skill_rag: 83.3% row exact, 66.7% full-task exact.

Diagnosis:

  • Top-1 retrieval was cleaner than top-3.
  • It improved row exact on the pilot but did not improve strict full-task exact, and controls still tied it on full-task exact.
  • Chose top-1 for the main run because it was least damaging and still tested the intended mechanism.

2026-06-27 08:53 UTC - Main Run

Command:

python /workspace/experiments/qwen_verified_skill_memory_rag/src/qwen_verified_skill_memory_rag.py \
  --run_name main_qwen_skill_memory_40_top1 \
  --task_limit 40 \
  --heldout_cap 6 \
  --top_k 1

Result:

  • 40 evaluation tasks.
  • 269 train-only memory tasks.
  • 364 unique cached generation records.
  • No blank generations in the main cache.
  • Top-1 retrieved skill was same-family 77.5% of the time, versus 20.0% for random retrieval.

Main metrics:

  • direct_row: 70.8% row exact, 50.0% full-task exact.
  • skill_rag: 65.2% row exact, 47.5% full-task exact.
  • corrupt_skill_rag: 63.1% row exact, 45.0% full-task exact.
  • direct_batch: 65.2% row exact, 42.5% full-task exact.
  • random_skill_rag: 67.1% row exact, 42.5% full-task exact.

Deltas versus direct_row:

  • skill_rag: -2.5 full-task points, -5.6 row-exact points; helped 0 tasks, hurt 1 task, tied 39 tasks.
  • corrupt_skill_rag: -5.0 full-task points.
  • direct_batch: -7.5 full-task points.
  • random_skill_rag: -7.5 full-task points.

Final diagnosis:

  • Negative for the tested verified skill-memory mechanism.
  • The retriever itself was not random: it found same-family memory tasks at a high rate.
  • The failure is in converting a retrieved analogous skill card into better target outputs. The card changes the prompt distribution but does not reliably improve task consistency.
  • Direct row-by-row inference remains the best method in this experiment.

2026-06-27 08:59 UTC - Report Hardening

  • Added analysis/method_deltas.csv.
  • Added analysis/figures/wins_losses_vs_direct.png.
  • Updated Markdown and HTML reports to state the negative conclusion explicitly.
  • Regenerated reports from the cached main run with --no_qwen; no additional model calls were required.

Final artifacts:

  • README.md
  • experiment_log.md
  • src/qwen_verified_skill_memory_rag.py
  • runs/main_qwen_skill_memory_40_top1/generations.csv
  • runs/main_qwen_skill_memory_40_top1/task_details.csv
  • runs/main_qwen_skill_memory_40_top1/row_details.csv
  • runs/main_qwen_skill_memory_40_top1/retrieval_details.csv
  • runs/main_qwen_skill_memory_40_top1/summary.csv
  • runs/main_qwen_skill_memory_40_top1/retrieval_summary.csv
  • runs/main_qwen_skill_memory_40_top1/method_deltas.csv
  • analysis/*.csv
  • analysis/figures/*.png
  • reports/qwen_verified_skill_memory_rag_report.md
  • reports/qwen_verified_skill_memory_rag_report.html

Figures 6

family heatmap
family heatmap · analysis/figures/
method full task exact
method full task exact · analysis/figures/
retrieval family agreement
retrieval family agreement · analysis/figures/
row vs full task
row vs full task · analysis/figures/
top retrieval scores
top retrieval scores · analysis/figures/
wins losses vs direct
wins losses vs direct · analysis/figures/

Data files 18

Result tables and metrics copied from the experiment folder — preview inline or open the raw file.

Reproduce

This entry is source code or analysis only — there is no separate run to reproduce.

Browse the experiment folder on GitHub ↗