Skip to content

Commit

Permalink
internal/labels: add extra description
Browse files Browse the repository at this point in the history
The description in the issue tracker might not be enough information.
Allow extra descriptive text about a category to be fed to the LLM.

Here I've included information about proposal scope from
https://go.dev/s/proposal. Although it didn't really help
with evaluation, I still think this feature is useful.

(Nothing I wrote, including phrases like "not gopls", could dissuade
the LLM from classifying go.dev/issue/69058, requesting a new gopls
feature, as a tool proposal.)

For #64.

Change-Id: I11563e065097e1176bd144f12c96c7f0285beaf2
Reviewed-on: https://go-review.googlesource.com/c/oscar/+/636716
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Tatiana Bradley <[email protected]>
  • Loading branch information
jba committed Dec 16, 2024
1 parent 0db0947 commit d4a3644
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 5 deletions.
5 changes: 3 additions & 2 deletions internal/labels/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import (
type Category struct {
Name string // internal unique name
Label string // issue tracker label
Description string
Description string // should match issue tracker
Extra string // additional description, not in issue tracker
}

// IssueCategory returns the category chosen by the LLM for the issue, along with an explanation
Expand Down Expand Up @@ -57,7 +58,7 @@ func IssueCategoryFromList(ctx context.Context, cgen llm.ContentGenerator, iss *
var systemPrompt bytes.Buffer
systemPrompt.WriteString(categoryPrompt)
for _, cat := range cats {
fmt.Fprintf(&systemPrompt, "%s: %s\n", cat.Name, cat.Description)
fmt.Fprintf(&systemPrompt, "%s: %s\n%s\n\n", cat.Name, cat.Description, cat.Extra)
}

// Ask about the category of the issue.
Expand Down
49 changes: 46 additions & 3 deletions internal/labels/static/categories.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,99 @@
# File of categories used to classify GitHub issues.
# The category name is distinct from the name of the label used on the issue tracker.
# The description of a label should match the description on the issue tracker.
# Categories used to classify GitHub issues.
# Each category has the following fields:
# name: the internal name of the category
# label: the name of the label on the issue tracker
# description: the label description on the issue tracker
# extra: additional information about the label, fed to the LLM along
# with the description
categories:
- name: bug
label: BUGLABEL
description: "Issues describing a bug in the Go implementation."

- name: languageProposal
label: LANGPROPLABEL
description: Issues describing a requested change to the Go language specification.
extra: |
This should be used for any notable change or addition to the language.
“Notable” includes (but is not limited to): Any visible behavior changes
that need a GODEBUG setting for compatibility. Any other visible behavior
changes in existing functionality.
- name: libraryProposal
label: LIBPROPLABEL
description: Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool
extra: |
This should be used for any notable change or addition to the libraries.
“Notable” includes (but is not limited to): API changes in the main
repo and all golang.org/x repos. Any visible behavior changes that
need a GODEBUG setting for compatibility. Any other visible behavior
changes in existing functionality. Adoption or use of new protocols,
protocol versions, cryptographic algorithms, and the like, even in an
implementation. Such changes are externally visible and require discussion
and probably a GODEBUG setting.
- name: toolProposal
label: TOOLPROPLABEL
description: Issues describing a requested change to a Go tool or command-line program.
extra: |
This should be used for any notable change or addition to the tools.
“Notable” includes (but is not limited to): Command-line changes to the
go command. Any visible behavior changes that need a GODEBUG setting
for compatibility. Any other visible behavior changes in existing
functionality. Adoption or use of new protocols, protocol versions,
cryptographic algorithms, and the like, even in an implementation. Such
changes are externally visible and require discussion and probably a
GODEBUG setting.
This does NOT includ changes to tools in x repos, like gopls, or third-party tools.
- name: implementation
label: IMPLABEL
description: Issues describing a semantics-preserving change to the Go implementation.

- name: accessRequest
label: accessRequestLABEL
description: Issues requesting builder or gomote access.

- name: pkgsiteRemovalRequest
label: pkgsite/package-removal
description: Issues for package removal. See https://pkg.go.dev/about#removing-a-package
# We don't label issues posted by gopherbot, so this label is probably unnecessary.

- name: automation
label: automationLABEL
description: Issues created by gopherbot or watchflakes automation.

- name: backport
label: backportLABEL
description: Issues created for requesting a backport of a change to a previous Go version.

- name: builders
label: Builders
description: x/build issues (builders, bots, dashboards)

- name: question
label: questionLABEL
description: Issues that are questions about using Go.
# It may be too challenging for the LLM to decide is something is WAI. Consider removing this.

- name: workingAsIntended
label: WorkingAsIntended
description: Issues describing something that is working as it is supposed to.

- name: featureRequest
label: FeatureRequestLABEL
description: Issues asking for a new feature that does not need a proposal.

- name: documentation
label: Documentation
description: Issues describing a change to documentation.
# The LLM never seems to pick invalid.

- name: invalid
label: invalidLABEL
description: Issues that are empty, incomplete, or spam.
# The LLM never seems to pick other.

- name: other
label: otherLABEL
description: None of the above.

0 comments on commit d4a3644

Please sign in to comment.