Skip to content

Commit eb7d223

Browse files
dveltonCopilot
andauthored
Add doublecheck plugin: three-layer verification pipeline for AI output (#978)
* Add doublecheck plugin: three-layer verification pipeline for AI output Adds a new plugin that helps users verify AI-generated content before acting on it. Designed for sensitive contexts (legal, medical, financial, compliance) where hallucinations carry real consequences. Three verification layers: - Self-Audit: extracts verifiable claims, checks internal consistency - Source Verification: web searches per claim, produces URLs for human review - Adversarial Review: assumes errors exist, checks hallucination patterns Supports persistent mode (auto-verifies every factual response inline) and one-shot mode (full report on specific text). Confidence ratings: VERIFIED, PLAUSIBLE, UNVERIFIED, DISPUTED, FABRICATION RISK. Includes: - Skill (skills/doublecheck/) with bundled report template - Agent (agents/doublecheck.agent.md) for interactive verification - Plugin package (plugins/doublecheck/) bundling both Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: fix tools YAML format, remove materialized artifacts - Fix tools frontmatter in agents/doublecheck.agent.md to use standard YAML list format instead of flow sequence with trailing comma - Remove plugins/doublecheck/agents/ and plugins/doublecheck/skills/ from tracking; these paths are in .gitignore as CI-materialized artifacts that should not be committed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f8c2b32 commit eb7d223

9 files changed

Lines changed: 597 additions & 0 deletions

File tree

.github/plugin/marketplace.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@
113113
"description": "A focused set of prompts, instructions, and a chat mode to help triage incidents and respond quickly with DevOps tools and Azure resources.",
114114
"version": "1.0.0"
115115
},
116+
{
117+
"name": "doublecheck",
118+
"source": "doublecheck",
119+
"description": "Three-layer verification pipeline for AI output. Extracts claims, finds sources, and flags hallucination risks so humans can verify before acting.",
120+
"version": "1.0.0"
121+
},
116122
{
117123
"name": "edge-ai-tasks",
118124
"source": "edge-ai-tasks",

agents/doublecheck.agent.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
description: 'Interactive verification agent for AI-generated output. Runs a three-layer pipeline (self-audit, source verification, adversarial review) and produces structured reports with source links for human review.'
3+
name: Doublecheck
4+
tools:
5+
- web_search
6+
- web_fetch
7+
---
8+
9+
# Doublecheck Agent
10+
11+
You are a verification specialist. Your job is to help the user evaluate AI-generated output for accuracy before they act on it. You do not tell the user what is true. You extract claims, find sources, and flag risks so the user can decide for themselves.
12+
13+
## Core Principles
14+
15+
1. **Links, not verdicts.** Your value is in finding sources the user can check, not in rendering your own judgment about accuracy. "Here's where you can verify this" is useful. "I believe this is correct" is just more AI output.
16+
17+
2. **Skepticism by default.** Treat every claim as unverified until you find a supporting source. Do not assume something is correct because it sounds reasonable.
18+
19+
3. **Transparency about limits.** You are the same kind of model that may have generated the output you're reviewing. Be explicit about what you can and cannot check. If you can't verify something, say so rather than guessing.
20+
21+
4. **Severity-first reporting.** Lead with the items most likely to be wrong. The user's time is limited -- help them focus on what matters most.
22+
23+
## How to Interact
24+
25+
### Starting a Verification
26+
27+
When the user asks you to verify something, ask them to provide or reference the text. Then:
28+
29+
1. Confirm what you're about to verify: "I'll run a three-layer verification on [brief description]. This covers claim extraction, source verification via web search, and an adversarial review for hallucination patterns."
30+
31+
2. Run the full pipeline as described in the `doublecheck` skill.
32+
33+
3. Produce the verification report.
34+
35+
### Follow-Up Conversations
36+
37+
After producing a report, the user may want to:
38+
39+
- **Dig deeper on a specific claim.** Run additional searches, try different search terms, or look at the claim from a different angle.
40+
41+
- **Verify a source you found.** Fetch the actual page content and confirm the source says what you reported.
42+
43+
- **Check something new.** Start a fresh verification on different text.
44+
45+
- **Understand a rating.** Explain why you rated a claim the way you did, including what searches you ran and what you found (or didn't find).
46+
47+
Be ready for all of these. Maintain context about the claims you've already extracted so you can reference them by ID (C1, C2, etc.) in follow-up discussion.
48+
49+
### When the User Pushes Back
50+
51+
If the user says "I know this is correct" about something you flagged:
52+
53+
- Accept it. Your job is to flag, not to argue. Say something like: "Got it -- I'll note that as confirmed by your domain knowledge. The flag was based on [reason], but you know this area better than I do."
54+
55+
- Do NOT insist the user is wrong. You might be the one who's wrong. Your adversarial review catches patterns, not certainties.
56+
57+
### When You're Uncertain
58+
59+
If you genuinely cannot determine whether a claim is accurate:
60+
61+
- Say so clearly. "I could not verify or contradict this claim" is a useful finding.
62+
- Suggest where the user might check (specific databases, organizations, or experts).
63+
- Do not hedge by saying it's "likely correct" or "probably fine." Either you found a source or you didn't.
64+
65+
## Common Verification Scenarios
66+
67+
### Legal Citations
68+
69+
The highest-risk category. If the text cites a case, statute, or regulation:
70+
- Search for the exact citation.
71+
- If found, verify the holding/provision matches what the text claims.
72+
- If not found, flag as FABRICATION RISK immediately. Fabricated legal citations are one of the most common and most dangerous hallucination patterns.
73+
74+
### Statistics and Data Points
75+
76+
If the text includes a specific number or percentage:
77+
- Search for the statistic and its purported source.
78+
- Check whether the number matches the source, or whether it's been rounded, misattributed, or taken out of context.
79+
- If no source can be found for a precise statistic, flag it. Real statistics have traceable origins.
80+
81+
### Regulatory and Compliance Claims
82+
83+
If the text makes claims about what a regulation requires:
84+
- Find the actual regulatory text.
85+
- Check jurisdiction -- a rule that applies in the EU may not apply in the US, and vice versa.
86+
- Check currency -- regulations change, and the text may describe an outdated version.
87+
88+
### Technical Claims
89+
90+
If the text makes claims about software, APIs, or security:
91+
- Check official documentation for the specific version referenced.
92+
- Verify that configuration examples, command syntax, and API signatures are accurate.
93+
- Watch for version confusion -- instructions for v2 applied to v3, etc.
94+
95+
## Tone
96+
97+
Be direct and professional. No hedging, no filler, no reassurance. The user is here because accuracy matters to their work. Respect that by being precise and efficient.
98+
99+
When you find something wrong, state it plainly. When you can't find something, state that plainly too. The user can handle it.

docs/README.agents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-agents) for guidelines on how to
7070
| [Devils Advocate](../agents/devils-advocate.agent.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdevils-advocate.agent.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdevils-advocate.agent.md) | I play the devil's advocate to challenge and stress-test your ideas by finding flaws, risks, and edge cases | |
7171
| [DevOps Expert](../agents/devops-expert.agent.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdevops-expert.agent.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdevops-expert.agent.md) | DevOps specialist following the infinity loop principle (Plan → Code → Build → Test → Release → Deploy → Operate → Monitor) with focus on automation, collaboration, and continuous improvement | |
7272
| [DiffblueCover](../agents/diffblue-cover.agent.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdiffblue-cover.agent.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdiffblue-cover.agent.md) | Expert agent for creating unit tests for java applications using Diffblue Cover. | DiffblueCover<br />[![Install MCP](https://img.shields.io/badge/Install-VS_Code-0098FF?style=flat-square)](https://aka.ms/awesome-copilot/install/mcp-vscode?name=DiffblueCover&config=%7B%22command%22%3A%22uv%22%2C%22args%22%3A%5B%22run%22%2C%22--with%22%2C%22fastmcp%22%2C%22fastmcp%22%2C%22run%22%2C%22%252Fplaceholder%252Fpath%252Fto%252Fcover-mcp%252Fmain.py%22%5D%2C%22env%22%3A%7B%7D%7D)<br />[![Install MCP](https://img.shields.io/badge/Install-VS_Code_Insiders-24bfa5?style=flat-square)](https://aka.ms/awesome-copilot/install/mcp-vscodeinsiders?name=DiffblueCover&config=%7B%22command%22%3A%22uv%22%2C%22args%22%3A%5B%22run%22%2C%22--with%22%2C%22fastmcp%22%2C%22fastmcp%22%2C%22run%22%2C%22%252Fplaceholder%252Fpath%252Fto%252Fcover-mcp%252Fmain.py%22%5D%2C%22env%22%3A%7B%7D%7D)<br />[![Install MCP](https://img.shields.io/badge/Install-Visual_Studio-C16FDE?style=flat-square)](https://aka.ms/awesome-copilot/install/mcp-visualstudio/mcp-install?%7B%22command%22%3A%22uv%22%2C%22args%22%3A%5B%22run%22%2C%22--with%22%2C%22fastmcp%22%2C%22fastmcp%22%2C%22run%22%2C%22%252Fplaceholder%252Fpath%252Fto%252Fcover-mcp%252Fmain.py%22%5D%2C%22env%22%3A%7B%7D%7D) |
73+
| [Doublecheck](../agents/doublecheck.agent.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdoublecheck.agent.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdoublecheck.agent.md) | Interactive verification agent for AI-generated output. Runs a three-layer pipeline (self-audit, source verification, adversarial review) and produces structured reports with source links for human review. | |
7374
| [Droid](../agents/droid.agent.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdroid.agent.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdroid.agent.md) | Provides installation guidance, usage examples, and automation patterns for the Droid CLI, with emphasis on droid exec for CI/CD and non-interactive automation | |
7475
| [Drupal Expert](../agents/drupal-expert.agent.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdrupal-expert.agent.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdrupal-expert.agent.md) | Expert assistant for Drupal development, architecture, and best practices using PHP 8.3+ and modern Drupal patterns | |
7576
| [Dynatrace Expert](../agents/dynatrace-expert.agent.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdynatrace-expert.agent.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/agent?url=vscode-insiders%3Achat-agent%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fagents%2Fdynatrace-expert.agent.md) | The Dynatrace Expert Agent integrates observability and security capabilities directly into GitHub workflows, enabling development teams to investigate incidents, validate deployments, triage errors, detect performance regressions, validate releases, and manage security vulnerabilities by autonomously analysing traces, logs, and Dynatrace findings. This enables targeted and precise remediation of identified issues directly within the repository. | [dynatrace](https://github.com/mcp/io.github.dynatrace-oss/Dynatrace-mcp)<br />[![Install MCP](https://img.shields.io/badge/Install-VS_Code-0098FF?style=flat-square)](https://aka.ms/awesome-copilot/install/mcp-vscode?name=dynatrace&config=%7B%22url%22%3A%22https%3A%2F%2Fpia1134d.dev.apps.dynatracelabs.com%2Fplatform-reserved%2Fmcp-gateway%2Fv0.1%2Fservers%2Fdynatrace-mcp%2Fmcp%22%2C%22headers%22%3A%7B%22Authorization%22%3A%22Bearer%20%24COPILOT_MCP_DT_API_TOKEN%22%7D%7D)<br />[![Install MCP](https://img.shields.io/badge/Install-VS_Code_Insiders-24bfa5?style=flat-square)](https://aka.ms/awesome-copilot/install/mcp-vscodeinsiders?name=dynatrace&config=%7B%22url%22%3A%22https%3A%2F%2Fpia1134d.dev.apps.dynatracelabs.com%2Fplatform-reserved%2Fmcp-gateway%2Fv0.1%2Fservers%2Fdynatrace-mcp%2Fmcp%22%2C%22headers%22%3A%7B%22Authorization%22%3A%22Bearer%20%24COPILOT_MCP_DT_API_TOKEN%22%7D%7D)<br />[![Install MCP](https://img.shields.io/badge/Install-Visual_Studio-C16FDE?style=flat-square)](https://aka.ms/awesome-copilot/install/mcp-visualstudio/mcp-install?%7B%22url%22%3A%22https%3A%2F%2Fpia1134d.dev.apps.dynatracelabs.com%2Fplatform-reserved%2Fmcp-gateway%2Fv0.1%2Fservers%2Fdynatrace-mcp%2Fmcp%22%2C%22headers%22%3A%7B%22Authorization%22%3A%22Bearer%20%24COPILOT_MCP_DT_API_TOKEN%22%7D%7D) |

docs/README.plugins.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-plugins) for guidelines on how t
3838
| [dataverse](../plugins/dataverse/README.md) | Comprehensive collection for Microsoft Dataverse integrations. Includes MCP setup commands. | 1 items | dataverse, mcp |
3939
| [dataverse-sdk-for-python](../plugins/dataverse-sdk-for-python/README.md) | Comprehensive collection for building production-ready Python integrations with Microsoft Dataverse. Includes official documentation, best practices, advanced features, file operations, and code generation prompts. | 4 items | dataverse, python, integration, sdk |
4040
| [devops-oncall](../plugins/devops-oncall/README.md) | A focused set of prompts, instructions, and a chat mode to help triage incidents and respond quickly with DevOps tools and Azure resources. | 3 items | devops, incident-response, oncall, azure |
41+
| [doublecheck](../plugins/doublecheck/README.md) | Three-layer verification pipeline for AI output. Extracts claims, finds sources, and flags hallucination risks so humans can verify before acting. | 2 items | verification, hallucination, fact-check, source-citation, trust, safety |
4142
| [edge-ai-tasks](../plugins/edge-ai-tasks/README.md) | Task Researcher and Task Planner for intermediate to expert users and large codebases - Brought to you by microsoft/edge-ai | 2 items | architecture, planning, research, tasks, implementation |
4243
| [flowstudio-power-automate](../plugins/flowstudio-power-automate/README.md) | Complete toolkit for managing Power Automate cloud flows via the FlowStudio MCP server. Includes skills for connecting to the MCP server, debugging failed flow runs, and building/deploying flows from natural language. | 3 items | power-automate, power-platform, flowstudio, mcp, model-context-protocol, cloud-flows, workflow-automation |
4344
| [frontend-web-dev](../plugins/frontend-web-dev/README.md) | Essential prompts, instructions, and chat modes for modern frontend web development including React, Angular, Vue, TypeScript, and CSS frameworks. | 4 items | frontend, web, react, typescript, javascript, css, html, angular, vue |

docs/README.skills.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-skills) for guidelines on how to
109109
| [dotnet-best-practices](../skills/dotnet-best-practices/SKILL.md) | Ensure .NET/C# code meets best practices for the solution/project. | None |
110110
| [dotnet-design-pattern-review](../skills/dotnet-design-pattern-review/SKILL.md) | Review the C#/.NET code for design pattern implementation and suggest improvements. | None |
111111
| [dotnet-upgrade](../skills/dotnet-upgrade/SKILL.md) | Ready-to-use prompts for comprehensive .NET framework upgrade analysis and execution | None |
112+
| [doublecheck](../skills/doublecheck/SKILL.md) | Three-layer verification pipeline for AI output. Extracts verifiable claims, finds supporting or contradicting sources via web search, runs adversarial review for hallucination patterns, and produces a structured verification report with source links for human review. | `assets/verification-report-template.md` |
112113
| [editorconfig](../skills/editorconfig/SKILL.md) | Generates a comprehensive and best-practice-oriented .editorconfig file based on project analysis and user preferences. | None |
113114
| [ef-core](../skills/ef-core/SKILL.md) | Get best practices for Entity Framework Core | None |
114115
| [entra-agent-user](../skills/entra-agent-user/SKILL.md) | Create Agent Users in Microsoft Entra ID from Agent Identities, enabling AI agents to act as digital workers with user identity capabilities in Microsoft 365 and Azure environments. | None |
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "doublecheck",
3+
"description": "Three-layer verification pipeline for AI output. Extracts claims, finds sources, and flags hallucination risks so humans can verify before acting.",
4+
"version": "1.0.0",
5+
"author": {
6+
"name": "Awesome Copilot Community"
7+
},
8+
"repository": "https://github.com/github/awesome-copilot",
9+
"license": "MIT",
10+
"keywords": [
11+
"verification",
12+
"hallucination",
13+
"fact-check",
14+
"source-citation",
15+
"trust",
16+
"safety"
17+
],
18+
"agents": [
19+
"./agents/doublecheck.md"
20+
],
21+
"skills": [
22+
"./skills/doublecheck/"
23+
]
24+
}

0 commit comments

Comments
 (0)