trace-to-training-data
Fungsinya
Tool ini mengubah hasil tes AI menjadi data yang bisa dipakai untuk melatih ulang AI. Tool ini mengambil contoh bagaimana AI berhasil atau gagal, lalu menatanya agar AI bisa belajar darinya.
Kapan dipakai
- โSaat Anda sudah punya hasil tes AI yang sudah dinilai dan ingin memakainya untuk melatih AI.
- โSaat AI membuat kesalahan dan Anda ingin mengubah kesalahan tersebut menjadi contoh pembelajaran.
- โSaat Anda ingin membuat pasangan 'baik vs. buruk' untuk mengajari AI memilih jawaban terbaik.
Link skill
https://github.com/wshobson/agents/blob/main/plugins/llm-finetuning/skills/trace-to-training-data/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โUbah hasil tes ini menjadi data pelatihan untuk AI.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool ini mengambil hasil tes yang sudah ditandai sebagai 'benar' atau 'salah', lalu memformatnya. Informasi tersebut kemudian diatur agar AI bisa menggunakannya sebagai contoh untuk belajar.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Trace To Training Data
This skill assumes eval-harness-first
already graded the traces being
converted here โ goldens, graders,
and runs/<run-id>/results.json
all exist before conversion
starts. This is the flywheel edge
that skill names in its own flow:
"the same labeled traces become
the training set." Conversion
happens here; grading already
happened upstream.
Input: graded traces โ
eval/goldens.jsonl plus
runs/<run-id>/results.json, each
row carrying a task_id, a
verdict from the grader, and a
reward when the task supports a
scalar score (judge score,
execution partial-credit, or an
RLVR verifier):
{"task_id": "t-042", "trace_id": "t-042-a3",
"messages": [{"role": "user", "content": "..."}],
"verdict": "pass", "reward": 0.91,
"grader": "exact_match"}
Output format: rows shaped
exactly like dataset-curation's
Format Selection table โ SFT
messages rows or DPO
prompt/chosen/rejected
pairs โ so this skill's output is
that skill's input with no
reshaping step in between.
The Principle
The eval harness already did the
labeling work: every trace in
results.json carries a verdict,
and often a reward, before this
skill ever touches it. Converting
a graded trace into a training
row is mechanical โ pick a shape
from dataset-curation's table,
map fields, write JSONL.
Curation is the work that
remains โ which traces clear a
quality bar, which pairs are
informative, and which rows must
never enter the training set at
all.
Treat any conversion step that
requires re-judging a trace as a
sign the harness is missing a
grader, not a gap this skill
should paper over. A trace with
no verdict or reward isn't
convertible yet โ route it back
to eval-harness-first first,
don't hand-label it here to
unblock conversion.
SFT From Traces
- Keep the top-reward fraction of successful trajectories, not every passing one. Rank passing traces by reward and take a fraction (the Agent-lightning pattern) rather than every trace that merely cleared the pass bar โ a trace that barely passed is a weaker SFT signal than one that scored well above threshold.
- Expert-corrected failures become gold SFT examples directly (the Langfuse pattern) โ when a human edits a failing trace's output into a correct one, that correction needs no reward threshold; a human already validated it. Route corrections straight into the SFT set.
- Step-level masking beats whole-trajectory discard for multi-step traces. When only some steps in a multi-step trajectory are bad, mask the loss on the bad steps and keep the good ones, rather than discarding the whole trajectory. SRFT reports 32.2% vs. 30.9% on SWE-bench for step-level critic masking over trajectory discard โ a real, if modest, gap from the finer-grained cut.
Preference Pairs From Traces
- Build pairs from passing-vs-failing trajectories on the SAME task, never from unrelated best- and worst-scoring traces pulled across different tasks โ cross-task pairs teach the model to prefer one task over another, not one response over another.
- Select the rejected member at
ฮผโ2ฯ of the reward distribution
for that task, never the
absolute minimum.
preference-optimization's Pair Construction section owns the full selection formula; this skill supplies the graded trajectories it consumes. - Judge-scored delta selection cuts pair volume without cutting signal. Score each candidate pair by chosen-minus-rejected judge delta and keep only the highest-delta subset โ the top 5k of a 16.5k candidate pool matched the full pool's downstream result. Build the full candidate set first, then filter by delta; don't cap generation at 5k up front.
Hygiene
- Scan for secrets and PII before any row ships, and redact what's found. Traces sourced from production logs can carry credentials, API keys, tokens, or customer data โ run a secret/PII scan over every SFT and DPO row and redact matches; conversion fails closed (the row is dropped, not shipped with the raw content) if sensitive fields remain after redaction. Never commit secrets.
- Eval goldens must never leak
into training data. Hold
every
eval/goldens.jsonlID out of every converted SFT and DPO set โ a trace that also appears as a golden trains on the exact item the checkpoint gets graded against later,
โฆ
Pertanyaan umum
Apa itu 'traces'?
'Traces' adalah catatan rinci tentang bagaimana AI mencoba menyelesaikan suatu masalah, yang menunjukkan langkah-langkah yang diambilnya.
Mengapa penting hanya memakai hasil terbaik?
Dengan hanya memakai hasil terbaik (bukan sekadar hasil yang lolos), AI bisa belajar dari contoh berkualitas tinggi sehingga proses pembelajarannya lebih efisien.
Apa yang terjadi jika data tes mengandung informasi sensitif?
Tool ini memeriksa informasi sensitif atau pribadi dan menghapusnya sebelum data dikonversi, sehingga privasi dan keamanan tetap terjaga.
Detail
Deskripsi asli dari pembuat
Convert evaluation traces and production logs into SFT examples and preference pairs. Use when graded traces or failure examples exist and need to become training data, when applying rejection sampling to model outputs, or when building DPO pairs from passing and failing runs.
repo: wshobson/agents
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6736
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- โฆ
Skill lain dari repositori ini
screen-reader-testing
41kMeminta agent Anda menguji website menggunakan screen reader untuk memastikan website dapat diakses.
wcag-audit-patterns
41kMembantu agent Anda mengaudit aksesibilitas website dan memperbaiki masalah sesuai panduan WCAG.
multi-reviewer-patterns
41kMemungkinkan agent Anda mengoordinasikan code review paralel, menghapus temuan ganda, dan menggabungkan laporan.
parallel-debugging
41kMemungkinkan agent Anda men-debug masalah rumit dengan investigasi paralel dan analisis akar masalah.
Skill serupa
pytorch-patterns
280kMembantu agent Anda menggunakan PyTorch untuk model machine learning. Menerapkan praktik terbaik untuk pelatihan model yang efisien dan hasil yang dapat direproduksi.
evm-token-decimals
280kMembantu agent menghindari kesalahan angka desimal di berbagai jaringan blockchain. Memastikan nilai token akurat dalam transaksi dan perhitungan.
ito-inference
280kMemungkinkan agent Anda mengecek ketersediaan model AI untuk digunakan. Menghubungkan permintaan komputasi dengan layanan model yang siap.