File size: 4,077 Bytes
acb327b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fc58aef
acb327b
 
 
 
 
 
 
 
 
 
 
 
 
 
fc58aef
acb327b
 
 
 
 
 
 
 
 
fc58aef
acb327b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: echo-ultimate
title: "🪞 ECHO ULTIMATE — Training LLMs to Know What They Don't Know"
description: |
  ECHO ULTIMATE is the first OpenEnv environment for metacognitive calibration training.
  An LLM learns to accurately predict its own probability of being correct across 7 domains
  and is rewarded for honesty, not just accuracy.

  Key innovations:
  - 7-domain task bank (Math, Logic, Factual, Science, Medical, Coding, Creative)
  - 5 calibration metrics: ECE, MCE, Brier Score, Sharpness, Resolution
  - Self-consistency confidence adjustment (multi-sample uncertainty estimation)
  - Epistemic Fingerprint: radar chart visualization of domain-level calibration
  - 3-phase curriculum: easy  cross-domain  adversarial hallucination resistance
  - Graduated penalty: -0.60 overconfident, -0.80 hallucination (conf≥95 AND wrong)

version: "2.0.0"
license: "MIT"
authors:
  - name: "Revtiraman Tripathi"
    email: "revtiraman1234@gmail.com"
  - name: "Vikas Dev Pandey"

tags:
  - openenv
  - metacognition
  - calibration
  - anti-hallucination
  - reinforcement-learning
  - epistemic-uncertainty
  - grpo

tasks:
  - id: task_easy
    name: "Calibration Fundamentals"
    description: "30 easy questions across 7 domains — demonstrate basic confidence calibration"
    pass_threshold: 0.70
    metric: "max(0, 1-ECE) × min(1, accuracy/0.55)"

  - id: task_medium
    name: "Domain-Aware Calibration"
    description: "30 medium questions — confidence must vary meaningfully across domains"
    pass_threshold: 0.60
    metric: "(1-ECE) × min(1, domain_conf_std/15)"

  - id: task_hard
    name: "Anti-Hallucination Robustness"
    description: "30 adversarial questions with deliberate misconceptions — must resist overconfidence"
    pass_threshold: 0.50
    metric: "(1-overconfidence_rate) × (1 - hallucination_rate×3)"

environment:
  type: "text-based"
  observation: "question + domain + difficulty + running calibration metrics (ECE, accuracy, domain_ece)"
  action: "<confidence>INTEGER_0_TO_100</confidence><answer>TEXT</answer>"
  episodes_per_task: 30
  max_steps_per_episode: 1
  domains: [math, logic, factual, science, medical, coding, creative]
  difficulties: [easy, medium, hard]

reward:
  range: [-1.5, 2.0]
  formula: "0.40 * accuracy + 0.40 * brier_reward + overconfidence_penalty + underconfidence_penalty"
  components:
    accuracy:
      weight: 0.40
      description: "Domain-aware correctness. Math: ±1%=0.8, ±5%=0.5. Others: fuzzy match."
    brier_calibration:
      weight: 0.40
      description: "1 - 2*(confidence/100 - outcome)^2. Range [-1,1]. Perfect=1.0."
    overconfidence_penalty:
      weight: 0.20
      description: "-0.60 if conf≥80 AND wrong. -0.80 if conf≥95 AND wrong (hallucination)."
    underconfidence_penalty:
      description: "-0.10 if conf≤20 AND correct."

calibration_metrics:
  ece: "Expected Calibration Error — primary metric (lower=better)"
  mce: "Maximum Calibration Error — worst-bin error"
  brier: "Mean squared probability error — overall calibration"
  sharpness: "Variance of predicted probabilities — decisiveness"
  resolution: "How much predictions differ from base rate — informativeness"

api:
  base_url: "https://vikaspandey582003-echo-ultimate.hf.space"
  endpoints:
    health:     "GET  /health"
    tasks:      "GET  /tasks"
    reset:      "POST /reset"
    step:       "POST /step"
    state:      "GET  /state"
    metrics:    "GET  /metrics"
    metrics_domain: "GET /metrics/{domain}"
    fingerprint: "GET /fingerprint"
    history:    "GET  /history"
    docs:       "GET  /docs"

training:
  algorithm: "GRPO (Group Relative Policy Optimization)"
  model: "unsloth/Qwen2.5-7B-Instruct"
  total_steps: 5800
  phases: 3
  framework: "HuggingFace TRL ≥ 0.9.0"

citation: |
  @misc{echo-ultimate-2025,
    title  = {ECHO ULTIMATE: Training LLMs to Know What They Don't Know},
    author = {Tripathi, Revtiraman and Pandey, Vikas Dev},
    year   = {2025},
    url    = {https://huggingface.co/spaces/Vikaspandey582003/echo-ultimate}
  }