Skip to content

Commit d8698b7

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored andcommitted
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 <[email protected]> Reviewed-by: Alina Varkki <[email protected]> Commit-Queue: Jack Franklin <[email protected]> Auto-Submit: Jack Franklin <[email protected]>
1 parent cee49a9 commit d8698b7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

front_end/models/ai_assistance/agents/PerformanceAgent.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,17 +267,21 @@ export class PerformanceAgent extends AiAgent<TimelineUtils.AICallTree.AICallTre
267267
}
268268

269269
const AI_LABEL_GENERATION_PROMPT = `## Instruction:
270-
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.
270+
Generate a concise label (max 60 chars, single line) describing the selected call tree's activity, based solely on the provided call tree data.
271+
272+
You should focus on:
273+
1. What activity is happening within the call tree.
274+
2. What the code within the call tree is doing.
275+
3. What (if any) visible impact to the user there is.
271276
272277
## Strict Constraints:
273278
- Output must be a single line of text.
274279
- Maximum 60 characters.
275280
- No full stops.
276-
- Focus on user impact, not internal operations.
281+
- Base the description only on the information present within the call tree data.
277282
- Do not include the name of the selected event.
278283
- Do not make assumptions about when the activity happened.
279-
- Base the description only on the information present within the call tree data.
284+
- Only include details on activity that you are highly confident about.
280285
- Prioritize brevity.
281286
- Only include third-party script names if their identification is highly confident.
282-
- Always use "responsiveness" rather than "user interaction responsiveness".
283287
`;

0 commit comments

Comments
 (0)