Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(benchmark): use completed_examples in YAML export accuracy fraction (#3461)

LearningCircuitc01b5fdaf7e7
diff --git a/src/local_deep_research/web/templates/pages/benchmark_results.html b/src/local_deep_research/web/templates/pages/benchmark_results.html
index 6e9b1019f5..36d4bbe2aa 100644
--- a/src/local_deep_research/web/templates/pages/benchmark_results.html
+++ b/src/local_deep_research/web/templates/pages/benchmark_results.html
@@ -628,7 +628,10 @@ async function downloadBenchmarkYAML(runId, includeExamples = false) {
// Map canonical IDs to display names
const datasetDisplayNames = {simpleqa: 'SimpleQA', browsecomp: 'BrowseComp', xbench_deepsearch: 'xbench-DeepSearch'};
const datasetName = datasetDisplayNames[dataset] || dataset;
- const correctCount = run.overall_accuracy ? Math.round(run.overall_accuracy * run.total_examples / 100) : 0;
+ // Use completed_examples (actual evaluated) rather than total_examples (planned)
+ // so the accuracy fraction and question count reflect reality.
+ const evaluated = run.completed_examples || run.total_examples;
+ const correctCount = run.overall_accuracy ? Math.round(run.overall_accuracy * evaluated / 100) : 0;
// Generate compact YAML — data only, no empty placeholders
let yamlContent = `model: ${modelName}
@@ -636,9 +639,9 @@ model_provider: ${run.search_config?.provider || 'unknown'}
search_engine: ${run.search_config?.search_tool || 'unknown'}
${avgSearchResults !== 'N/A' ? `average_results_per_query: ${avgSearchResults}\n` : ''}results:
dataset: ${datasetName}
- total_questions: ${run.total_examples}
+ total_questions: ${evaluated}
${strategy}:
- accuracy: "${run.overall_accuracy ? run.overall_accuracy.toFixed(1) : 0}% (${correctCount}/${run.total_examples})"
+ accuracy: "${run.overall_accuracy ? run.overall_accuracy.toFixed(1) : 0}% (${correctCount}/${evaluated})"
iterations: ${run.search_config?.iterations || 'N/A'}
questions_per_iteration: ${run.search_config?.questions_per_iteration || 'N/A'}
avg_time_per_question: "${formatAvgProcessingTime(run)}"