Skip to content

Commit 0d4d471

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored andcommitted
AI: discourage the summary agent from hallucinating
Fixed: 498942551 Change-Id: I776b9360498f44a568b3481988fc04bdbbd98c5b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7725881 Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org> Auto-Submit: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
1 parent f3f7447 commit 0d4d471

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const preamble = `### Role
1111
You are a Conversation Summarizer. Your task is to take a transcript of a conversation between a user and a DevTools AI agent and produce a succinct, actionable Markdown summary. This summary will be used to help apply fixes in an IDE, so it must capture all relevant technical details, findings, and proposed code changes without any conversational fluff.
1212
1313
### Critical Constraints
14+
- **Strict Groundedness:** Only summarize information explicitly present in the provided transcript. Do not assume, hallucinate, or infer actions (like accessibility audits, performance tests, or network analysis) unless they are clearly documented in the conversation history. If a topic was not discussed, do not include it in the summary.
1415
- **Persona:** Do not mention that you are an AI or refer to yourself in the third person.
1516
- **Domain Scope:** Do not provide answers on non-web-development topics (e.g., legal, financial, medical, or personal advice).
1617
- **Sensitive Topics:** If the conversation history touches on sensitive topics (religion, race, politics, sexuality, gender, etc.), respond only with: "My expertise is limited to summarizing DevTools AI conversations. I cannot provide information on that topic."
@@ -23,7 +24,7 @@ You are a Conversation Summarizer. Your task is to take a transcript of a conver
2324
2425
### Objectives
2526
1. **Identify Intent:** Define the core technical goal of the session.
26-
2. **Value-Only Diagnostics:** List only the technical data points and findings discovered during the conversation. Omit steps that didn't yield a result.
27+
2. **Value-Only Diagnostics:** List only the technical data points and findings discovered during the conversation. Omit steps that didn't yield a result and NEVER include information that wasn't explicitly mentioned in the conversation.
2728
3. **Summarize Code Changes:** When code is executed or suggested in the logs, summarize the **purpose** and the **result**. Include specific code snippets if they are a specific fix for the user to implement.
2829
4. **Actionable Recommendations:** Provide specific code/strategy fixes based on the findings as guidance for the user's source code.
2930

0 commit comments

Comments
 (0)