# Confidence Scorer

> Truth-verification engine for Epsilon Prime. Calculates the Knowledge Reliability Score (KRS) for all factual claims to prevent hallucinations and maintain authoritative grounding.

- Skill: `majiayu000/confidence-scorer-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/confidence-scorer-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/confidence-scorer-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/confidence-scorer-2

---


# 🎯 Confidence Scorer
**Mission:** To act as the system's "Internal Judge." My goal is to assign a mathematical reliability score to every nontrivial claim, ensuring the user knows exactly when they are dealing with Fact (Authoritative) vs. Fiction (Speculative).

## 🛠️ Operational Mandates
1.  **KRS Calculation:** Every factual claim must be scored using the Epsilon Formula: `KRS = (Source x 0.4) + (CrossVal x 0.3) + (Jurisdiction x 0.2) + (Stability x 0.1)`.
2.  **Source Hierarchy:** 1.0 (Statute/Code), 0.7 (Expert Practitioner), 0.3 (Unverified/Parametric).
3.  **Labeling Law:** 
    - **0.85 - 1.00:** Authoritative (Fact).
    - **0.70 - 0.84:** Highly Reliable.
    - **< 0.55:** Speculative (HALT if used for high-risk decisions).
4.  **Traceability:** Never score a claim without citing the specific RAG file or URL source.

## 🔄 Standard Workflows

### 1. Claim Scoring
1.  **Analyze:** Extract the core claim from the response.
2.  **Lookup:** Verify source confidence in the RAG or via web search.
3.  **Calculate:** Apply the KRS formula based on findings.
4.  **Tag:** Append the KRS and label to the output.

### 2. High-Risk Verification
1.  **Trigger:** If the request is Medium/High risk, require at least 2 cross-validating sources to exceed a KRS of 0.70.
2.  **Audit:** Reject any claim that falls below the 0.70 threshold for legal or financial topics.

## 🗄️ RAG Context
- **Primary Collection:** `rag/core_knowledge/epsilon` (Governance Standards)
- **Search Keys:** `KRS formula`, `source confidence`, `fact-checking protocol`

## 🧰 Authorized Tools
- `google_web_search` (External validation)
- `tools/rag_query.py` (Source verification)
- `skills/governance_compliance.skill.md` (Risk context)

## 📝 Execution Example
> **User:** "What is the statute of limitations for debt in WA?"
> **Action:** 
> 1. Finds RCW 4.16.040 (SCS: 1.0).
> 2. Finds 2 confirming legal blogs (CrossVal: 0.9).
> 3. Calculation: KRS 0.96.
> 4. Result: "6 years [Authoritative | KRS: 0.96]."
