RFC: SDK-native evaluation harness (local + Azure/OTel sinks, LLM-as-judge, analysis agent, suite runner)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
調査の方向性
既存のイベントおよびテレメトリのサーフェスを理解するため、CONTRIBUTING.md と、そこで参照されている .NET SDK プロトタイプから始めます。提案されている EvalHarness、sinks、evaluators、analysis agent、suite runner を、スコープに関する未解決の問いと照らし合わせます。チームがスコープ、API の境界、命名、クロス SDK のロールアウト計画について合意すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Proposed: an opt-in, SDK-native evaluation harness that would measure and grade Copilot agent runs directly from the SDK's event stream, score them (operationally and/or with an LLM-as-judge), and fan results out to pluggable destinations — a local file and/or OpenTelemetry backends such as Azure Monitor / Application Insights. The proposal also includes an optional, fully-customizable analysis ("improve") agent and a suite runner for evaluating across many sessions.
Filing per
CONTRIBUTING.md("Please discuss any feature work with us before writing code"). This is a design proposal for team alignment, not a request to merge. A reference prototype exists in the .NET SDK to validate the shape, but everything below is proposed and open to change. If accepted it would be designed to land across all supported SDKs.
Motivation
The SDK exposes a rich typed event stream (assistant.usage, tool.execution_start/complete, abort, model.call_failure, user.message, assistant.message) and a runtime-side TelemetryConfig, but there is no first-class way to evaluate a run: aggregate tokens/cost/tool-economy/reliability, score output quality, persist a journal, compare runs over time, or batch-run a dataset. Consumers re-implement this per project. An idiomatic, observe-only eval surface would make the SDKs "nicer to use" (an explicitly welcomed contribution category) without changing agent behavior.
Proposed pipeline
EvalCollector (taps events) → EvalRunRecord (operational metrics + optional transcript) → IEvalEvaluator (pluggable scorer) → EvalInsight (generic verdict + named [0,1] scores) → IEvalSink[] (fan-out). Orchestrated by EvalHarness; batched by EvalSuite. (Names are illustrative and open to bikeshedding.)
Proposed functionality
Capture — EvalCollector
- Would subscribe to a session via the idiomatic
On<T>pattern and aggregate per-task buckets (BeginTask) of token usage (input/output/cache/reasoning), cost, per-model usage, tool-call counts + failures, aborts, and model-call failures. - Would map
tool.execution_complete(which carries onlyToolCallId) back to the tool name fromtool.execution_start. - Optional transcript capture (user/assistant/tool turns) — proposed off by default for privacy, enabled via
CaptureContent. This is what would unlock output-quality grading. - Designed to be usable standalone (no harness), exposing an immutable
EvalMetricsSnapshot.
Records & journal — EvalRunRecord / EvalJournal / EvalJournalEntry
- One append-only record per run: identity, timing, dominant model, task label, success flag, metrics snapshot, the OTel trace-id (to join runtime-native traces), and the optional transcript.
- A JSON Lines journal: append-only, stream-friendly, corruption-tolerant reads, and thread-safe concurrent appends so parallel suites don't collide. Source-generated JSON (AOT-safe).
Scoring — IEvalEvaluator / EvalInsight / OperationalEvaluator
EvalInsightproposed as generic and unopinionated:Verdict+OverallScore+ a namedScoresmap +Summary+ factualNotes. An evaluator may emit any dimensions.- A default
OperationalEvaluatorwould be deterministic, free, no-model: scoringefficiency(token economy vs prior run),tool_economy(tool success rate),reliability(aborts/model-failures/success), plus a verdict (Improved/Flat/Degraded/Inconclusive) from explicit run-over-run signals. - Model-performance / LLM-as-judge grading would simply be a custom
IEvalEvaluatorover the captured transcript. Operational and quality evals would coexist and emit the same insight.
Destinations — IEvalSink / IEvalHistorySource (the flexibility)
- Every completed run would fan out to all configured sinks at once, so one run can land locally and in Azure simultaneously.
- Local —
JsonlEvalSink: zero-infra append-only JSONL journal that also serves run history; proposed as the default when no sink is configured. - Azure / OTLP —
OpenTelemetryEvalSink: would emit run metrics and scores through publicEvalTelemetryinstruments, picking no destination itself — wherever the host routes the meter is where signals land:
Proposed metrics:builder.Services.AddOpenTelemetry() .WithMetrics(m => m.AddMeter(EvalTelemetry.MeterName)) .WithTracing(t => t.AddSource(EvalTelemetry.ActivitySourceName)) .UseAzureMonitor(); // App Insights — or .AddOtlpExporter(), console, etc.copilot.evals.tokens,copilot.evals.tool_calls,copilot.evals.cost,copilot.evals.score(tagged bydimension, so operational and quality trends sit side by side), plus a per-run span whose trace-id is stamped onto each record. IEvalSinkwould be public so consumers can write a database/queue/dashboard sink in a few lines.
Orchestration — EvalHarness
EvalHarness.Attach(session, options)once per session;BeginTaskbefore each prompt;CompleteRunAsyncreturning a record + insight and writing to every sink. Opt-in viaENABLE_EVALSorEvalOptions.Enabled, and proposed to be an inert no-op when disabled (zero prod overhead).EvalOptionswould carry:Enabled,WorkingDirectory,CaptureContent,Sinks(+ fluentAddLocalSink()/AddOpenTelemetrySink()),Evaluator,FromEnvironment().
Analysis sidecar — EvalAgent (the proposed "improve" agent)
- A separate, optional agent you could send off to analyze eval data and recommend improvements — decoupled from the eval loop and observe-only (never edits instructions/prompts/config).
- Fully customizable:
EvalAgentOptions(persona/SystemPrompt,Instruction,Model), backed by anEvalAnalysisRunnerdelegate so it can drive a real Copilot session, a different provider, or a test stub. - A
FromClient(client, configure)helper would create a session, apply the persona/model, send the instruction + serialized runs, and return the analysis;AnalyzeAsync(history)over the journal.
Batch — EvalSuite (across many sessions)
- Define a dataset of
EvalCases (name + prompt, optional per-caseSessionConfigand success predicate) and run each in its own fresh session with bounded concurrency (MaxConcurrency,Timeout). - Aggregate into
EvalSuiteResult: per-case results plusMeanOverallScore,MeanScores()per dimension,PassCount/FailCount,TotalTokens,TotalCost— the offline / CI-gate path, reusing the same evaluator and sinks.
Scope / open questions for the team
- Is an eval surface in-scope for the SDKs, or should it be an external companion library?
- Naming/namespace and GA-vs-preview gating.
- Cross-language parity plan (Node/Python/Go/.NET/Java/Rust) — suggest landing the shape in one SDK behind preview, then porting.
- Boundary with the runtime-side
TelemetryConfig(this would be additive/SDK-side, not a replacement). - Whether the analysis agent (
EvalAgent) and suite runner (EvalSuite) belong in an initial cut or a follow-up.
Non-goals
- No change to agent/runtime behavior; strictly observe-only.
- Not a clone of any vendor's eval catalog — provide the engine and seams, not opinionated graders.
Happy to adjust scope based on the roadmap; a .NET reference prototype can seed the discussion.
- 主要言語
- TypeScript
- スター
- 10.5k
- フォーク
- 1.5k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 81
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-sdk のほかの issue
-
Clarify SDK architecture and in-process runtime transport対応中かも @KalebCole が 3 日前に担当しました。 オープンdocumentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
github/copilot-sdk#2804 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Python ModelLimits drops max_output_tokens from model metadata対応中かも @HDMowri が 4 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-sdk#2798 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github/copilot-sdk#2793 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/copilot-sdk#2782 ·
メンテナーはふだん 1 日以内に返信
-
Rust: subagent lifecycle hooks are logged as unknown対応中かも @hackberry-lab が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
github/copilot-sdk#2781 ·
メンテナーはふだん 1 日以内に返信
github/copilot-sdk の issue をすべて見る
似ている issue
-
security-scan
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
enhancement from-studio
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
esengine/DeepSeek-Reasonix#12048 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(data-lake): land GitHub callback failures on the lake instead of the home page (epic #3813)オープンbug data-lake github-integration UI/UX
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
test: pet colorsオープンtestplan-item
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug claimable good first issue pillar/platforms
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
hurttlocker/o8#3277 ·
メンテナーはふだん 1 日以内に返信