get_leaderboard
Retrieve ranked performance results for AI explanation methods on specified datasets and metrics to compare evaluation outcomes.
Instructions
Get leaderboard results for explanation methods
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | No | Dataset name to get leaderboard for | |
| metric | No | Metric to sort leaderboard by |
Implementation Reference
- index.js:817-845 (handler)The main handler function for the 'get_leaderboard' tool. It returns a hardcoded sample leaderboard with rankings of various explanation methods based on the provided dataset and metric parameters.async getLeaderboard(dataset, metric) { const sampleLeaderboard = { dataset: dataset || 'german', metric: metric || 'PGI', rankings: [ { rank: 1, method: 'SHAP', score: 0.87, model: 'XGBoost' }, { rank: 2, method: 'LIME', score: 0.82, model: 'XGBoost' }, { rank: 3, method: 'Integrated Gradients', score: 0.78, model: 'Neural Network' }, { rank: 4, method: 'Gradient × Input', score: 0.75, model: 'Neural Network' }, { rank: 5, method: 'Guided Backprop', score: 0.71, model: 'Neural Network' } ], updated: new Date().toISOString() }; return { content: [ { type: 'text', text: `OpenXAI Leaderboard\n\n` + `Dataset: ${sampleLeaderboard.dataset}\n` + `Metric: ${sampleLeaderboard.metric}\n` + `Last Updated: ${sampleLeaderboard.updated}\n\n` + `Rankings:\n` + JSON.stringify(sampleLeaderboard.rankings, null, 2) + `\n\nNote: This is a sample leaderboard. Visit https://open-xai.github.io/ for actual leaderboard data.` } ] }; }
- index.js:202-215 (schema)Input schema definition for the get_leaderboard tool, specifying optional dataset and metric parameters.inputSchema: { type: 'object', properties: { dataset: { type: 'string', description: 'Dataset name to get leaderboard for' }, metric: { type: 'string', description: 'Metric to sort leaderboard by' } }, required: [] }
- index.js:279-280 (registration)Registration of the get_leaderboard tool handler in the CallToolRequestSchema switch statement, dispatching calls to the getLeaderboard method.case 'get_leaderboard': return await this.getLeaderboard(args.dataset, args.metric);
- index.js:199-216 (registration)Tool registration in the ListToolsRequestSchema response, including name, description, and input schema.{ name: 'get_leaderboard', description: 'Get leaderboard results for explanation methods', inputSchema: { type: 'object', properties: { dataset: { type: 'string', description: 'Dataset name to get leaderboard for' }, metric: { type: 'string', description: 'Metric to sort leaderboard by' } }, required: [] } },