package tldrbench import "strconv" func fmtFloat(f float64, prec int) string { return strconv.FormatFloat(f, 'f', prec, 64) } const pageHTML = ` /tldr benchmark
/tldr benchmark · local · {{.When.Format "2006-01-02 15:04"}}

{{len .Models}} model{{if ne (len .Models) 1}}s{{end}}, {{len .Variants}} prompt{{if ne (len .Variants) 1}}s{{end}}

Chat: {{.Chat.Source}}, {{.Chat.Messages}} messages, {{.Chat.Kept}} kept after trimming, {{.Chat.InputChars}} characters in {{.Chat.Chunks}} chunk{{if ne .Chat.Chunks 1}}s{{end}}{{if .Chat.Truncated}} (the transcript was truncated by the size limit){{end}}. {{.Threads}} threads. This page is self-contained and makes no network requests.

{{if .BestModel}}
Best on this chat

{{.BestModel}} with prompt {{.BestVar}} got the most facts, preferring the faster one on a tie.

{{end}}

Summary

Per cell: facts found{{if .Facts}} (out of {{len .Facts}}){{else}} (no facts file, so only the checks below){{end}}, average seconds to finish, seconds to the first text, and flags.

{{range .Models}}{{end}} {{range .Rows}} {{range .Cells}}{{end}}{{end}}
Prompt{{.}}
{{.Variant}}{{if eq .Runs 0}}not run{{else if eq .Runs .Failed}}failed{{else}} {{if .HasFacts}}{{f1 .Facts}} of {{.FactsTotal}}{{else}}{{f1 .Invented}} invented{{end}}
{{sec .Seconds}} s{{if gt .FirstText 0.0}} · first text {{sec .FirstText}} s{{end}}{{if .Flags}}
{{range $i, $f := .Flags}}{{if $i}}, {{end}}{{$f}}{{end}}{{end}}{{end}}
{{if .FactGrid}}

Which facts each prompt got

Each cell is how many of that cell's runs got the fact right.

{{range .Facts}}{{end}} {{range .FactGrid}} {{range .Rows}}{{$runs := .Runs}}{{range .Hits}}{{end}}{{end}}{{end}}
Prompt{{.}}
{{.Model}}
{{.Variant}}{{.}}
{{end}} {{if .HasText}}

Every run

Outputs exactly as returned.

{{range .RunsSorted}}
{{.Model}} · {{.Variant}} · run {{.N}}{{if .Error}}failed{{else}}{{sec .Seconds}} s{{if .Missed}} · missed: {{range $i, $m := .Missed}}{{if $i}}, {{end}}{{$m}}{{end}}{{end}}{{if .Invented}} · numbers not in the chat: {{range $i, $m := .Invented}}{{if $i}}, {{end}}{{$m}}{{end}}{{end}}{{end}}
{{if .Error}}{{.Error}}{{else}}{{.Output}}{{end}}
{{end}}
{{end}}

"Numbers not in the chat" lists figures the overview wrote that appear nowhere in the transcript: a cheap check for invented details. "May be cut off" means the text ends without punctuation, usually the token limit. Facts pass only when one bullet holds all of the fact's details.

`