mirror of
https://github.com/voson-wang/toon.git
synced 2026-01-29 23:34:10 +08:00
test: add LLM retrieval accuracy tests
This commit is contained in:
35
benchmarks/src/types.ts
Normal file
35
benchmarks/src/types.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
export interface Dataset {
|
||||
name: string
|
||||
description: string
|
||||
data: any
|
||||
}
|
||||
|
||||
export interface Question {
|
||||
id: string
|
||||
prompt: string
|
||||
groundTruth: string
|
||||
type: 'field-retrieval' | 'aggregation' | 'filtering' | 'comparison'
|
||||
dataset: string
|
||||
}
|
||||
|
||||
export interface EvaluationResult {
|
||||
questionId: string
|
||||
format: string
|
||||
model: string
|
||||
expected: string
|
||||
actual: string
|
||||
correct: boolean
|
||||
inputTokens: number
|
||||
outputTokens: number
|
||||
latencyMs: number
|
||||
}
|
||||
|
||||
export interface FormatResult {
|
||||
format: string
|
||||
accuracy: number
|
||||
totalTokens: number
|
||||
avgInputTokens: number
|
||||
avgLatency: number
|
||||
correctCount: number
|
||||
totalCount: number
|
||||
}
|
||||
Reference in New Issue
Block a user