()
| 377 | } |
| 378 | |
| 379 | func (ts *ToolStats) SuccessRate() float64 { |
| 380 | if ts.TotalCalls == 0 { |
| 381 | return 0.5 |
| 382 | } |
| 383 | return float64(ts.Successes) / float64(ts.TotalCalls) |
| 384 | } |
| 385 | |
| 386 | func (ts *ToolStats) Confidence() float64 { |
| 387 | // Cap at log scale to prevent high-history tools from dominating. |