Annotations: new prompt to reduce "responsiveness"

The mention of responsiveness in the prompt really made the AI use
it...a lot! This version seems better. By asking the AI to not focus so
much on "user visible impact" we reduce how much it talks about "user
interaction responsiveness" which really isn't helpful.

Bug: 400357484
Change-Id: Id9f594b3af34bd733e6a3fe61c21aeef0cb1a1ed
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6408872
Commit-Queue: Alina Varkki <alinavarkki@chromium.org>
Reviewed-by: Alina Varkki <alinavarkki@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
This commit is contained in:
Jack Franklin
2025-03-28 09:44:33 -07:00
committed by Devtools-frontend LUCI CQ
parent cee49a9b62
commit d8698b71e3
@@ -267,17 +267,21 @@ export class PerformanceAgent extends AiAgent<TimelineUtils.AICallTree.AICallTre
}
const AI_LABEL_GENERATION_PROMPT = `## Instruction:
Generate a concise label (max 60 chars, single line) describing the *user-visible effect* of the selected call tree's activity, based solely on the provided call tree data.
Generate a concise label (max 60 chars, single line) describing the selected call tree's activity, based solely on the provided call tree data.
You should focus on:
1. What activity is happening within the call tree.
2. What the code within the call tree is doing.
3. What (if any) visible impact to the user there is.
## Strict Constraints:
- Output must be a single line of text.
- Maximum 60 characters.
- No full stops.
- Focus on user impact, not internal operations.
- Base the description only on the information present within the call tree data.
- Do not include the name of the selected event.
- Do not make assumptions about when the activity happened.
- Base the description only on the information present within the call tree data.
- Only include details on activity that you are highly confident about.
- Prioritize brevity.
- Only include third-party script names if their identification is highly confident.
- Always use "responsiveness" rather than "user interaction responsiveness".
`;