SkillをGitHub Copilotで"育てる" — 実証的プロンプト改善の実践レポートThis article documents applying mizchi's empirical-prompt-tuning methodology in…
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy
mizchi氏提唱の「empirical-prompt-tuning」手法をGitHub Copilot環境で実践し、正規表現生成Skillを意図的に劣化させてからテスト駆動で反復改善することで、勘頼りでないプロンプト品質向上の方法論を実証した記録。
This article documents applying mizchi's empirical-prompt-tuning methodology in GitHub Copilot to iteratively improve a regex-builder Skill, showing that test-driven prompt refinement yields more reliable quality gains than intuition-based tweaking.
要約と収集メタデータをもとに生成した AI 解説本文です。元記事全文の転載・翻訳ではありません。This AI explainer is generated from the summaries and collected metadata, not from a reproduction or translation of the full source article.
生成 AI にコードや文章を書かせるとき、空白の有無や指示の並べ方といった些細な差異が、出力の質を大きく左右することは少なくない。この記事は、そうした「なんとなく動いた/動かなかった」から脱却し、テスト駆動でプロンプトを磨いていく実践の記録である。
取り上げるのは、mizchi 氏が提唱する「empirical-prompt-tuning(実証的プロンプトチューニング)」と呼ばれる手法だ。経験や勘に頼ってプロンプトを少しずつ書き換えるのではなく、期待する出力を検証する仕組みを用意し、その結果を根拠に反復的に改善していく考え方を指すと見られる。筆者はこの方法論を GitHub Copilot 環境に持ち込み、検証を進めている。
題材となったのは、正規表現を生成する「regex-builder」という Skill だ。興味深いのは、あえて品質を落とした状態から出発している点である。意図的に劣化させた Skill に対してテストを回し、失敗するケースを手掛かりにプロンプトの構造や指示文を調整し、再びテストで確かめる。この一連のサイクルを繰り返すことで、どの変更が品質向上に寄与したのかを客観的に追える構成になっている。
背景には、プロンプトエンジニアリングが属人的な「コツ」として語られがちだった状況がある。LLM の応答は確率的で、同じ指示でも揺らぎが生じるため、単発の成功をもって「良いプロンプト」と判断するのは危うい。テストという再現可能な基準を導入すれば、改善の効果をパスした件数などとして比較でき、勘頼りの調整よりも信頼性の高い品質向上が期待できる、という発想がこの手法の核にある。
こうした「Skill」を単位として AI の振る舞いを定義し、テストで検証するアプローチは、GitHub Copilot に限らず各種のコーディング支援ツールやエージェント開発でも関心が高まっている領域と言える。ソフトウェア開発で定着したテスト駆動開発の考え方を、プロンプトの世界へ持ち込む試みとして参考になるだろう。ただし本稿はあくまで一つの検証事例であり、対象とする Skill や評価基準が変われば有効性も変わり得る点には留意したい。それでも、勘を言語化し検証可能な形に落とし込む姿勢は、今後の AI 活用において重要性を増していく可能性がある。
Prompt quality is increasingly treated as an engineering problem rather than a matter of luck, and this report puts that idea to the test. It documents an attempt to apply mizchi's "empirical-prompt-tuning" methodology inside GitHub Copilot, using a regex-builder Skill—a component that generates regular expressions—as the subject of a controlled, iterative improvement exercise. The goal is to show that disciplined, test-driven refinement produces more reliable gains than intuition-based tweaking.
The premise is straightforward. Small differences in a prompt, such as the presence or absence of whitespace or the way instructions are structured, can significantly change the quality of a large language model's output. Developers often work by feel, adjusting wording until something "just works," without fully understanding why. The methodology described here aims to replace that guesswork with a repeatable process, treating a prompt-driven Skill as an artifact that can be measured, regression-checked, and improved systematically rather than by intuition alone.
Empirical-prompt-tuning, as proposed by mizchi, a developer known in the Japanese engineering community, borrows heavily from the mindset of test-driven development. Instead of asking whether a prompt feels right, it asks whether the Skill produces correct results against a defined set of cases. Regex generation is a well-suited domain for this because regular expressions have clear, verifiable behavior: a generated pattern either matches the intended strings and rejects the unintended ones, or it does not. That makes it possible to build objective pass/fail checks around the model's output and to score changes in a way that is hard to dispute.
A notable feature of the experiment is that the author deliberately degraded the regex-builder Skill before improving it. By intentionally lowering the prompt's quality, the report establishes a known, weakened starting point, then demonstrates whether test-guided edits can recover and surpass the original behavior. This resembles an ablation study: beginning from a degraded baseline makes the effect of each change easier to observe than starting from an already-tuned prompt, where improvements tend to be marginal and difficult to attribute to any single edit. The iterative loop—run the tests, inspect failures, adjust the prompt, and re-run—mirrors how engineers debug conventional code.
The work is carried out with GitHub Copilot as the execution environment, which situates it within the broader move to make coding assistants extensible. The notion of a "Skill" reflects a wider trend toward packaging model capabilities as modular, reusable units defined largely in natural language and structured instructions. Comparable ideas appear across the industry, including custom instructions, agent-style extensions, and the general practice of composing specialized behaviors on top of a general-purpose model. Framing a regex generator as a discrete Skill makes it a convenient, self-contained target for this kind of measurement.
For readers new to the space, some background helps. Prompt engineering has matured from ad hoc phrasing into a practice that increasingly resembles software development, complete with version control, evaluation suites, and regression testing. The industry term for systematic measurement here is "evals," where prompts or agents are graded against curated datasets. Approaches like the one in this report apply that discipline at a smaller, developer-facing scale, using the LLM's own outputs as the thing under test. The underlying assumption is that model behavior, while non-deterministic, is stable enough that consistent test results can guide meaningful decisions.
The findings should be read with appropriate caution. This is a single practitioner's account applied to one narrow task, so the results are illustrative rather than definitive, and outcomes are likely to vary with the model version, the phrasing of test cases, and the domain. Regular expressions offer unusually clean success criteria; tasks with more subjective or open-ended outputs would be harder to evaluate this way and may require more elaborate scoring. The report also appears to depend on the specific behavior of the Copilot environment at the time of writing, which can shift as underlying models are updated.
Even with those caveats, the exercise offers a practical takeaway. Treating prompts as testable artifacts, and validating changes against concrete cases rather than impressions, gives developers a more defensible way to improve Skills. For teams building on GitHub Copilot or similar assistants, adopting a test-driven loop appears to be a reasonable step toward more predictable and maintainable prompt-based components.
本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (zenn.dev) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (zenn.dev).





