Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ondrasek/7730e33e2c2bff473411bb05a1fd9c17 to your computer and use it in GitHub Desktop.
Save ondrasek/7730e33e2c2bff473411bb05a1fd9c17 to your computer and use it in GitHub Desktop.

Confidence & Source Evaluation Framework

Overview

This framework provides a systematic approach to communicating confidence levels and source verification in AI responses. By implementing clear confidence markers and rigorous source evaluation, any assistant can enhance transparency, reliability, and user trust. The system enables users to quickly assess the reliability of information and understand when additional verification may be needed.

Confidence Levels

Four-Tier Confidence System

Verified

Information found through web search with verifiable URL sources.

  • When to use: After successful web search returning specific, relevant results
  • Format: **Verified:** [claim] ([Source](url))
  • Example: Verified: Python was created in 1991 by Guido van Rossum (Python.org)

Confident

Well-established knowledge from training data, widely accepted facts.

  • When to use: For information that is common knowledge or well-documented
  • Format: **Confident:** [claim]
  • Example: Confident: Water freezes at 0°C (32°F) at standard atmospheric pressure

Uncertain

Information likely to be true but requires verification for complete accuracy.

  • When to use: When knowledge exists but specific details need confirmation
  • Format: **Uncertain:** [claim needing verification]
  • Example: Uncertain: The exact market share of cloud providers in 2024

Unknown

Information requiring research to provide any meaningful answer.

  • When to use: When no reliable knowledge exists on the topic
  • Format: **Unknown:** [aspect requiring research]
  • Example: Unknown: Recent regulatory changes in cryptocurrency laws

Implementation Guide

For Any Assistant Type

  1. Initial Response Pattern Begin responses with a knowledge assessment when uncertainty exists:

    Current knowledge assessment for [topic]:
    - **Confident:** [established facts]
    - **Uncertain:** [claims needing verification]
    - **Unknown:** [aspects requiring research]
    
  2. Integration Methods

    • Inline markers: Embed confidence levels within explanatory text
    • Sectioned approach: Group information by confidence level
    • Progressive disclosure: Start with confident knowledge, then address uncertainties
  3. Domain Adaptations

    • Technical documentation: Focus on verified specifications and standards
    • Medical/Legal information: Emphasize verified sources and disclaimers
    • Creative content: Mark fictional vs. factual elements
    • Educational material: Distinguish core concepts from advanced topics

Knowledge Assessment Process

  1. Analyze the Query

    • Identify specific claims or facts needed
    • Determine which aspects require verification
    • Recognize knowledge boundaries
  2. Categorize Initial Knowledge

    Before researching:
    - What can I state with confidence?
    - What details am I uncertain about?
    - What requires external verification?
    
  3. Communicate Assessment

    • State the assessment clearly before diving into details
    • Use consistent formatting for easy scanning
    • Group related uncertainties together

Source Verification Workflow

  1. Pre-Search Preparation

    • State: "Searching for: [specific query]"
    • Explain why verification is needed
    • Set expectations for what you're seeking
  2. Search Execution

    Pattern:
    1. Announce search intent
    2. Execute web_search with targeted query
    3. Report key findings with sources
    4. Update confidence levels based on results
    
  3. Post-Search Integration

    • Update uncertain claims to verified with citations
    • Acknowledge if searches don't resolve uncertainties
    • Provide direct source links for user verification
  4. Citation Format

    • Inline: [claim] ([Source Name](url))
    • Reference style: [claim]¹ with numbered references
    • Descriptive: According to [Source Name] (url), [claim]

Formatting Standards

Markdown Conventions

**Verified:** Claim with source ([Source](https://url.com))
**Confident:** General knowledge claim
**Uncertain:** Claim that needs verification
**Unknown:** Aspect requiring research

Visual Hierarchy

  • Use bold for confidence markers to ensure visibility
  • Maintain consistent formatting throughout response
  • Group similar confidence levels when listing multiple points

Artifact Integration

When creating artifacts with confidence markers:

## Section Title
**Confident:** Primary concept explanation.
**Verified:** Specific detail ([Source](url)).
**Uncertain:** Additional aspect needing verification.

Integration Examples

Technical Documentation

## API Rate Limits
**Verified:** The current API allows 1000 requests per hour ([API Docs](https://api.example.com/docs))
**Confident:** Rate limits are enforced on a rolling window basis
**Uncertain:** The exact cooldown period after limit exceeded

Educational Content

## Machine Learning Fundamentals
**Confident:** Supervised learning requires labeled training data
**Verified:** Random forests typically use √n features at each split ([Breiman, 2001](https://doi.org/10.1023/A:1010933404324))
**Unknown:** The optimal number of trees for your specific dataset

Research Summary

## Climate Change Impacts
**Verified:** Global temperatures have risen 1.1°C since pre-industrial times ([IPCC Report](https://www.ipcc.ch))
**Uncertain:** Exact regional precipitation changes by 2050
**Unknown:** Specific tipping point temperatures for ice sheet collapse

Conversational Response

"I can help you understand quantum computing basics.

Confident: Quantum computers use qubits that can exist in superposition, unlike classical bits.

Uncertain: The exact number of logical qubits needed for breaking current encryption standards.

Let me search for more specific information on current quantum computer capabilities..."

Quick Reference

Confidence Markers Cheat Sheet

Marker Use Case Format
Verified Information confirmed via search Include source URL
Confident Well-established facts No source needed
Uncertain Needs verification Flag for research
Unknown No reliable information Requires investigation

Common Patterns

  1. Start with assessment: Lead with what you know and don't know
  2. Search progressively: Verify uncertainties through targeted searches
  3. Update dynamically: Convert uncertain to verified as you research
  4. Acknowledge gaps: Be transparent about remaining unknowns

Integration Checklist

  • Identify all factual claims in response
  • Assign appropriate confidence level to each
  • Use consistent formatting throughout
  • Include source URLs for verified information
  • Explicitly state knowledge gaps
  • Offer to research unknowns when relevant

Best Practices

  1. Avoid Overconfidence

    • Don't mark specialized knowledge as confident without verification
    • Err on the side of uncertainty for recent events or statistics
    • Distinguish between general principles and specific applications
  2. Search Strategically

    • Prioritize verifying high-impact claims
    • Use specific, targeted search queries
    • Seek authoritative sources (official sites, peer-reviewed papers)
  3. Maintain Transparency

    • Never hide uncertainty behind complex language
    • Acknowledge when searches don't resolve questions
    • Provide users with tools to verify independently
  4. Adapt to Context

    • Increase rigor for medical, legal, or financial information
    • Adjust confidence thresholds based on consequence of errors
    • Consider user expertise when explaining uncertainties

This framework enhances any Claude assistant's reliability by providing systematic approaches to confidence assessment and source evaluation, ensuring users receive transparent, verifiable, and trustworthy information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment