MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / winnerOf

Function winnerOf

graph-ui/tools/eval-llm.mjs:625–649  ·  view source on GitHub ↗
(modelClass)

Source from the content-addressed store, hash-verified

623 * ist schlicht das bessere.
624 */
625 const winnerOf = (modelClass) => {
626 const field = models.filter((model) => model.modelClass === modelClass);
627 if (field.length === 0) {
628 return undefined;
629 }
630 const ranked = [...field].sort((a, b) =>
631 (b.passRate - a.passRate)
632 || (b.citationCompliance - a.citationCompliance)
633 || (b.meanTokPerSec - a.meanTokPerSec));
634 const winner = ranked[0];
635 const runnerUp = ranked[1];
636 return {
637 name: winner.name,
638 file: winner.file,
639 passRate: winner.passRate,
640 citationCompliance: winner.citationCompliance,
641 meanTokPerSec: winner.meanTokPerSec,
642 begruendung: runnerUp === undefined
643 ? `einziger Kandidat der Klasse ${modelClass}.`
644 : `passRate ${winner.passRate} gegen ${runnerUp.passRate} (${runnerUp.name}); `
645 + `Zitattreue ${winner.citationCompliance} gegen ${runnerUp.citationCompliance}; `
646 + `${winner.meanTokPerSec} gegen ${runnerUp.meanTokPerSec} tok/s. `
647 + 'Score ist die Trefferquote, Gleichstand entscheidet die Zitattreue, dann das Tempo.',
648 };
649 };
650
651 const report = {
652 temperature: 0,

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected