GitHub is evolving Copilot’s Next Edit Suggestions with custom model training to make smarter, context-aware diffs right inside your IDE. Here’s what changed—and how to use it for faster, safer edits.
What are “Next Edit Suggestions”?
Next Edit Suggestions are AI-generated diffs that propose your likely next change after you modify code. Instead of a single-line completion, Copilot offers a small, reviewable patch.
The goal: accelerate repetitive edits, refactors, and small fixes while keeping you in control. You can accept, tweak, or reject each patch like a mini pull request.
What’s new: custom model training
GitHub reports it is training specialized models to better predict useful follow-up edits and rank suggestions that match project context. The focus is on higher-quality diffs, fewer off-target changes, and more helpful sequencing of edits.
Practically, that should mean cleaner patches for common tasks (API updates, test tweaks, and style fixes), with improved relevance and reduced rework.
How to get value now
- State intent in comments: add a one-line TODO (e.g., “Refactor to async; preserve error handling”). Copilot aligns diffs to your goal.
- Work in small scopes: trigger suggestions after a focused change (one function or file). Smaller contexts yield cleaner patches.
- Anchor with tests: write or update a failing test, then accept suggestions that make the test pass.
- Nudge with language: “Extract to helper,” “Guard nulls,” or “Migrate to v2 API.” Clear verbs steer patch shape.
- Use review mindset: skim the diff, run linters, and accept only what you’d approve in a PR.
- Commit in slices: accept atomic patches and commit with tight messages to keep history readable.
Where it shines
- Repetitive refactors across multiple files
- API or SDK migrations that touch many call sites
- Style, lint, and safety-by-default fixes (null checks, bounds)
- Small test updates after signature or behavior changes
Watch-outs
- Trust but verify: always run tests and static analysis before committing.
- Security-sensitive paths: prefer manual review and stricter guardrails.
- Project conventions: keep architecture and style guides in-repo so Copilot can align suggestions.
Quick starter checklist
- Write a one-line intent comment.
- Make a small, initial edit to set context.
- Trigger Copilot’s next edit and review the diff.
- Run tests and linters; commit in small chunks.
- Repeat for multi-file migrations or refactors.
Sources
GitHub: Evolving GitHub Copilot’s Next Edit Suggestions through custom model training
The takeaway
Custom-trained Next Edit Suggestions push Copilot beyond autocomplete toward reviewable, task-level patches. Use clear intent, small scopes, and test-anchored loops to turn them into reliable velocity.
Get more like this
Enjoy practical AI tips and dev-ready breakdowns. Subscribe to The AI Nuggets newsletter: theainuggets.com/newsletter

