Skip to content
Automation
Skill

/evidence-based-rag

Evidence-first retrieval over a specified knowledge base: cited evidence, conflict detection, and an explicit sufficiency, confidence, and risk verdict on whether the answer is safe to act on.

From plugin
xagent
3079 skills

Claude Code

$ npx -y skills add xorbitsai/xagent --skill evidence-based-rag --agent claude-code

SKILL.md

evidence-based-rag.SKILL.md
description: |
  Evidence-first retrieval over a specified knowledge base: cited evidence,
  conflict detection, and an explicit sufficiency, confidence, and risk verdict
  on whether the answer is safe to act on.
when_to_use: |
  Knowledge base Q&A, fact-checking, evidence verification, due diligence, or
  compliance review needing source attribution. Not for casual chat, creative
  writing, or answers that need no citations.

Evidence-Based RAG

Overview

`evidence_based_rag` is an **evidence-first retrieval-augmented reasoning skill** designed to retrieve, extract, and organize factual information from a specified knowledge base in support of **decision-critical scenarios** (e.g., due diligence, compliance review, research analysis).

The responsibility of this skill is to produce **traceable, verifiable, and auditable findings**, while explicitly surfacing conflicts and uncertainty signals. It does **not** perform business judgments or replace human decision-making.

---

Skill Responsibility

This skill is responsible for:

  • Retrieving relevant information from a specified knowledge base
  • Transforming raw text into verifiable evidence units
  • Detecting conflicting claims related to the same factual question
  • Evaluating answer sufficiency and confidence
  • Explicitly surfacing uncertainty and risk signals, along with suggested follow-up actions

This skill is **not responsible for**:

  • Arbitrating between conflicting claims
  • Making investment, legal, or business decisions
  • Controlling workflow execution (e.g., retries, looping, escalation)

---

Design Invariants

The following invariants must hold in any execution environment:

1. **Evidence-bound**

  • All key conclusions must be supported by evidence from the knowledge base
  • No external knowledge or common-sense assumptions may be introduced

2. **Traceability**

  • Every material claim must be traceable to a specific location in the original source

(document name, page, section, paragraph, line, or clause)

3. **Non-assumptive**

  • Insufficient or conflicting evidence must be explicitly marked as uncertain
  • No gap-filling based on plausibility, convention, or experience

4. **Conflict-aware**

  • Multiple conflicting claims about the same fact must be surfaced with their citations
  • Conflicts are treated as risk signals, not automatically resolved

5. **Agentic-compatible**

  • Outputs must expose structured signals usable by downstream agents or humans:

`confidence`, `sufficient`, `conflicts`, `suggested_next_actions`

6. **Subject Existence** (Hard Gate)

  • A conclusion MUST NOT be produced unless at least one candidate subject that explicitly matches the query subject class is identified in the knowledge base
  • If no such subject is found, the system MUST return `sufficient = false` and MUST NOT substitute semantically similar subjects
  • "I don't know" is a valid capability in agent systems; "hard answering" under subject absence is a defect
  • This invariant prevents semantic fallback under subject absence
  • Applies universally to all subject types: entities, individuals, products, locations, time periods, jurisdictions, etc.

7. **Entity Binding**

  • A candidate subject MUST have an explicit and verifiable binding to the parent entity specified in the query subject class
  • Role or title similarity alone is insufficient
  • Valid binding mechanisms: ownership, registration, contractual role, or explicit statement in source text
  • If the parent entity relationship cannot be explicitly established from the knowledge base, the subject MUST NOT be considered a valid candidate
  • This invariant prevents accepting subjects that "look like" matches but lack the required entity relationship

8. **Subject-Evidence Integrity**

  • Any evidence used to support a conclusion MUST explicitly confirm that the subject of the evidence matches the subject of the query
  • If subject identity or scope cannot be unambiguously established, the evidence MUST NOT be used to support the conclusion
  • Subject drift is a critical error that invalidates the entire conclusion
  • This invariant applies universally: companies, individuals, products, locations, time periods, jurisdictions, legal entities, or any other subject type

---

When to Use

Use this skill when the task requires:

  • **Knowledge base Q&A** - Answering questions based on specific documents or knowledge bases with source attribution
  • **Evidence verification** - Retrieving and verifying factual claims from documents
  • **Due diligence queries** - Investigating facts from multiple sources with conflict detection
  • **Multi-source analysis** - Synthesizing information from multiple documents with explicit citations
  • **Fact-checking** - Verifying claims against source documents

Typical use cases include:

  • Knowledge base queries requiring evidence traceability
  • Document analysis with source attribution
  • Compliance or legal document review
  • Research analysis and fact verification

Not suitable for:

  • Casual or conversational generation tasks
  • Queries that do not require source attribution or traceability
  • Creative writing or brainstorming tasks

---

Inputs & Outputs

This skill does **not** impose a fixed schema on inputs or outputs.

  • Inputs are organized by the calling Agent or runtime (e.g., question, knowledge base scope, constraints).
  • Outputs aim to be **structured and machine-consumable**, but concrete field shapes are determined by the integration context.

Core invariants enforced by the skill:

  • All conclusions must be evidence-backed
  • Conflicts, uncertainty, and risk signals must be explicitly surfaced

---

Execution State Machine

This skill implements a **strict, irreversible state machine** to eliminate non-deterministic execution paths.

States

stateDiagram-v2
    [*] --> INIT
    INIT --> SUBJECT_CLASS_IDENTIFIED
    SUBJECT_CLASS_IDENTIFIED --> CA
Read more
@xorbitsai
Ships withxagent

Start with a personal agent. Scale into an AI workforce. Xagent helps individuals complete real tasks, teams publish reusable agents, and enterprises run agent systems with their own tools, models, knowledge, and infrastructure — without brittle workflows.

Stars on GitHub

Momentum

stars in total
307
Star history of xorbitsai/xagent on GitHub, a chart by star-history.com

Other skills on xagent.

agent-builder

agent-builder

Expert AI Agent Builder skill. Helps users dynamically create, configure, and build custom AI agents with specific capabilities,…

@xorbitsai@xorbitsaiInstall Skill
docx-report-editorial

docx-report-editorial

A native .docx styled as an editorial report: "Word report", "Word 文档", "memo", "proposal", "研究报告". Opens cleanly in Word /…

@xorbitsai@xorbitsaiInstall Skill
html-deck-editorial

html-deck-editorial

One self-contained HTML slide deck with magazine-grade editorial styling: "html deck", "editorial slides", "美观 PPT", "网页版幻灯片".…

@xorbitsai@xorbitsaiInstall Skill
pdf-report-editorial

pdf-report-editorial

An editorial-styled PDF report rendered from HTML via the browser: "PDF report", "whitepaper", "executive brief", "research…

@xorbitsai@xorbitsaiInstall Skill
pptx-editorial

pptx-editorial

A native .pptx deck with magazine-grade editorial styling: "pitch deck", "投资人路演 PPT", "美观 PPT", board review, product launch.…

@xorbitsai@xorbitsaiInstall Skill
presentation-generator

presentation-generator

Create, read, or edit PowerPoint .pptx files: slide decks from scratch, content extraction, templates, speaker notes, combining…

@xorbitsai@xorbitsaiInstall Skill

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about evidence-based-rag.

Which coding agents can use evidence-based-rag?
evidence-based-rag installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.