docs: update benchmark reports' readability

This commit is contained in:
Johann Schopplich
2025-10-27 14:18:37 +01:00
parent 05b3d43023
commit b9f54ba585
7 changed files with 82 additions and 82 deletions

View File

@@ -1,5 +1,3 @@
/* eslint-disable no-console */
/**
* Question generation for TOON benchmarks
*
@@ -12,6 +10,7 @@
*/
import type { Question } from './types'
import { consola } from 'consola'
import { datasets } from './datasets'
/**
@@ -387,12 +386,14 @@ export function generateQuestions(): Question[] {
}
}
console.log(`📊 Question breakdown:`)
console.log(` Tabular: ${questions.filter(q => q.dataset === 'tabular').length}`)
console.log(` Nested: ${questions.filter(q => q.dataset === 'nested').length}`)
console.log(` Analytics: ${questions.filter(q => q.dataset === 'analytics').length}`)
console.log(` GitHub: ${questions.filter(q => q.dataset === 'github').length}`)
console.log(` Total: ${questions.length}`)
consola.info(`Question breakdown:`)
consola.box(`
Tabular: ${questions.filter(q => q.dataset === 'tabular').length}
Nested: ${questions.filter(q => q.dataset === 'nested').length}
Analytics: ${questions.filter(q => q.dataset === 'analytics').length}
GitHub: ${questions.filter(q => q.dataset === 'github').length}
Total: ${questions.length}
`.trim())
return questions
}

View File

@@ -94,7 +94,7 @@ export function generateMarkdownReport(
// Build summary comparison
const summaryComparison = toon && json
? `**Tradeoff:** TOON achieves ${(toon.accuracy * 100).toFixed(1)}% accuracy (vs JSON's ${(json.accuracy * 100).toFixed(1)}%) while using ${((1 - toon.totalTokens / json.totalTokens) * 100).toFixed(1)}% fewer tokens.`
? `**Advantage:** TOON achieves **${(toon.accuracy * 100).toFixed(1)}% accuracy** (vs JSON's ${(json.accuracy * 100).toFixed(1)}%) while using **${((1 - toon.totalTokens / json.totalTokens) * 100).toFixed(1)}% fewer tokens**.`
: ''
// Build performance by dataset