-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add Xtab275EditIntent prompting strategy with edit intent filtering #3181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This adds a new prompting strategy that extends Xtab275 with edit intent tag parsing. The model returns an edit_intent tag indicating confidence level (no_edit, low, medium, high), which is then filtered against the user's aggressiveness level. Filtering logic: - no_edit: Never show - low intent: Show for all aggressiveness levels - medium intent: Show for low/medium aggressiveness - high intent: Only show for low aggressiveness Changes: - Add EditIntent enum and namespace with parsing and filtering logic - Add EditWindowWithEditIntent response format - Add Xtab275EditIntent prompting strategy - Implement parseEditIntentFromStream in xtabProvider - Add editIntent telemetry field - Add comprehensive unit tests for EditIntent Co-authored-by: GitHub Copilot <noreply@github.com>
…parsing the rest of the response
…t short-circuits to skip the rest of the stream
Manual testUser config "github.copilot.chat.advanced.inlineEdits.xtabProvider.modelConfiguration": {
"modelName": "copilot-nes-oct",
"promptingStrategy": "xtab275EditIntent",
"includeTagsInCurrentFile": false,
},Traces from manual test# NoEdit (filtered out -- rough speedup from 1947ms to 311-426 ms, assuming NoEdit would consume an equal number of tokens and not accounting for speculative decoding)Medium confidence + Medium aggressiveness (applied)Low confidence + Med aggressiveness (filtered out) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a new prompting strategy Xtab275EditIntent that extends the Xtab275 strategy with edit intent tag parsing and filtering. The model returns an <|edit_intent|> tag indicating its confidence level (no_edit, low, medium, high), which is then filtered against the user's aggressiveness level to determine whether to show the edit suggestion.
Changes:
- Introduces
EditIntentenum and namespace with parsing logic and confidence-based filtering - Adds
EditWindowWithEditIntentresponse format for the new prompting strategy - Implements
parseEditIntentFromStreamfunction to extract edit intent tags from model responses - Extends telemetry with
editIntentandeditIntentParseErrorfields - Provides comprehensive unit tests covering all edge cases and integration scenarios
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/platform/inlineEdits/common/dataTypes/xtabPromptOptions.ts |
Adds EditIntent enum with filtering logic and Xtab275EditIntent prompting strategy |
src/platform/inlineEdits/common/statelessNextEditProvider.ts |
Adds telemetry fields for edit intent and parse errors |
src/extension/xtab/node/xtabProvider.ts |
Implements parseEditIntentFromStream parsing function and integrates filtering logic into provider |
src/extension/xtab/common/promptCrafting.ts |
Updates postscript generation to handle Xtab275EditIntent strategy |
src/extension/xtab/test/node/editIntent.spec.ts |
Adds comprehensive unit tests for all edit intent functionality |
src/platform/inlineEdits/common/inlineEditLogContext.ts |
Fixes trailing comma for consistency |
…ptions.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…/vscode-copilot-chat into ben/edit-intent-parsing
|
CC @ulugbekna, could you please review this PR? 🙏 |
This adds a new prompting strategy that extends Xtab275 with edit intent tag parsing. The model returns an edit_intent tag indicating confidence level (no_edit, low, medium, high), which is then filtered against the user's aggressiveness level.
See Personalized XTab: edit intent (#3144) for details. This PR is required in order to flight the edit intent model.
Model can output tags (
<|edit_intent|>no_edit|low|medium|high<|/edit_intent|>) or short names (N|L|M|H) to save tokens, which will be parsed strictly from the first line of the response. The first model we've trained will output tags.Changes: