{Find} Refine its logic based on feedback#33796
Open
necusjz wants to merge 10 commits into
Open
Conversation
|
Hi @necusjz, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines the az find command module’s Microsoft Learn search and formatting logic to improve result relevance and presentation (keyword extraction/stemming, CLI-focused doc scoring, summary extraction, deduping, and command extraction), and updates unit tests accordingly.
Changes:
- Improve relevance filtering via keyword stemming, stop-word removal, and CLI-specific doc query hints + ranking.
- Refactor result formatting to dedupe by URL/title and handle “no usable results” scenarios more cleanly.
- Enhance summary extraction (markdown cleanup + truncation marker) and expand tests for the new behaviors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/find/custom.py | Implements updated query keyword logic, CLI doc scoping/ranking, summary/command extraction, deduping, and refactored output formatting. |
| src/azure-cli/azure/cli/command_modules/find/tests/latest/test_find.py | Updates and expands unit tests to validate the refined relevance, summary, command extraction, and formatting behaviors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
455
to
+457
| for line in lines[start:]: | ||
| if not line.strip(): | ||
| line = line.strip() | ||
| if not line: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 PR Validation — ️✔️ All clear
Related command
Description
as commits state.
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.