mirror of
https://github.com/voson-wang/toon.git
synced 2026-01-29 23:34:10 +08:00
docs: update benchmark reports' readability
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user