Skip to content

Add A/B experiment for Copilot PR NLP prompt style - #63159

Merged
pelikhan merged 2 commits into
mainfrom
copilot/ab-advisor-experiment-campaign-prompt-style
Sep 24, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/ab-advisor-experiment-campaign-prompt-style

Conversation

Copilot AI commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

The Copilot PR NLP analysis workflow needs an experiment campaign to compare concise vs. structured prompt execution. The campaign measures report usefulness via existing evals while tracking runtime and output guardrails.

  • Experiment configuration

    • Adds nlp_prompt_style with concise and structured variants.
    • Defines primary, secondary, and guardrail metrics with campaign metadata.
  • Evaluation coverage

    • Adds prompt_style_applied to verify the assigned prompt style is reflected in output.
  • Prompt variant wiring

    • Adds a compile-time conditional block that changes execution guidance by assigned variant:
{{#if experiments.nlp_prompt_style == 'concise' }}
Use compact instruction execution...
{{else}}
Use explicit phase-based execution...
{{/if}}
  • Generated workflow
    • Regenerates copilot-pr-nlp-analysis.lock.yml so experiment assignment, eval propagation, and experiment state handling are included.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add experiment campaign for A/B testing prompt_style Add A/B experiment for Copilot PR NLP prompt style Sep 24, 2026
Copilot AI requested a review from pelikhan September 24, 2026 11:10
@pelikhan
pelikhan marked this pull request as ready for review September 24, 2026 11:10
Copilot AI balanced review requested due to automatic review settings September 24, 2026 11:10
@pelikhan
pelikhan merged commit e16d78c into main Sep 24, 2026
1 check passed
@pelikhan
pelikhan deleted the copilot/ab-advisor-experiment-campaign-prompt-style branch September 24, 2026 11:11
Copilot stopped reviewing on behalf of pelikhan due to an error September 24, 2026 11:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

Copilot review overview

Review effort: Lite
Findings: 2 High severity · 1 Medium severity

Open (3)
What changed in this PR

Adds an A/B experiment to the Copilot PR Conversation NLP Analysis workflow to compare “concise” vs “structured” prompt wording, and persists experiment state across runs.

Changes:

  • Introduces an nlp_prompt_style experiment with metrics/guardrails and adds a prompt variant section to the workflow prompt.
  • Adds steps to restore/pick variants, propagate the chosen variant via env/outputs, and upload/download an experiment artifact.
  • Adds a job to push experiment state back to a dedicated branch and adds an eval to verify the prompt style was applied.
File Description
.github/​workflows/​copilot-pr-nlp-analysis.md Defines the experiment and injects variant-specific prompt instructions into the rendered prompt.
.github/​workflows/​copilot-pr-nlp-analysis.lock.yml Implements experiment state restore/pick, passes variant values through the run, adds eval question, and pushes experiment state to git.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +2434 to +2436
- name: Push experiment state to git
id: push_experiments_state
if: always()
Comment on lines +113 to +121
{{#if experiments.nlp_prompt_style == 'concise' }}
## Prompt Style Variant: concise

Use compact instruction execution. Prioritize brevity, top findings, and direct recommendations. Keep narrative commentary short, highlight the 3-5 highest-signal insights, and avoid exhaustive detail unless it is needed to explain a material result or edge case.
{{else}}
## Prompt Style Variant: structured

Use explicit phase-based execution. Work through data loading, preprocessing, NLP analysis, visualization, report construction, and final verification in order. In the final discussion, preserve the required output sections and verify each success criterion with checklist-style constraints before posting.
{{/if}}
@@ -1,4 +1,4 @@
# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"1ab34f5a7a77581cbce29d8016d0290a140a2092c60cff34797f186ba099e2d8","body_hash":"098697f0b61df6bbd7ded8a00b8138e183b240777d48c8e0396fdb66bcaa53df","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.87","copilot-sdk":"1.0.13"}}
# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"5dc0509cf7cc032e3e2756393dd01556de6f00fc11114a1ec42489ecae07d704","body_hash":"faf9f5d4f3771d524b5163b15a330bf1a31430d94913fea4149149e03c682fd1","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.87","copilot-sdk":"1.0.13"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ab-advisor] Experiment campaign for copilot-pr-nlp-analysis: A/B test prompt_style

3 participants