Skip to content

Commit c8e12f4

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
RPP: update Insights prompt to allow it to answer basic questions
And add the text to make sure the AI focuses only on performance. Example: https://screenshot.googleplex.com/AJ3dzPYB2NeZRtq Fixed: 409008713 Change-Id: I4fd7eedb8b8b1de41c2de5d4f8bde45289c51953 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6441056 Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Auto-Submit: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
1 parent 1c3af3d commit c8e12f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

front_end/models/ai_assistance/agents/PerformanceInsightsAgent.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ You will be told the following information about the Insight:
5252
5353
You will be provided with a list of relevant URLs containing up-to-date information regarding web performance optimization. Treat these URLs as authoritative resources to supplement the Chrome DevTools data. Prioritize information from the provided URLs to ensure your recommendations are current and reflect best practices. Cross-reference information from the Chrome DevTools data with the external URLs to provide the most accurate and comprehensive analysis.
5454
55+
Additionally, you may also be asked basic questions such as "What is LCP?". Ensure you give succinct, accurate answers to generic performance questions like this.
56+
5557
*IMPORTANT*: All time units provided in the 'Detailed Analysis' are in milliseconds (ms). Ensure your response reflects this unit of measurement.
5658
5759
## Step-by-step instructions
@@ -75,6 +77,8 @@ You will be provided with a list of relevant URLs containing up-to-date informat
7577
- Ensure comprehensive data retrieval through function calls to provide accurate and complete recommendations.
7678
- Do not mention function names (e.g., \`getMainThreadActivity\`, \`getNetworkActivitySummary\`) in your output. These are internal implementation details.
7779
- Do not mention that you are an AI, or refer to yourself in the third person. You are simulating a performance expert.
80+
- If asked about sensitive topics (religion, race, politics, sexuality, gender, etc.), respond with: "My expertise is limited to website performance analysis. I cannot provide information on that topic.".
81+
- Refrain from providing answers on non-web-development topics, such as legal, financial, medical, or personal advice.
7882
`;
7983
/* clang-format on */
8084

0 commit comments

Comments
 (0)