Abhaykoul commited on
Commit
6a535ec
·
verified ·
1 Parent(s): d3127b0

Upload 2 files

Browse files
Files changed (2) hide show
  1. benchmark.py +573 -0
  2. benchmark_results.json +1872 -0
benchmark.py ADDED
@@ -0,0 +1,573 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Vortexa Indexer Benchmark — VTX Codebase
4
+ =========================================
5
+ Benchmarks TWO embedding models from the vortexa library on the VTX codebase:
6
+
7
+ Model A: VTXAI/vtx-embed-1M (LF4Embedder — 4-bit static nano, ~1 MB, fastest)
8
+ Model B: VTXAI/vtx-embed-7M (LF4Embedder — 4-bit static mini, ~7 MB, default)
9
+
10
+ Metrics reported per model
11
+ - Indexing time (ms)
12
+ - Peak RAM usage during index (MB)
13
+ - Number of files indexed
14
+ - Number of chunks produced
15
+ - Chunk config (size / overlap)
16
+ - Model size / embedding dim
17
+ - Per-query latency (mean / p50 / p95 / p99)
18
+ - R@1 — query-level: was the ground-truth file ranked #1?
19
+ - R@5 — query-level: was the ground-truth file in top-5?
20
+ - R@10 — query-level: was the ground-truth file in top-10?
21
+
22
+ 30-query test set is hand-crafted from real VTX source symbols and concepts.
23
+
24
+ Usage:
25
+ uv run python benchmark.py
26
+ uv run python benchmark.py --root /path/to/other/codebase
27
+ uv run python benchmark.py --alpha 0.7 # override hybrid weight
28
+ uv run python benchmark.py --no-m2v # skip Model2Vec (faster)
29
+ """
30
+
31
+ from __future__ import annotations
32
+
33
+ import argparse
34
+ import gc
35
+ import json
36
+ import shutil
37
+ import sys
38
+ import tempfile
39
+ import time
40
+ from dataclasses import asdict, dataclass, field
41
+ from pathlib import Path
42
+ from typing import Any
43
+
44
+ # ── stdlib resource tracking ─────────────────────────────────────────────────
45
+ try:
46
+ import resource as _resource
47
+
48
+ def _peak_rss_mb() -> float:
49
+ """Peak resident-set-size in MB (Linux/macOS)."""
50
+ return _resource.getrusage(_resource.RUSAGE_SELF).ru_maxrss / 1024
51
+
52
+ except ImportError: # Windows
53
+
54
+ def _peak_rss_mb() -> float:
55
+ try:
56
+ import psutil
57
+
58
+ return psutil.Process().memory_info().rss / 1024 / 1024
59
+ except Exception:
60
+ return 0.0
61
+
62
+
63
+ # ── vortexa imports ───────────────────────────────────────────────────────────
64
+ try:
65
+ from vortexa.core.embedding import LF4Embedder, Model2VecEmbedder
66
+ from vortexa.core.indexer import CodebaseIndexer
67
+ from vortexa.core.types import ChunkConfig, IndexStats
68
+ except ModuleNotFoundError as exc:
69
+ sys.exit(
70
+ f"\n[ERROR] Could not import vortexa: {exc}\n\n"
71
+ "vortexa must be available in the SAME Python environment used to run this\n"
72
+ "script. The simplest ways:\n\n"
73
+ " # Recommended — uv injects vortexa into a fresh env at runtime:\n"
74
+ " uv run --with vortexa python benchmark.py\n\n"
75
+ " # Or add it to the project venv permanently:\n"
76
+ " uv add --dev vortexa\n"
77
+ " uv run python benchmark.py\n\n"
78
+ "Do NOT run with .venv/bin/python directly; that venv lacks vortexa.\n"
79
+ )
80
+
81
+ # ═════════════════════════════════════════════════════════════════════════════
82
+ # 30-Query Test Suite
83
+ # Each entry: (query_text, expected_file_substring_or_None, description)
84
+ # expected_file = None → query is "open", we still measure latency but skip R@k
85
+ # expected_file = str → ground truth: result.chunk.file_path must CONTAIN this
86
+ # ═════════════════════════════════════════════════════════════════════════════
87
+ QUERIES: list[tuple[str, str | None, str]] = [
88
+ # ── Core agent runner ──────────────────────────────────────────────────
89
+ ("agent runner main loop execution", "agent_runner", "Agent runner entry point"),
90
+ ("how does the agent run tasks asynchronously", "agent_runner", "Async task execution"),
91
+ # ── CLI ───────────────────────────────────────────────────────────────
92
+ ("command line interface argument parsing", "cli", "CLI argument parsing"),
93
+ ("vtx CLI entry point argparse", "cli", "CLI argparse setup"),
94
+ # ── Config ────────────────────────────────────────────────────────────
95
+ ("configuration loading and defaults", "config", "Config loading"),
96
+ ("user config file path resolution", "config", "Config path resolution"),
97
+ # ── LLM / models ──────────────────────────────────────────────────────
98
+ ("LLM API call streaming response", "llm", "LLM streaming"),
99
+ ("model provider selection gemini openai", "llm", "Model provider"),
100
+ ("token counting and context window management", "llm", "Token counting"),
101
+ # ── Context / governance ──────────────────────────────────────────────
102
+ ("context window governance truncation", "context_governance", "Context governance"),
103
+ ("context item priority ranking", "context", "Context priority"),
104
+ # ── Dispatcher ────────────────────────────────────────────────────────
105
+ ("tool dispatcher routing function calls", "dispatcher", "Tool dispatcher"),
106
+ ("dispatch tool call with arguments", "dispatcher", "Tool call dispatch"),
107
+ # ── Events ────────────────────────────────────────────────────────────
108
+ ("event system publish subscribe hooks", "events", "Event system"),
109
+ ("streaming event output to terminal", "events", "Event streaming"),
110
+ # ── Git integration ───────────────────────────────────────────────────
111
+ ("git branch creation and switching", "git_branch", "Git branch"),
112
+ ("github CLI integration shell command", "gh_cli", "GitHub CLI"),
113
+ # ── Diff display ──────────────────────────────────────────────────────
114
+ ("diff display unified patch format", "diff_display", "Diff display"),
115
+ ("show file changes colored diff output", "diff_display", "Colored diff"),
116
+ # ── Extensions ────────────────────────────────────────────────────────
117
+ ("plugin extension registration loading", "extensions", "Extension loading"),
118
+ # ── Skills / builtin ──────────────────────────────────────────────────
119
+ ("builtin skill definition and registration", "builtin_skill", "Builtin skills"),
120
+ ("skill slash command frontmatter parsing", "builtin_skill", "Skill frontmatter"),
121
+ # ── Agents ────────────────────────────────────────────────────────────
122
+ ("subagent invocation and communication", "agents", "Subagent invocation"),
123
+ ("agent message passing protocol", "agents", "Agent messaging"),
124
+ # ── Hooks ─────────────────────────────────────────────────────────────
125
+ ("pre-commit hook integration", "hooks", "Pre-commit hooks"),
126
+ # ── Async utilities ───────────────────────────────────────────────────
127
+ ("async utility helpers gather timeout", "async_utils", "Async utilities"),
128
+ # ── Headless mode ─────────────────────────────────────────────────────
129
+ ("headless non-interactive execution mode", "headless", "Headless mode"),
130
+ # ── General codebase understanding ────────────────────────────────────
131
+ ("error handling exception retry logic", None, "Generic: error handling (open)"),
132
+ ("logging setup structured log output", None, "Generic: logging (open)"),
133
+ ("test fixtures mock patching pytest", "tests", "Test utilities"),
134
+ ]
135
+
136
+ assert len(QUERIES) == 30, f"Expected 30 queries, got {len(QUERIES)}"
137
+
138
+
139
+ # ═════════════════════════════════════════════════════════════════════════════
140
+ # Data classes for results
141
+ # ═════════════════════════════════════════════════════════════════════════════
142
+ @dataclass
143
+ class QueryResult:
144
+ query: str
145
+ description: str
146
+ expected_file: str | None
147
+ latency_ms: float
148
+ top1_file: str | None
149
+ top5_files: list[str]
150
+ top10_files: list[str]
151
+ hit_at_1: bool | None # None = open query (no ground truth)
152
+ hit_at_5: bool | None
153
+ hit_at_10: bool | None
154
+ top1_score: float
155
+
156
+
157
+ @dataclass
158
+ class ModelBenchResult:
159
+ model_name: str
160
+ model_label: str
161
+ embedding_dim: int
162
+ model_size_mb: float
163
+ index_dir: str
164
+
165
+ # Index stats
166
+ indexed_files: int = 0
167
+ total_chunks: int = 0
168
+ chunk_size: int = 0
169
+ chunk_overlap: int = 0
170
+ languages: dict[str, int] = field(default_factory=dict)
171
+ index_time_ms: float = 0.0
172
+ peak_ram_mb: float = 0.0
173
+ memo_hits: int = 0
174
+ memo_misses: int = 0
175
+
176
+ # Search results
177
+ query_results: list[QueryResult] = field(default_factory=list)
178
+
179
+ # Aggregate metrics
180
+ recall_at_1: float = 0.0
181
+ recall_at_5: float = 0.0
182
+ recall_at_10: float = 0.0
183
+ mean_latency_ms: float = 0.0
184
+ p50_latency_ms: float = 0.0
185
+ p95_latency_ms: float = 0.0
186
+ p99_latency_ms: float = 0.0
187
+ evaluated_queries: int = 0
188
+ open_queries: int = 0
189
+
190
+
191
+ # ═════════════════════════════════════════════════════════════════════════════
192
+ # Benchmark runner
193
+ # ═════════════════════════════════════════════════════════════════════════════
194
+ def _check_hit(result_files: list[str], expected: str) -> bool:
195
+ return any(expected.lower() in f.lower() for f in result_files)
196
+
197
+
198
+ def run_benchmark(
199
+ root: Path,
200
+ model_label: str,
201
+ embedder: Any,
202
+ alpha: float | None,
203
+ top_k: int = 10,
204
+ verbose: bool = True,
205
+ ) -> ModelBenchResult:
206
+ model_name = getattr(embedder, "_model_id", None) or getattr(
207
+ embedder, "_model_name", "unknown"
208
+ )
209
+ if verbose:
210
+ print(f"\n{'═' * 60}")
211
+ print(f" Benchmarking: {model_label}")
212
+ print(f" Model ID : {model_name}")
213
+ print(f"{'═' * 60}")
214
+
215
+ # Temporary isolated index dir to avoid cache pollution between runs
216
+ tmp_index = tempfile.mkdtemp(prefix=f"vtx_bench_{model_label.replace(' ', '_')}_")
217
+
218
+ chunk_cfg = ChunkConfig(chunk_size=1500, chunk_overlap=200)
219
+ indexer = CodebaseIndexer(
220
+ root=root, model=embedder, index_dir=tmp_index, chunk_config=chunk_cfg
221
+ )
222
+
223
+ # ── Index ────────────────────────────────────────────────────────────
224
+ gc.collect()
225
+ ram_before = _peak_rss_mb()
226
+
227
+ if verbose:
228
+ print(" [1/3] Indexing codebase …", end="", flush=True)
229
+
230
+ t0 = time.perf_counter()
231
+ stats: IndexStats = indexer.index(force=True, include_text_files=False)
232
+ index_elapsed = (time.perf_counter() - t0) * 1000
233
+
234
+ ram_after = _peak_rss_mb()
235
+ peak_ram = max(ram_after - ram_before, 0.0)
236
+
237
+ if verbose:
238
+ print(f" done in {index_elapsed:.0f} ms ({stats.total_chunks} chunks)")
239
+
240
+ # Embedding dim and model size
241
+ emb_dim = embedder.dim
242
+ model_size_mb = 0.0
243
+ # Try to get the size from the underlying model
244
+ if hasattr(embedder, "_model") and embedder._model is not None:
245
+ raw = embedder._model
246
+ if hasattr(raw, "model_size_mb"):
247
+ model_size_mb = raw.model_size_mb
248
+ elif hasattr(raw, "dim"):
249
+ model_size_mb = 0.0 # model2vec doesn't expose size easily
250
+
251
+ result = ModelBenchResult(
252
+ model_name=model_name,
253
+ model_label=model_label,
254
+ embedding_dim=emb_dim,
255
+ model_size_mb=model_size_mb,
256
+ index_dir=tmp_index,
257
+ indexed_files=stats.indexed_files,
258
+ total_chunks=stats.total_chunks,
259
+ chunk_size=chunk_cfg.chunk_size,
260
+ chunk_overlap=chunk_cfg.chunk_overlap,
261
+ languages=dict(stats.languages),
262
+ index_time_ms=round(index_elapsed, 1),
263
+ peak_ram_mb=round(peak_ram, 1),
264
+ memo_hits=stats.memo_hits,
265
+ memo_misses=stats.memo_misses,
266
+ )
267
+
268
+ # ── Search — 30 queries ───────────────────────────────────────────────
269
+ if verbose:
270
+ print(f" [2/3] Running {len(QUERIES)} queries …")
271
+
272
+ latencies: list[float] = []
273
+ hits1: list[bool] = []
274
+ hits5: list[bool] = []
275
+ hits10: list[bool] = []
276
+ open_count = 0
277
+
278
+ for i, (query, expected_file, description) in enumerate(QUERIES):
279
+ t_q = time.perf_counter()
280
+ search_results = indexer.search(query, top_k=top_k, alpha=alpha)
281
+ q_elapsed = (time.perf_counter() - t_q) * 1000
282
+ latencies.append(q_elapsed)
283
+
284
+ top_files_all = [r.chunk.file_path for r in search_results]
285
+ top1_file = top_files_all[0] if top_files_all else None
286
+ top5_files = top_files_all[:5]
287
+ top10_files = top_files_all[:10]
288
+ top1_score = search_results[0].score if search_results else 0.0
289
+
290
+ if expected_file is None:
291
+ hit1 = hit5 = hit10 = None
292
+ open_count += 1
293
+ else:
294
+ hit1 = _check_hit(top_files_all[:1], expected_file)
295
+ hit5 = _check_hit(top5_files, expected_file)
296
+ hit10 = _check_hit(top10_files, expected_file)
297
+ hits1.append(hit1)
298
+ hits5.append(hit5)
299
+ hits10.append(hit10)
300
+
301
+ qr = QueryResult(
302
+ query=query,
303
+ description=description,
304
+ expected_file=expected_file,
305
+ latency_ms=round(q_elapsed, 2),
306
+ top1_file=top1_file,
307
+ top5_files=top5_files,
308
+ top10_files=top10_files,
309
+ hit_at_1=hit1,
310
+ hit_at_5=hit5,
311
+ hit_at_10=hit10,
312
+ top1_score=round(top1_score, 4),
313
+ )
314
+ result.query_results.append(qr)
315
+
316
+ if verbose:
317
+ status = ("✓" if hit1 else "~" if hit5 else "✗") if expected_file else "○"
318
+ print(
319
+ f" [{i + 1:02d}/{len(QUERIES)}] {status} {description[:42]:<42} "
320
+ f"{q_elapsed:6.1f}ms score={top1_score:.3f}"
321
+ )
322
+
323
+ # ── Aggregate ─────────────────────────────────────────────────────────
324
+ import statistics
325
+
326
+ n_eval = len(hits1)
327
+ result.evaluated_queries = n_eval
328
+ result.open_queries = open_count
329
+ result.recall_at_1 = round(sum(hits1) / n_eval, 4) if n_eval else 0.0
330
+ result.recall_at_5 = round(sum(hits5) / n_eval, 4) if n_eval else 0.0
331
+ result.recall_at_10 = round(sum(hits10) / n_eval, 4) if n_eval else 0.0
332
+ result.mean_latency_ms = round(statistics.mean(latencies), 2)
333
+ result.p50_latency_ms = round(statistics.median(latencies), 2)
334
+ sorted_lat = sorted(latencies)
335
+ result.p95_latency_ms = round(sorted_lat[int(0.95 * len(sorted_lat)) - 1], 2)
336
+ result.p99_latency_ms = round(sorted_lat[int(0.99 * len(sorted_lat)) - 1], 2)
337
+
338
+ if verbose:
339
+ print(" [3/3] Cleanup temporary index …")
340
+
341
+ shutil.rmtree(tmp_index, ignore_errors=True)
342
+
343
+ return result
344
+
345
+
346
+ # ═════════════════════════════════════════════════════════════════════════════
347
+ # Rich terminal report
348
+ # ═════════════════════════════════════════════════════════════════════════════
349
+ _RESET = "\033[0m"
350
+ _BOLD = "\033[1m"
351
+ _GREEN = "\033[92m"
352
+ _RED = "\033[91m"
353
+ _YELLOW = "\033[93m"
354
+ _CYAN = "\033[96m"
355
+ _MAGENTA = "\033[95m"
356
+ _DIM = "\033[2m"
357
+
358
+
359
+ def _pct(v: float) -> str:
360
+ colour = _GREEN if v >= 0.8 else (_YELLOW if v >= 0.5 else _RED)
361
+ return f"{colour}{v * 100:.1f}%{_RESET}"
362
+
363
+
364
+ def _ms(v: float) -> str:
365
+ colour = _GREEN if v < 50 else (_YELLOW if v < 200 else _RED)
366
+ return f"{colour}{v:.1f}ms{_RESET}"
367
+
368
+
369
+ def print_report(results: list[ModelBenchResult], alpha: float | None) -> None:
370
+ print(f"\n{_BOLD}{'═' * 70}{_RESET}")
371
+ print(f"{_BOLD}{' VORTEXA BENCHMARK REPORT':^70}{_RESET}")
372
+ print(f"{_BOLD}{'═' * 70}{_RESET}")
373
+ print(" Codebase : VTX (vtx-coding-agent)")
374
+ n_eval_q = sum(1 for q in QUERIES if q[1] is not None)
375
+ n_open_q = sum(1 for q in QUERIES if q[1] is None)
376
+ print(f" Queries : {len(QUERIES)} total ({n_eval_q} evaluated, {n_open_q} open)")
377
+ print(f" alpha : {'adaptive (auto)' if alpha is None else alpha}")
378
+ print()
379
+
380
+ # ── Summary table ─────────────────────────────────────────────────────
381
+ col = 26
382
+ hdr = f"{'Metric':<{col}}"
383
+ for r in results:
384
+ hdr += f" {_BOLD}{r.model_label[:22]:<22}{_RESET}"
385
+ print(hdr)
386
+ print(f"{'─' * (col + len(results) * 24)}")
387
+
388
+ def row(label: str, vals: list[str]) -> None:
389
+ line = f"{label:<{col}}"
390
+ for v in vals:
391
+ line += f" {v:<22}"
392
+ print(line)
393
+
394
+ # Index metrics
395
+ row("Model ID", [f"{_DIM}{r.model_name[:20]}{_RESET}" for r in results])
396
+ row("Embedding dim", [str(r.embedding_dim) for r in results])
397
+ row(
398
+ "Model size (MB)",
399
+ [f"{r.model_size_mb:.1f}" if r.model_size_mb else "n/a" for r in results],
400
+ )
401
+ row("Chunk size / overlap", [f"{r.chunk_size} / {r.chunk_overlap}" for r in results])
402
+ row("Files indexed", [str(r.indexed_files) for r in results])
403
+ row("Total chunks", [str(r.total_chunks) for r in results])
404
+ row("Memo hits / misses", [f"{r.memo_hits} / {r.memo_misses}" for r in results])
405
+ row("Index time", [_ms(r.index_time_ms) for r in results])
406
+ row("Peak RAM delta (MB)", [f"{r.peak_ram_mb:.1f}" for r in results])
407
+ print(f"{'─' * (col + len(results) * 24)}")
408
+
409
+ # Retrieval metrics
410
+ row("R@1 (evaluated)", [_pct(r.recall_at_1) for r in results])
411
+ row("R@5 (evaluated)", [_pct(r.recall_at_5) for r in results])
412
+ row("R@10 (evaluated)", [_pct(r.recall_at_10) for r in results])
413
+ print(f"{'─' * (col + len(results) * 24)}")
414
+
415
+ # Latency
416
+ row("Latency mean", [_ms(r.mean_latency_ms) for r in results])
417
+ row("Latency p50", [_ms(r.p50_latency_ms) for r in results])
418
+ row("Latency p95", [_ms(r.p95_latency_ms) for r in results])
419
+ row("Latency p99", [_ms(r.p99_latency_ms) for r in results])
420
+ print(f"{'─' * (col + len(results) * 24)}")
421
+
422
+ # Languages
423
+ for r in results:
424
+ langs_str = ", ".join(
425
+ f"{k}:{v}" for k, v in sorted(r.languages.items(), key=lambda x: -x[1])[:5]
426
+ )
427
+ row("Top languages", [langs_str if rr is r else "" for rr in results])
428
+ break # Only one row for language overview
429
+
430
+ print()
431
+
432
+ # ── Per-query breakdown ───────────────────────────────────────────────
433
+ print(f"{_BOLD}Per-Query Breakdown{_RESET}")
434
+ print(f"{'─' * 100}")
435
+ header = f"{'#':<3} {'Description':<44} {'Expected':<18}"
436
+ for _r in results:
437
+ header += f" {'@1 @5 @10':^12} {'ms':>6}"
438
+ print(header)
439
+ print(f"{'─' * 100}")
440
+
441
+ for i, (_query, expected, desc) in enumerate(QUERIES):
442
+ line = f"{i + 1:<3} {desc[:43]:<44} {(expected or '(open)')[:17]:<18}"
443
+ for r in results:
444
+ qr = r.query_results[i]
445
+ if qr.hit_at_1 is None:
446
+ hits = f"{'○':^4} {'○':^4} {'○':^4}"
447
+ else:
448
+ h1 = f"{_GREEN}✓{_RESET}" if qr.hit_at_1 else f"{_RED}✗{_RESET}"
449
+ h5 = f"{_GREEN}✓{_RESET}" if qr.hit_at_5 else f"{_RED}✗{_RESET}"
450
+ h10 = f"{_GREEN}✓{_RESET}" if qr.hit_at_10 else f"{_RED}✗{_RESET}"
451
+ hits = f"{h1:<4} {h5:<4} {h10:<4}"
452
+ line += f" {hits} {qr.latency_ms:6.1f}"
453
+ print(line)
454
+
455
+ print(f"{'─' * 100}")
456
+ print()
457
+
458
+
459
+ # ═════════════════════════════════════════════════════════════════════════════
460
+ # Save JSON report
461
+ # ═════════════════════════════════════════════════════════════════════════════
462
+ def save_json_report(results: list[ModelBenchResult], output_path: Path) -> None:
463
+ report = []
464
+ for r in results:
465
+ d = asdict(r)
466
+ report.append(d)
467
+ output_path.write_text(json.dumps(report, indent=2))
468
+ print(f" JSON report saved → {output_path}")
469
+
470
+
471
+ # ═════════════════════════════════════════════════════════════════════════════
472
+ # Main
473
+ # ═════════════════════════════════════════════════════════════════════════════
474
+ def main() -> None:
475
+ parser = argparse.ArgumentParser(
476
+ description="Benchmark vortexa indexers on the VTX codebase.",
477
+ formatter_class=argparse.RawDescriptionHelpFormatter,
478
+ )
479
+ parser.add_argument(
480
+ "--root",
481
+ type=Path,
482
+ default=Path(__file__).parent,
483
+ help="Codebase root to index (default: this file's directory)",
484
+ )
485
+ parser.add_argument(
486
+ "--alpha",
487
+ type=float,
488
+ default=None,
489
+ help="Hybrid search alpha (0=BM25, 1=semantic, None=adaptive)",
490
+ )
491
+ parser.add_argument(
492
+ "--top-k", type=int, default=10, help="Max results per query (default: 10)"
493
+ )
494
+ parser.add_argument(
495
+ "--no-m2v", action="store_true", help="Skip Model2Vec benchmark (faster, fewer deps)"
496
+ )
497
+ parser.add_argument("--no-lf4", action="store_true", help="Skip LF4 (vtx-embed-7M) benchmark")
498
+ parser.add_argument(
499
+ "--output",
500
+ type=Path,
501
+ default=Path("benchmark_results.json"),
502
+ help="Path for JSON report output",
503
+ )
504
+ parser.add_argument("--quiet", action="store_true", help="Suppress per-query progress output")
505
+ args = parser.parse_args()
506
+
507
+ root = args.root.resolve()
508
+ if not root.exists():
509
+ sys.exit(f"[ERROR] Root not found: {root}")
510
+
511
+ verbose = not args.quiet
512
+
513
+ print(f"\n{_BOLD}{_CYAN}Vortexa Indexer Benchmark{_RESET}")
514
+ print(f"{_DIM}Codebase root: {root}{_RESET}")
515
+ import importlib.util
516
+
517
+ _vsite = importlib.util.find_spec("vortexa")
518
+ _vloc = Path(_vsite.origin).parent if _vsite else "unknown"
519
+ print(f"{_DIM}vortexa site : {_vloc}{_RESET}\n")
520
+
521
+ models_to_run: list[tuple[str, Any]] = []
522
+
523
+ if not args.no_lf4:
524
+ models_to_run.append(("LF4 vtx-embed-1M (nano)", LF4Embedder("VTXAI/vtx-embed-1M")))
525
+ models_to_run.append(("LF4 vtx-embed-7M (mini)", LF4Embedder("VTXAI/vtx-embed-7M")))
526
+
527
+ if not args.no_m2v:
528
+ models_to_run.append(
529
+ ("Model2Vec JARVIS-tool-search", Model2VecEmbedder("AI4free/JARVIS-tool-search-v1"))
530
+ )
531
+
532
+ if not models_to_run:
533
+ sys.exit("[ERROR] All models disabled — enable at least one.")
534
+
535
+ # Pre-warm: touch both models to download weights before we start timing
536
+ print(f"{_BOLD}Pre-warming models (downloading weights if needed)…{_RESET}")
537
+ for label, emb in models_to_run:
538
+ print(f" loading {label} …", end="", flush=True)
539
+ t_load = time.perf_counter()
540
+ _ = emb.dim # triggers lazy load
541
+ print(f" ready in {(time.perf_counter() - t_load) * 1000:.0f}ms")
542
+
543
+ results: list[ModelBenchResult] = []
544
+
545
+ for label, emb in models_to_run:
546
+ r = run_benchmark(
547
+ root=root,
548
+ model_label=label,
549
+ embedder=emb,
550
+ alpha=args.alpha,
551
+ top_k=args.top_k,
552
+ verbose=verbose,
553
+ )
554
+ results.append(r)
555
+
556
+ print_report(results, args.alpha)
557
+ save_json_report(results, args.output)
558
+
559
+ # ── Winner callout ────────────────────────────────────────────────────
560
+ if len(results) > 1:
561
+ best_r1 = max(results, key=lambda r: r.recall_at_1)
562
+ best_speed = min(results, key=lambda r: r.mean_latency_ms)
563
+ r1_pct = f"{best_r1.recall_at_1 * 100:.1f}%"
564
+ spd_ms = f"{best_speed.mean_latency_ms:.1f}ms mean"
565
+ print(f"{_BOLD}Winner R@1 :{_RESET} {_GREEN}{best_r1.model_label}{_RESET} ({r1_pct})")
566
+ print(
567
+ f"{_BOLD}Winner Speed :{_RESET} {_GREEN}{best_speed.model_label}{_RESET} ({spd_ms})"
568
+ )
569
+ print()
570
+
571
+
572
+ if __name__ == "__main__":
573
+ main()
benchmark_results.json ADDED
@@ -0,0 +1,1872 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "model_name": "VTXAI/vtx-embed-1M",
4
+ "model_label": "LF4 vtx-embed-1M (nano)",
5
+ "embedding_dim": 64,
6
+ "model_size_mb": 0.786432,
7
+ "index_dir": "/tmp/vtx_bench_LF4_vtx-embed-1M_(nano)_onbo80p2",
8
+ "indexed_files": 330,
9
+ "total_chunks": 2040,
10
+ "chunk_size": 1500,
11
+ "chunk_overlap": 200,
12
+ "languages": {
13
+ "python": 1839,
14
+ "typescript": 27,
15
+ "tsx": 129,
16
+ "javascript": 10,
17
+ "bash": 16,
18
+ "css": 13,
19
+ "powershell": 5
20
+ },
21
+ "index_time_ms": 16107.8,
22
+ "peak_ram_mb": 0.0,
23
+ "memo_hits": 0,
24
+ "memo_misses": 2040,
25
+ "query_results": [
26
+ {
27
+ "query": "agent runner main loop execution",
28
+ "description": "Agent runner entry point",
29
+ "expected_file": "agent_runner",
30
+ "latency_ms": 5.53,
31
+ "top1_file": "Site/src/content/blog/agentic-loop.ts",
32
+ "top5_files": [
33
+ "Site/src/content/blog/agentic-loop.ts",
34
+ "src/vtx/agent_runner.py",
35
+ "src/vtx/sdk/runner.py",
36
+ "src/vtx/loop.py",
37
+ "benchmark.py"
38
+ ],
39
+ "top10_files": [
40
+ "Site/src/content/blog/agentic-loop.ts",
41
+ "src/vtx/agent_runner.py",
42
+ "src/vtx/sdk/runner.py",
43
+ "src/vtx/loop.py",
44
+ "benchmark.py",
45
+ "src/vtx/runtime.py",
46
+ "src/vtx/ui/agent_runner.py",
47
+ "src/vtx/sdk/handoffs.py",
48
+ "src/vtx/agents/loader.py",
49
+ "src/vtx/agents/registry.py"
50
+ ],
51
+ "hit_at_1": false,
52
+ "hit_at_5": true,
53
+ "hit_at_10": true,
54
+ "top1_score": 0.0216
55
+ },
56
+ {
57
+ "query": "how does the agent run tasks asynchronously",
58
+ "description": "Async task execution",
59
+ "expected_file": "agent_runner",
60
+ "latency_ms": 4.28,
61
+ "top1_file": "src/vtx/runtime.py",
62
+ "top5_files": [
63
+ "src/vtx/runtime.py",
64
+ "Site/src/content/blog/agentic-loop.ts",
65
+ "src/vtx/agents/loader.py",
66
+ "benchmark.py",
67
+ "src/vtx/tools/task.py"
68
+ ],
69
+ "top10_files": [
70
+ "src/vtx/runtime.py",
71
+ "Site/src/content/blog/agentic-loop.ts",
72
+ "src/vtx/agents/loader.py",
73
+ "benchmark.py",
74
+ "src/vtx/tools/task.py",
75
+ "src/vtx/sdk/runner.py",
76
+ "src/vtx/prompts/identity.py",
77
+ "src/vtx/loop.py",
78
+ "src/vtx/sdk/run_config.py",
79
+ "src/vtx/sdk/results.py"
80
+ ],
81
+ "hit_at_1": false,
82
+ "hit_at_5": false,
83
+ "hit_at_10": false,
84
+ "top1_score": 0.0233
85
+ },
86
+ {
87
+ "query": "command line interface argument parsing",
88
+ "description": "CLI argument parsing",
89
+ "expected_file": "cli",
90
+ "latency_ms": 5.21,
91
+ "top1_file": "src/vtx/cli.py",
92
+ "top5_files": [
93
+ "src/vtx/cli.py",
94
+ "src/vtx/tools/bash.py",
95
+ "benchmark.py",
96
+ "src/vtx/ui/agent_runner.py",
97
+ "src/vtx/ui/input.py"
98
+ ],
99
+ "top10_files": [
100
+ "src/vtx/cli.py",
101
+ "src/vtx/tools/bash.py",
102
+ "benchmark.py",
103
+ "src/vtx/ui/agent_runner.py",
104
+ "src/vtx/ui/input.py",
105
+ "src/vtx/ui/formatting.py",
106
+ "src/vtx/ui/commands/sessions.py",
107
+ "src/vtx/llm/tool_parser.py",
108
+ "src/vtx/llm/sdk/openai.py",
109
+ "src/vtx/loop.py"
110
+ ],
111
+ "hit_at_1": true,
112
+ "hit_at_5": true,
113
+ "hit_at_10": true,
114
+ "top1_score": 0.0172
115
+ },
116
+ {
117
+ "query": "vtx CLI entry point argparse",
118
+ "description": "CLI argparse setup",
119
+ "expected_file": "cli",
120
+ "latency_ms": 4.7,
121
+ "top1_file": "src/vtx/cli.py",
122
+ "top5_files": [
123
+ "src/vtx/cli.py",
124
+ "benchmark.py",
125
+ "src/vtx/gh_cli.py",
126
+ "scripts/show_themes.py",
127
+ "src/vtx/extensions.py"
128
+ ],
129
+ "top10_files": [
130
+ "src/vtx/cli.py",
131
+ "benchmark.py",
132
+ "src/vtx/gh_cli.py",
133
+ "scripts/show_themes.py",
134
+ "src/vtx/extensions.py",
135
+ "src/vtx/session.py",
136
+ "src/vtx/llm/provider_catalog.py",
137
+ "src/vtx/turn.py",
138
+ "src/vtx/diff_display.py",
139
+ "src/vtx/runtime.py"
140
+ ],
141
+ "hit_at_1": true,
142
+ "hit_at_5": true,
143
+ "hit_at_10": true,
144
+ "top1_score": 0.025
145
+ },
146
+ {
147
+ "query": "configuration loading and defaults",
148
+ "description": "Config loading",
149
+ "expected_file": "config",
150
+ "latency_ms": 4.58,
151
+ "top1_file": "src/vtx/config.py",
152
+ "top5_files": [
153
+ "src/vtx/config.py",
154
+ "src/vtx/llm/oauth/dynamic.py",
155
+ "src/vtx/llm/provider_catalog.py",
156
+ "src/vtx/sdk/run_config.py",
157
+ "src/vtx/llm/sdk/supercode.py"
158
+ ],
159
+ "top10_files": [
160
+ "src/vtx/config.py",
161
+ "src/vtx/llm/oauth/dynamic.py",
162
+ "src/vtx/llm/provider_catalog.py",
163
+ "src/vtx/sdk/run_config.py",
164
+ "src/vtx/llm/sdk/supercode.py",
165
+ "benchmark.py",
166
+ "src/vtx/sdk/agent.py",
167
+ "src/vtx/llm/dynamic_models.py",
168
+ "Site/src/content/docs/index.ts",
169
+ "src/vtx/runtime.py"
170
+ ],
171
+ "hit_at_1": true,
172
+ "hit_at_5": true,
173
+ "hit_at_10": true,
174
+ "top1_score": 0.0202
175
+ },
176
+ {
177
+ "query": "user config file path resolution",
178
+ "description": "Config path resolution",
179
+ "expected_file": "config",
180
+ "latency_ms": 4.56,
181
+ "top1_file": "src/vtx/config.py",
182
+ "top5_files": [
183
+ "src/vtx/config.py",
184
+ "src/vtx/extensions.py",
185
+ "scripts/show_themes.py",
186
+ "src/vtx/tools/write.py",
187
+ "src/vtx/ui/path_complete.py"
188
+ ],
189
+ "top10_files": [
190
+ "src/vtx/config.py",
191
+ "src/vtx/extensions.py",
192
+ "scripts/show_themes.py",
193
+ "src/vtx/tools/write.py",
194
+ "src/vtx/ui/path_complete.py",
195
+ "src/vtx/tools/edit.py",
196
+ "benchmark.py",
197
+ "src/vtx/tools/skill.py",
198
+ "src/vtx/llm/provider_catalog.py",
199
+ "src/vtx/context/agent_mds.py"
200
+ ],
201
+ "hit_at_1": true,
202
+ "hit_at_5": true,
203
+ "hit_at_10": true,
204
+ "top1_score": 0.0198
205
+ },
206
+ {
207
+ "query": "LLM API call streaming response",
208
+ "description": "LLM streaming",
209
+ "expected_file": "llm",
210
+ "latency_ms": 4.74,
211
+ "top1_file": "src/vtx/ui/blocks.py",
212
+ "top5_files": [
213
+ "src/vtx/ui/blocks.py",
214
+ "src/vtx/llm/sdk/supercode.py",
215
+ "src/vtx/turn.py",
216
+ "src/vtx/llm/phase_parser.py",
217
+ "src/vtx/llm/base.py"
218
+ ],
219
+ "top10_files": [
220
+ "src/vtx/ui/blocks.py",
221
+ "src/vtx/llm/sdk/supercode.py",
222
+ "src/vtx/turn.py",
223
+ "src/vtx/llm/phase_parser.py",
224
+ "src/vtx/llm/base.py",
225
+ "src/vtx/loop.py",
226
+ "benchmark.py",
227
+ "src/vtx/core/compaction.py",
228
+ "src/vtx/llm/providers/mock.py",
229
+ "src/vtx/llm/dynamic_models.py"
230
+ ],
231
+ "hit_at_1": false,
232
+ "hit_at_5": true,
233
+ "hit_at_10": true,
234
+ "top1_score": 0.016
235
+ },
236
+ {
237
+ "query": "model provider selection gemini openai",
238
+ "description": "Model provider",
239
+ "expected_file": "llm",
240
+ "latency_ms": 4.37,
241
+ "top1_file": "src/vtx/llm/providers/openai_sdk.py",
242
+ "top5_files": [
243
+ "src/vtx/llm/providers/openai_sdk.py",
244
+ "src/vtx/runtime.py",
245
+ "src/vtx/ui/commands/providers.py",
246
+ "src/vtx/llm/models.py",
247
+ "src/vtx/ui/commands/auth.py"
248
+ ],
249
+ "top10_files": [
250
+ "src/vtx/llm/providers/openai_sdk.py",
251
+ "src/vtx/runtime.py",
252
+ "src/vtx/ui/commands/providers.py",
253
+ "src/vtx/llm/models.py",
254
+ "src/vtx/ui/commands/auth.py",
255
+ "src/vtx/ui/selection_mode.py",
256
+ "src/vtx/llm/provider_catalog.py",
257
+ "src/vtx/sdk/agent.py",
258
+ "src/vtx/ui/completion_ui.py",
259
+ "src/vtx/llm/model_fetcher.py"
260
+ ],
261
+ "hit_at_1": true,
262
+ "hit_at_5": true,
263
+ "hit_at_10": true,
264
+ "top1_score": 0.0192
265
+ },
266
+ {
267
+ "query": "token counting and context window management",
268
+ "description": "Token counting",
269
+ "expected_file": "llm",
270
+ "latency_ms": 4.62,
271
+ "top1_file": "src/vtx/core/compaction.py",
272
+ "top5_files": [
273
+ "src/vtx/core/compaction.py",
274
+ "src/vtx/ui/widgets.py",
275
+ "Site/src/content/blog/memory-compaction.ts",
276
+ "src/vtx/llm/dynamic_models.py",
277
+ "src/vtx/session.py"
278
+ ],
279
+ "top10_files": [
280
+ "src/vtx/core/compaction.py",
281
+ "src/vtx/ui/widgets.py",
282
+ "Site/src/content/blog/memory-compaction.ts",
283
+ "src/vtx/llm/dynamic_models.py",
284
+ "src/vtx/session.py",
285
+ "src/vtx/ui/app.py",
286
+ "src/vtx/sdk/tracing/tracing_impl.py",
287
+ "src/vtx/llm/context_length.py",
288
+ "benchmark.py",
289
+ "src/vtx/context_governance.py"
290
+ ],
291
+ "hit_at_1": false,
292
+ "hit_at_5": true,
293
+ "hit_at_10": true,
294
+ "top1_score": 0.0152
295
+ },
296
+ {
297
+ "query": "context window governance truncation",
298
+ "description": "Context governance",
299
+ "expected_file": "context_governance",
300
+ "latency_ms": 5.18,
301
+ "top1_file": "src/vtx/context_governance.py",
302
+ "top5_files": [
303
+ "src/vtx/context_governance.py",
304
+ "src/vtx/core/compaction.py",
305
+ "benchmark.py",
306
+ "src/vtx/tools/bash.py",
307
+ "src/vtx/context/agent_mds.py"
308
+ ],
309
+ "top10_files": [
310
+ "src/vtx/context_governance.py",
311
+ "src/vtx/core/compaction.py",
312
+ "benchmark.py",
313
+ "src/vtx/tools/bash.py",
314
+ "src/vtx/context/agent_mds.py",
315
+ "Site/src/content/blog/memory-compaction.ts",
316
+ "src/vtx/llm/dynamic_models.py",
317
+ "src/vtx/ui/widgets.py",
318
+ "src/vtx/runtime.py",
319
+ "src/vtx/loop.py"
320
+ ],
321
+ "hit_at_1": true,
322
+ "hit_at_5": true,
323
+ "hit_at_10": true,
324
+ "top1_score": 0.0182
325
+ },
326
+ {
327
+ "query": "context item priority ranking",
328
+ "description": "Context priority",
329
+ "expected_file": "context",
330
+ "latency_ms": 4.5,
331
+ "top1_file": "src/vtx/ui/input.py",
332
+ "top5_files": [
333
+ "src/vtx/ui/input.py",
334
+ "src/vtx/ui/app.py",
335
+ "src/vtx/ui/tree.py",
336
+ "src/vtx/sdk/items.py",
337
+ "src/vtx/ui/completion_ui.py"
338
+ ],
339
+ "top10_files": [
340
+ "src/vtx/ui/input.py",
341
+ "src/vtx/ui/app.py",
342
+ "src/vtx/ui/tree.py",
343
+ "src/vtx/sdk/items.py",
344
+ "src/vtx/ui/completion_ui.py",
345
+ "src/vtx/context/skills.py",
346
+ "src/vtx/context/git.py",
347
+ "src/vtx/sdk/items_base.py",
348
+ "src/vtx/llm/context_length.py",
349
+ "Site/src/index.css"
350
+ ],
351
+ "hit_at_1": false,
352
+ "hit_at_5": false,
353
+ "hit_at_10": true,
354
+ "top1_score": 0.0182
355
+ },
356
+ {
357
+ "query": "tool dispatcher routing function calls",
358
+ "description": "Tool dispatcher",
359
+ "expected_file": "dispatcher",
360
+ "latency_ms": 5.9,
361
+ "top1_file": "src/vtx/dispatcher.py",
362
+ "top5_files": [
363
+ "src/vtx/dispatcher.py",
364
+ "benchmark.py",
365
+ "src/vtx/llm/tool_parser.py",
366
+ "src/vtx/context_governance.py",
367
+ "src/vtx/llm/sdk/supercode.py"
368
+ ],
369
+ "top10_files": [
370
+ "src/vtx/dispatcher.py",
371
+ "benchmark.py",
372
+ "src/vtx/llm/tool_parser.py",
373
+ "src/vtx/context_governance.py",
374
+ "src/vtx/llm/sdk/supercode.py",
375
+ "src/vtx/llm/providers/supercode.py",
376
+ "src/vtx/prompts/tooling.py",
377
+ "src/vtx/tools/read.py",
378
+ "src/vtx/sdk/tools.py",
379
+ "src/vtx/turn.py"
380
+ ],
381
+ "hit_at_1": true,
382
+ "hit_at_5": true,
383
+ "hit_at_10": true,
384
+ "top1_score": 0.0187
385
+ },
386
+ {
387
+ "query": "dispatch tool call with arguments",
388
+ "description": "Tool call dispatch",
389
+ "expected_file": "dispatcher",
390
+ "latency_ms": 6.33,
391
+ "top1_file": "src/vtx/turn.py",
392
+ "top5_files": [
393
+ "src/vtx/turn.py",
394
+ "benchmark.py",
395
+ "src/vtx/ui/session_ui.py",
396
+ "src/vtx/sdk/runner.py",
397
+ "src/vtx/llm/tool_parser.py"
398
+ ],
399
+ "top10_files": [
400
+ "src/vtx/turn.py",
401
+ "benchmark.py",
402
+ "src/vtx/ui/session_ui.py",
403
+ "src/vtx/sdk/runner.py",
404
+ "src/vtx/llm/tool_parser.py",
405
+ "src/vtx/ui/tree.py",
406
+ "src/vtx/prompts/tooling.py",
407
+ "src/vtx/tools/base.py",
408
+ "src/vtx/tools/find.py",
409
+ "src/vtx/tools/task.py"
410
+ ],
411
+ "hit_at_1": false,
412
+ "hit_at_5": false,
413
+ "hit_at_10": false,
414
+ "top1_score": 0.0188
415
+ },
416
+ {
417
+ "query": "event system publish subscribe hooks",
418
+ "description": "Event system",
419
+ "expected_file": "events",
420
+ "latency_ms": 6.25,
421
+ "top1_file": "src/vtx/hooks/loader.py",
422
+ "top5_files": [
423
+ "src/vtx/hooks/loader.py",
424
+ "src/vtx/hooks/bridge.py",
425
+ "benchmark.py",
426
+ "src/vtx/hooks/agent_hook.py",
427
+ "src/vtx/hooks/registry.py"
428
+ ],
429
+ "top10_files": [
430
+ "src/vtx/hooks/loader.py",
431
+ "src/vtx/hooks/bridge.py",
432
+ "benchmark.py",
433
+ "src/vtx/hooks/agent_hook.py",
434
+ "src/vtx/hooks/registry.py",
435
+ "src/vtx/loop.py",
436
+ "src/vtx/extensions.py",
437
+ "src/vtx/hooks/runtime.py",
438
+ "Site/src/hooks/useRouteMeta.ts",
439
+ "src/vtx/hooks/types.py"
440
+ ],
441
+ "hit_at_1": false,
442
+ "hit_at_5": false,
443
+ "hit_at_10": false,
444
+ "top1_score": 0.0211
445
+ },
446
+ {
447
+ "query": "streaming event output to terminal",
448
+ "description": "Event streaming",
449
+ "expected_file": "events",
450
+ "latency_ms": 4.75,
451
+ "top1_file": "src/vtx/turn.py",
452
+ "top5_files": [
453
+ "src/vtx/turn.py",
454
+ "src/vtx/tools/bash.py",
455
+ "src/vtx/ui/blocks.py",
456
+ "benchmark.py",
457
+ "Site/src/components/FeaturesPage.tsx"
458
+ ],
459
+ "top10_files": [
460
+ "src/vtx/turn.py",
461
+ "src/vtx/tools/bash.py",
462
+ "src/vtx/ui/blocks.py",
463
+ "benchmark.py",
464
+ "Site/src/components/FeaturesPage.tsx",
465
+ "src/vtx/sdk/guardrails/types.py",
466
+ "src/vtx/tools/task.py",
467
+ "src/vtx/events.py",
468
+ "Site/src/components/TerminalBlock.tsx",
469
+ "src/vtx/ui/agent_runner.py"
470
+ ],
471
+ "hit_at_1": false,
472
+ "hit_at_5": false,
473
+ "hit_at_10": true,
474
+ "top1_score": 0.0192
475
+ },
476
+ {
477
+ "query": "git branch creation and switching",
478
+ "description": "Git branch",
479
+ "expected_file": "git_branch",
480
+ "latency_ms": 4.5,
481
+ "top1_file": "src/vtx/git_branch.py",
482
+ "top5_files": [
483
+ "src/vtx/git_branch.py",
484
+ "src/vtx/context/git.py",
485
+ "src/vtx/ui/widgets.py",
486
+ "benchmark.py",
487
+ "Site/src/components/Capabilities.tsx"
488
+ ],
489
+ "top10_files": [
490
+ "src/vtx/git_branch.py",
491
+ "src/vtx/context/git.py",
492
+ "src/vtx/ui/widgets.py",
493
+ "benchmark.py",
494
+ "Site/src/components/Capabilities.tsx",
495
+ "src/vtx/ui/startup.py",
496
+ "scripts/install.sh",
497
+ "src/vtx/ui/commands/settings.py",
498
+ "Site/src/content/blog/agentskill.ts",
499
+ "src/vtx/config.py"
500
+ ],
501
+ "hit_at_1": true,
502
+ "hit_at_5": true,
503
+ "hit_at_10": true,
504
+ "top1_score": 0.0268
505
+ },
506
+ {
507
+ "query": "github CLI integration shell command",
508
+ "description": "GitHub CLI",
509
+ "expected_file": "gh_cli",
510
+ "latency_ms": 4.53,
511
+ "top1_file": "src/vtx/ui/agent_runner.py",
512
+ "top5_files": [
513
+ "src/vtx/ui/agent_runner.py",
514
+ "Site/src/components/FeaturesPage.tsx",
515
+ "src/vtx/tools/bash.py",
516
+ "scripts/install.ps1",
517
+ "scripts/install.sh"
518
+ ],
519
+ "top10_files": [
520
+ "src/vtx/ui/agent_runner.py",
521
+ "Site/src/components/FeaturesPage.tsx",
522
+ "src/vtx/tools/bash.py",
523
+ "scripts/install.ps1",
524
+ "scripts/install.sh",
525
+ "Site/src/hooks/useRouteMeta.ts",
526
+ "benchmark.py",
527
+ "src/vtx/ui/commands/auth.py",
528
+ "src/vtx/cli.py",
529
+ "tests/ui/test_shell_command_detection.py"
530
+ ],
531
+ "hit_at_1": false,
532
+ "hit_at_5": false,
533
+ "hit_at_10": false,
534
+ "top1_score": 0.0174
535
+ },
536
+ {
537
+ "query": "diff display unified patch format",
538
+ "description": "Diff display",
539
+ "expected_file": "diff_display",
540
+ "latency_ms": 5.29,
541
+ "top1_file": "src/vtx/tools/edit.py",
542
+ "top5_files": [
543
+ "src/vtx/tools/edit.py",
544
+ "src/vtx/tools/write.py",
545
+ "src/vtx/ui/blocks.py",
546
+ "benchmark.py",
547
+ "src/vtx/diff_display.py"
548
+ ],
549
+ "top10_files": [
550
+ "src/vtx/tools/edit.py",
551
+ "src/vtx/tools/write.py",
552
+ "src/vtx/ui/blocks.py",
553
+ "benchmark.py",
554
+ "src/vtx/diff_display.py",
555
+ "src/vtx/ui/widgets.py",
556
+ "src/vtx/ui/formatting.py",
557
+ "Site/src/index.css",
558
+ "src/vtx/tools/task.py",
559
+ "Site/src/components/MarkdownRenderer.tsx"
560
+ ],
561
+ "hit_at_1": false,
562
+ "hit_at_5": true,
563
+ "hit_at_10": true,
564
+ "top1_score": 0.0166
565
+ },
566
+ {
567
+ "query": "show file changes colored diff output",
568
+ "description": "Colored diff",
569
+ "expected_file": "diff_display",
570
+ "latency_ms": 5.76,
571
+ "top1_file": "src/vtx/ui/widgets.py",
572
+ "top5_files": [
573
+ "src/vtx/ui/widgets.py",
574
+ "src/vtx/ui/launch.py",
575
+ "src/vtx/ui/blocks.py",
576
+ "src/vtx/tools/edit.py",
577
+ "src/vtx/ui/chat.py"
578
+ ],
579
+ "top10_files": [
580
+ "src/vtx/ui/widgets.py",
581
+ "src/vtx/ui/launch.py",
582
+ "src/vtx/ui/blocks.py",
583
+ "src/vtx/tools/edit.py",
584
+ "src/vtx/ui/chat.py",
585
+ "benchmark.py",
586
+ "src/vtx/tools/write.py",
587
+ "Site/src/index.css",
588
+ "src/vtx/ui/styles.py",
589
+ "src/vtx/ui/commands/settings.py"
590
+ ],
591
+ "hit_at_1": false,
592
+ "hit_at_5": false,
593
+ "hit_at_10": false,
594
+ "top1_score": 0.0191
595
+ },
596
+ {
597
+ "query": "plugin extension registration loading",
598
+ "description": "Extension loading",
599
+ "expected_file": "extensions",
600
+ "latency_ms": 5.5,
601
+ "top1_file": "src/vtx/extensions.py",
602
+ "top5_files": [
603
+ "src/vtx/extensions.py",
604
+ "Site/src/content/blog/mcp-extensions.ts",
605
+ "benchmark.py",
606
+ "src/vtx/ui/app.py",
607
+ "src/vtx/extensions.py"
608
+ ],
609
+ "top10_files": [
610
+ "src/vtx/extensions.py",
611
+ "Site/src/content/blog/mcp-extensions.ts",
612
+ "benchmark.py",
613
+ "src/vtx/ui/app.py",
614
+ "src/vtx/extensions.py",
615
+ "Site/src/components/FeaturesPage.tsx",
616
+ "Site/scripts/prerender.mjs",
617
+ "Site/src/content/blog/mcp-extensions.ts",
618
+ "src/vtx/cli.py",
619
+ "src/vtx/llm/providers/supercode.py"
620
+ ],
621
+ "hit_at_1": true,
622
+ "hit_at_5": true,
623
+ "hit_at_10": true,
624
+ "top1_score": 0.0229
625
+ },
626
+ {
627
+ "query": "builtin skill definition and registration",
628
+ "description": "Builtin skills",
629
+ "expected_file": "builtin_skill",
630
+ "latency_ms": 4.26,
631
+ "top1_file": "src/vtx/context/skills.py",
632
+ "top5_files": [
633
+ "src/vtx/context/skills.py",
634
+ "src/vtx/tools/skill.py",
635
+ "src/vtx/sdk/skills.py",
636
+ "benchmark.py",
637
+ "Site/src/content/blog/agentskill.ts"
638
+ ],
639
+ "top10_files": [
640
+ "src/vtx/context/skills.py",
641
+ "src/vtx/tools/skill.py",
642
+ "src/vtx/sdk/skills.py",
643
+ "benchmark.py",
644
+ "Site/src/content/blog/agentskill.ts",
645
+ "Site/src/components/FeaturesPage.tsx",
646
+ "src/vtx/context/loader.py",
647
+ "src/vtx/context/skills.py",
648
+ "src/vtx/extensions.py",
649
+ "src/vtx/tools/skill.py"
650
+ ],
651
+ "hit_at_1": false,
652
+ "hit_at_5": false,
653
+ "hit_at_10": false,
654
+ "top1_score": 0.0209
655
+ },
656
+ {
657
+ "query": "skill slash command frontmatter parsing",
658
+ "description": "Skill frontmatter",
659
+ "expected_file": "builtin_skill",
660
+ "latency_ms": 4.37,
661
+ "top1_file": "src/vtx/context/skills.py",
662
+ "top5_files": [
663
+ "src/vtx/context/skills.py",
664
+ "Site/src/components/FeaturesPage.tsx",
665
+ "src/vtx/ui/autocomplete.py",
666
+ "src/vtx/ui/app.py",
667
+ "Site/src/content/blog/agentskill.ts"
668
+ ],
669
+ "top10_files": [
670
+ "src/vtx/context/skills.py",
671
+ "Site/src/components/FeaturesPage.tsx",
672
+ "src/vtx/ui/autocomplete.py",
673
+ "src/vtx/ui/app.py",
674
+ "Site/src/content/blog/agentskill.ts",
675
+ "Site/src/components/Capabilities.tsx",
676
+ "src/vtx/tools/skill.py",
677
+ "src/vtx/context/skills.py",
678
+ "src/vtx/sdk/skills.py",
679
+ "src/vtx/ui/commands/agents.py"
680
+ ],
681
+ "hit_at_1": false,
682
+ "hit_at_5": false,
683
+ "hit_at_10": false,
684
+ "top1_score": 0.0206
685
+ },
686
+ {
687
+ "query": "subagent invocation and communication",
688
+ "description": "Subagent invocation",
689
+ "expected_file": "agents",
690
+ "latency_ms": 4.08,
691
+ "top1_file": "src/vtx/tools/task.py",
692
+ "top5_files": [
693
+ "src/vtx/tools/task.py",
694
+ "src/vtx/loop.py",
695
+ "src/vtx/config.py",
696
+ "src/vtx/ui/app.py",
697
+ "benchmark.py"
698
+ ],
699
+ "top10_files": [
700
+ "src/vtx/tools/task.py",
701
+ "src/vtx/loop.py",
702
+ "src/vtx/config.py",
703
+ "src/vtx/ui/app.py",
704
+ "benchmark.py",
705
+ "src/vtx/llm/providers/openai_sdk.py",
706
+ "src/vtx/tools/background.py",
707
+ "src/vtx/tools/ask_user.py",
708
+ "src/vtx/ui/chat.py",
709
+ "src/vtx/agents/api.py"
710
+ ],
711
+ "hit_at_1": false,
712
+ "hit_at_5": false,
713
+ "hit_at_10": true,
714
+ "top1_score": 0.0169
715
+ },
716
+ {
717
+ "query": "agent message passing protocol",
718
+ "description": "Agent messaging",
719
+ "expected_file": "agents",
720
+ "latency_ms": 4.67,
721
+ "top1_file": "src/vtx/agents/loader.py",
722
+ "top5_files": [
723
+ "src/vtx/agents/loader.py",
724
+ "src/vtx/ui/app_protocol.py",
725
+ "src/vtx/ui/commands/sessions.py",
726
+ "src/vtx/ui/commands/agents.py",
727
+ "src/vtx/agents/api.py"
728
+ ],
729
+ "top10_files": [
730
+ "src/vtx/agents/loader.py",
731
+ "src/vtx/ui/app_protocol.py",
732
+ "src/vtx/ui/commands/sessions.py",
733
+ "src/vtx/ui/commands/agents.py",
734
+ "src/vtx/agents/api.py",
735
+ "src/vtx/agent_runner.py",
736
+ "src/vtx/runtime.py",
737
+ "src/vtx/hooks/agent_hook.py",
738
+ "src/vtx/ui/agent_runner.py",
739
+ "benchmark.py"
740
+ ],
741
+ "hit_at_1": true,
742
+ "hit_at_5": true,
743
+ "hit_at_10": true,
744
+ "top1_score": 0.0127
745
+ },
746
+ {
747
+ "query": "pre-commit hook integration",
748
+ "description": "Pre-commit hooks",
749
+ "expected_file": "hooks",
750
+ "latency_ms": 4.65,
751
+ "top1_file": "src/vtx/hooks/loader.py",
752
+ "top5_files": [
753
+ "src/vtx/hooks/loader.py",
754
+ "src/vtx/hooks/bridge.py",
755
+ "src/vtx/hooks/types.py",
756
+ "benchmark.py",
757
+ "src/vtx/hooks/agent_hook.py"
758
+ ],
759
+ "top10_files": [
760
+ "src/vtx/hooks/loader.py",
761
+ "src/vtx/hooks/bridge.py",
762
+ "src/vtx/hooks/types.py",
763
+ "benchmark.py",
764
+ "src/vtx/hooks/agent_hook.py",
765
+ "src/vtx/hooks/registry.py",
766
+ "Site/scripts/prerender.mjs",
767
+ "src/vtx/hooks/__init__.py",
768
+ "src/vtx/hooks/runtime.py",
769
+ "src/vtx/hooks/bridge.py"
770
+ ],
771
+ "hit_at_1": true,
772
+ "hit_at_5": true,
773
+ "hit_at_10": true,
774
+ "top1_score": 0.0214
775
+ },
776
+ {
777
+ "query": "async utility helpers gather timeout",
778
+ "description": "Async utilities",
779
+ "expected_file": "async_utils",
780
+ "latency_ms": 4.27,
781
+ "top1_file": "src/vtx/turn.py",
782
+ "top5_files": [
783
+ "src/vtx/turn.py",
784
+ "src/vtx/hooks/bridge.py",
785
+ "benchmark.py",
786
+ "src/vtx/tools/web.py",
787
+ "src/vtx/update_check.py"
788
+ ],
789
+ "top10_files": [
790
+ "src/vtx/turn.py",
791
+ "src/vtx/hooks/bridge.py",
792
+ "benchmark.py",
793
+ "src/vtx/tools/web.py",
794
+ "src/vtx/update_check.py",
795
+ "src/vtx/tools/background.py",
796
+ "src/vtx/tools/bash.py",
797
+ "src/vtx/llm/oauth/copilot.py",
798
+ "src/vtx/llm/sdk/anthropic.py",
799
+ "src/vtx/llm/sdk/openai.py"
800
+ ],
801
+ "hit_at_1": false,
802
+ "hit_at_5": false,
803
+ "hit_at_10": false,
804
+ "top1_score": 0.018
805
+ },
806
+ {
807
+ "query": "headless non-interactive execution mode",
808
+ "description": "Headless mode",
809
+ "expected_file": "headless",
810
+ "latency_ms": 4.91,
811
+ "top1_file": "Site/src/components/FeaturesPage.tsx",
812
+ "top5_files": [
813
+ "Site/src/components/FeaturesPage.tsx",
814
+ "Site/src/hooks/useRouteMeta.ts",
815
+ "scripts/install.sh",
816
+ "src/vtx/headless.py",
817
+ "benchmark.py"
818
+ ],
819
+ "top10_files": [
820
+ "Site/src/components/FeaturesPage.tsx",
821
+ "Site/src/hooks/useRouteMeta.ts",
822
+ "scripts/install.sh",
823
+ "src/vtx/headless.py",
824
+ "benchmark.py",
825
+ "Site/src/components/Capabilities.tsx",
826
+ ".agents/skills/vtx-tmux-test/run-e2e-tests.sh",
827
+ "src/vtx/agents/registry.py",
828
+ "src/vtx/ui/app.py",
829
+ "src/vtx/ui/input.py"
830
+ ],
831
+ "hit_at_1": false,
832
+ "hit_at_5": true,
833
+ "hit_at_10": true,
834
+ "top1_score": 0.0195
835
+ },
836
+ {
837
+ "query": "error handling exception retry logic",
838
+ "description": "Generic: error handling (open)",
839
+ "expected_file": null,
840
+ "latency_ms": 4.43,
841
+ "top1_file": "src/vtx/turn.py",
842
+ "top5_files": [
843
+ "src/vtx/turn.py",
844
+ "src/vtx/core/errors.py",
845
+ "src/vtx/llm/rate_limit.py",
846
+ "src/vtx/tools/background.py",
847
+ "benchmark.py"
848
+ ],
849
+ "top10_files": [
850
+ "src/vtx/turn.py",
851
+ "src/vtx/core/errors.py",
852
+ "src/vtx/llm/rate_limit.py",
853
+ "src/vtx/tools/background.py",
854
+ "benchmark.py",
855
+ "src/vtx/llm/sdk/openai.py",
856
+ "src/vtx/llm/sdk/anthropic.py",
857
+ "src/vtx/llm/base.py",
858
+ "src/vtx/sdk/permissions.py",
859
+ "src/vtx/extensions.py"
860
+ ],
861
+ "hit_at_1": null,
862
+ "hit_at_5": null,
863
+ "hit_at_10": null,
864
+ "top1_score": 0.018
865
+ },
866
+ {
867
+ "query": "logging setup structured log output",
868
+ "description": "Generic: logging (open)",
869
+ "expected_file": null,
870
+ "latency_ms": 4.74,
871
+ "top1_file": "src/vtx/loop.py",
872
+ "top5_files": [
873
+ "src/vtx/loop.py",
874
+ "Site/src/content/blog/memory-compaction.ts",
875
+ "Site/src/components/FeaturesPage.tsx",
876
+ "src/vtx/ui/session_ui.py",
877
+ ".agents/skills/vtx-tmux-test/setup-test-project.sh"
878
+ ],
879
+ "top10_files": [
880
+ "src/vtx/loop.py",
881
+ "Site/src/content/blog/memory-compaction.ts",
882
+ "Site/src/components/FeaturesPage.tsx",
883
+ "src/vtx/ui/session_ui.py",
884
+ ".agents/skills/vtx-tmux-test/setup-test-project.sh",
885
+ "src/vtx/llm/sdk/openai.py",
886
+ "benchmark.py",
887
+ "src/vtx/agents/api.py",
888
+ "src/vtx/ui/export.py",
889
+ "src/vtx/hooks/loader.py"
890
+ ],
891
+ "hit_at_1": null,
892
+ "hit_at_5": null,
893
+ "hit_at_10": null,
894
+ "top1_score": 0.0166
895
+ },
896
+ {
897
+ "query": "test fixtures mock patching pytest",
898
+ "description": "Test utilities",
899
+ "expected_file": "tests",
900
+ "latency_ms": 4.19,
901
+ "top1_file": "benchmark.py",
902
+ "top5_files": [
903
+ "benchmark.py",
904
+ ".agents/skills/vtx-tmux-test/run-e2e-tests.sh",
905
+ "tests/llm/test_mock_provider.py",
906
+ "tests/ui/test_shell_command_detection.py",
907
+ "src/vtx/llm/dynamic_models.py"
908
+ ],
909
+ "top10_files": [
910
+ "benchmark.py",
911
+ ".agents/skills/vtx-tmux-test/run-e2e-tests.sh",
912
+ "tests/llm/test_mock_provider.py",
913
+ "tests/ui/test_shell_command_detection.py",
914
+ "src/vtx/llm/dynamic_models.py",
915
+ "src/vtx/llm/sdk/openai.py",
916
+ "Site/src/index.css",
917
+ "tests/sdk/test_provider_field.py",
918
+ "tests/test_agentic_loop.py",
919
+ "tests/sdk/test_integration.py"
920
+ ],
921
+ "hit_at_1": false,
922
+ "hit_at_5": true,
923
+ "hit_at_10": true,
924
+ "top1_score": 0.0141
925
+ }
926
+ ],
927
+ "recall_at_1": 0.3929,
928
+ "recall_at_5": 0.6071,
929
+ "recall_at_10": 0.7143,
930
+ "mean_latency_ms": 4.85,
931
+ "p50_latency_ms": 4.66,
932
+ "p95_latency_ms": 5.9,
933
+ "p99_latency_ms": 6.25,
934
+ "evaluated_queries": 28,
935
+ "open_queries": 2
936
+ },
937
+ {
938
+ "model_name": "VTXAI/vtx-embed-7M",
939
+ "model_label": "LF4 vtx-embed-7M (mini)",
940
+ "embedding_dim": 256,
941
+ "model_size_mb": 4.72448,
942
+ "index_dir": "/tmp/vtx_bench_LF4_vtx-embed-7M_(mini)_dt5m3366",
943
+ "indexed_files": 330,
944
+ "total_chunks": 2040,
945
+ "chunk_size": 1500,
946
+ "chunk_overlap": 200,
947
+ "languages": {
948
+ "python": 1839,
949
+ "typescript": 27,
950
+ "tsx": 129,
951
+ "javascript": 10,
952
+ "bash": 16,
953
+ "css": 13,
954
+ "powershell": 5
955
+ },
956
+ "index_time_ms": 3056.6,
957
+ "peak_ram_mb": 0.0,
958
+ "memo_hits": 0,
959
+ "memo_misses": 2040,
960
+ "query_results": [
961
+ {
962
+ "query": "agent runner main loop execution",
963
+ "description": "Agent runner entry point",
964
+ "expected_file": "agent_runner",
965
+ "latency_ms": 6.35,
966
+ "top1_file": "Site/src/content/blog/agentic-loop.ts",
967
+ "top5_files": [
968
+ "Site/src/content/blog/agentic-loop.ts",
969
+ "src/vtx/sdk/runner.py",
970
+ "src/vtx/loop.py",
971
+ "src/vtx/agent_runner.py",
972
+ "src/vtx/runtime.py"
973
+ ],
974
+ "top10_files": [
975
+ "Site/src/content/blog/agentic-loop.ts",
976
+ "src/vtx/sdk/runner.py",
977
+ "src/vtx/loop.py",
978
+ "src/vtx/agent_runner.py",
979
+ "src/vtx/runtime.py",
980
+ "src/vtx/ui/agent_runner.py",
981
+ "src/vtx/sdk/handoffs.py",
982
+ "src/vtx/agents/loader.py",
983
+ "src/vtx/ui/commands/agents.py",
984
+ "src/vtx/sdk/run_config.py"
985
+ ],
986
+ "hit_at_1": false,
987
+ "hit_at_5": true,
988
+ "hit_at_10": true,
989
+ "top1_score": 0.0228
990
+ },
991
+ {
992
+ "query": "how does the agent run tasks asynchronously",
993
+ "description": "Async task execution",
994
+ "expected_file": "agent_runner",
995
+ "latency_ms": 6.0,
996
+ "top1_file": "src/vtx/runtime.py",
997
+ "top5_files": [
998
+ "src/vtx/runtime.py",
999
+ "Site/src/content/blog/agentic-loop.ts",
1000
+ "src/vtx/agents/loader.py",
1001
+ "src/vtx/sdk/runner.py",
1002
+ "src/vtx/tools/task.py"
1003
+ ],
1004
+ "top10_files": [
1005
+ "src/vtx/runtime.py",
1006
+ "Site/src/content/blog/agentic-loop.ts",
1007
+ "src/vtx/agents/loader.py",
1008
+ "src/vtx/sdk/runner.py",
1009
+ "src/vtx/tools/task.py",
1010
+ "src/vtx/tools/background.py",
1011
+ "src/vtx/sdk/run_config.py",
1012
+ "Site/src/content/blog/agentskill.ts",
1013
+ "src/vtx/ui/commands/agents.py",
1014
+ "src/vtx/sdk/results.py"
1015
+ ],
1016
+ "hit_at_1": false,
1017
+ "hit_at_5": false,
1018
+ "hit_at_10": false,
1019
+ "top1_score": 0.024
1020
+ },
1021
+ {
1022
+ "query": "command line interface argument parsing",
1023
+ "description": "CLI argument parsing",
1024
+ "expected_file": "cli",
1025
+ "latency_ms": 5.96,
1026
+ "top1_file": "src/vtx/cli.py",
1027
+ "top5_files": [
1028
+ "src/vtx/cli.py",
1029
+ "benchmark.py",
1030
+ "scripts/show_themes.py",
1031
+ "src/vtx/tools/bash.py",
1032
+ "src/vtx/extensions.py"
1033
+ ],
1034
+ "top10_files": [
1035
+ "src/vtx/cli.py",
1036
+ "benchmark.py",
1037
+ "scripts/show_themes.py",
1038
+ "src/vtx/tools/bash.py",
1039
+ "src/vtx/extensions.py",
1040
+ "src/vtx/ui/agent_runner.py",
1041
+ "src/vtx/agents/api.py",
1042
+ "src/vtx/tools/edit.py",
1043
+ "src/vtx/ui/input.py",
1044
+ "src/vtx/tools/find.py"
1045
+ ],
1046
+ "hit_at_1": true,
1047
+ "hit_at_5": true,
1048
+ "hit_at_10": true,
1049
+ "top1_score": 0.0195
1050
+ },
1051
+ {
1052
+ "query": "vtx CLI entry point argparse",
1053
+ "description": "CLI argparse setup",
1054
+ "expected_file": "cli",
1055
+ "latency_ms": 6.15,
1056
+ "top1_file": "src/vtx/cli.py",
1057
+ "top5_files": [
1058
+ "src/vtx/cli.py",
1059
+ "src/vtx/extensions.py",
1060
+ "scripts/show_themes.py",
1061
+ "benchmark.py",
1062
+ "src/vtx/gh_cli.py"
1063
+ ],
1064
+ "top10_files": [
1065
+ "src/vtx/cli.py",
1066
+ "src/vtx/extensions.py",
1067
+ "scripts/show_themes.py",
1068
+ "benchmark.py",
1069
+ "src/vtx/gh_cli.py",
1070
+ "src/vtx/prompts/builder.py",
1071
+ "src/vtx/ui/launch.py",
1072
+ "src/vtx/session.py",
1073
+ "src/vtx/cli.py",
1074
+ "src/vtx/config.py"
1075
+ ],
1076
+ "hit_at_1": true,
1077
+ "hit_at_5": true,
1078
+ "hit_at_10": true,
1079
+ "top1_score": 0.0269
1080
+ },
1081
+ {
1082
+ "query": "configuration loading and defaults",
1083
+ "description": "Config loading",
1084
+ "expected_file": "config",
1085
+ "latency_ms": 6.13,
1086
+ "top1_file": "src/vtx/config.py",
1087
+ "top5_files": [
1088
+ "src/vtx/config.py",
1089
+ "src/vtx/hooks/loader.py",
1090
+ "src/vtx/llm/oauth/dynamic.py",
1091
+ "src/vtx/sdk/run_config.py",
1092
+ "src/vtx/llm/provider_catalog.py"
1093
+ ],
1094
+ "top10_files": [
1095
+ "src/vtx/config.py",
1096
+ "src/vtx/hooks/loader.py",
1097
+ "src/vtx/llm/oauth/dynamic.py",
1098
+ "src/vtx/sdk/run_config.py",
1099
+ "src/vtx/llm/provider_catalog.py",
1100
+ "src/vtx/extensions.py",
1101
+ "src/vtx/config.py",
1102
+ "benchmark.py",
1103
+ "Site/src/content/docs/index.ts",
1104
+ "src/vtx/dispatcher.py"
1105
+ ],
1106
+ "hit_at_1": true,
1107
+ "hit_at_5": true,
1108
+ "hit_at_10": true,
1109
+ "top1_score": 0.0209
1110
+ },
1111
+ {
1112
+ "query": "user config file path resolution",
1113
+ "description": "Config path resolution",
1114
+ "expected_file": "config",
1115
+ "latency_ms": 6.22,
1116
+ "top1_file": "src/vtx/config.py",
1117
+ "top5_files": [
1118
+ "src/vtx/config.py",
1119
+ "src/vtx/extensions.py",
1120
+ "src/vtx/tools/write.py",
1121
+ "src/vtx/llm/provider_catalog.py",
1122
+ "scripts/show_themes.py"
1123
+ ],
1124
+ "top10_files": [
1125
+ "src/vtx/config.py",
1126
+ "src/vtx/extensions.py",
1127
+ "src/vtx/tools/write.py",
1128
+ "src/vtx/llm/provider_catalog.py",
1129
+ "scripts/show_themes.py",
1130
+ "src/vtx/tools/edit.py",
1131
+ "src/vtx/context/agent_mds.py",
1132
+ "src/vtx/tools_manager.py",
1133
+ "src/vtx/ui/path_complete.py",
1134
+ "Site/vite.config.ts"
1135
+ ],
1136
+ "hit_at_1": true,
1137
+ "hit_at_5": true,
1138
+ "hit_at_10": true,
1139
+ "top1_score": 0.0201
1140
+ },
1141
+ {
1142
+ "query": "LLM API call streaming response",
1143
+ "description": "LLM streaming",
1144
+ "expected_file": "llm",
1145
+ "latency_ms": 5.86,
1146
+ "top1_file": "src/vtx/llm/sdk/supercode.py",
1147
+ "top5_files": [
1148
+ "src/vtx/llm/sdk/supercode.py",
1149
+ "src/vtx/turn.py",
1150
+ "src/vtx/ui/blocks.py",
1151
+ "src/vtx/llm/providers/mock.py",
1152
+ "src/vtx/llm/dynamic_models.py"
1153
+ ],
1154
+ "top10_files": [
1155
+ "src/vtx/llm/sdk/supercode.py",
1156
+ "src/vtx/turn.py",
1157
+ "src/vtx/ui/blocks.py",
1158
+ "src/vtx/llm/providers/mock.py",
1159
+ "src/vtx/llm/dynamic_models.py",
1160
+ "src/vtx/llm/phase_parser.py",
1161
+ "src/vtx/llm/sdk/base.py",
1162
+ "src/vtx/llm/base.py",
1163
+ "src/vtx/llm/rate_limit.py",
1164
+ "benchmark.py"
1165
+ ],
1166
+ "hit_at_1": true,
1167
+ "hit_at_5": true,
1168
+ "hit_at_10": true,
1169
+ "top1_score": 0.018
1170
+ },
1171
+ {
1172
+ "query": "model provider selection gemini openai",
1173
+ "description": "Model provider",
1174
+ "expected_file": "llm",
1175
+ "latency_ms": 5.62,
1176
+ "top1_file": "src/vtx/llm/providers/openai_sdk.py",
1177
+ "top5_files": [
1178
+ "src/vtx/llm/providers/openai_sdk.py",
1179
+ "src/vtx/ui/commands/providers.py",
1180
+ "src/vtx/runtime.py",
1181
+ "src/vtx/llm/sdk/openai.py",
1182
+ "src/vtx/ui/commands/models.py"
1183
+ ],
1184
+ "top10_files": [
1185
+ "src/vtx/llm/providers/openai_sdk.py",
1186
+ "src/vtx/ui/commands/providers.py",
1187
+ "src/vtx/runtime.py",
1188
+ "src/vtx/llm/sdk/openai.py",
1189
+ "src/vtx/ui/commands/models.py",
1190
+ "src/vtx/llm/models.py",
1191
+ "src/vtx/ui/commands/auth.py",
1192
+ "src/vtx/ui/selection_mode.py",
1193
+ "Site/src/components/FeaturesPage.tsx",
1194
+ "src/vtx/ui/app.py"
1195
+ ],
1196
+ "hit_at_1": true,
1197
+ "hit_at_5": true,
1198
+ "hit_at_10": true,
1199
+ "top1_score": 0.0182
1200
+ },
1201
+ {
1202
+ "query": "token counting and context window management",
1203
+ "description": "Token counting",
1204
+ "expected_file": "llm",
1205
+ "latency_ms": 5.65,
1206
+ "top1_file": "src/vtx/llm/dynamic_models.py",
1207
+ "top5_files": [
1208
+ "src/vtx/llm/dynamic_models.py",
1209
+ "src/vtx/ui/widgets.py",
1210
+ "src/vtx/core/compaction.py",
1211
+ "src/vtx/session.py",
1212
+ "Site/src/content/blog/memory-compaction.ts"
1213
+ ],
1214
+ "top10_files": [
1215
+ "src/vtx/llm/dynamic_models.py",
1216
+ "src/vtx/ui/widgets.py",
1217
+ "src/vtx/core/compaction.py",
1218
+ "src/vtx/session.py",
1219
+ "Site/src/content/blog/memory-compaction.ts",
1220
+ "src/vtx/loop.py",
1221
+ "src/vtx/tools/background.py",
1222
+ "src/vtx/ui/app.py",
1223
+ "src/vtx/llm/model_fetcher.py",
1224
+ "src/vtx/sdk/tracing/tracing_impl.py"
1225
+ ],
1226
+ "hit_at_1": true,
1227
+ "hit_at_5": true,
1228
+ "hit_at_10": true,
1229
+ "top1_score": 0.0175
1230
+ },
1231
+ {
1232
+ "query": "context window governance truncation",
1233
+ "description": "Context governance",
1234
+ "expected_file": "context_governance",
1235
+ "latency_ms": 6.55,
1236
+ "top1_file": "src/vtx/llm/dynamic_models.py",
1237
+ "top5_files": [
1238
+ "src/vtx/llm/dynamic_models.py",
1239
+ "src/vtx/context_governance.py",
1240
+ "src/vtx/ui/widgets.py",
1241
+ "src/vtx/tools/bash.py",
1242
+ "src/vtx/llm/model_fetcher.py"
1243
+ ],
1244
+ "top10_files": [
1245
+ "src/vtx/llm/dynamic_models.py",
1246
+ "src/vtx/context_governance.py",
1247
+ "src/vtx/ui/widgets.py",
1248
+ "src/vtx/tools/bash.py",
1249
+ "src/vtx/llm/model_fetcher.py",
1250
+ "src/vtx/core/compaction.py",
1251
+ "src/vtx/llm/context_length.py",
1252
+ "src/vtx/context/skills.py",
1253
+ "Site/src/content/blog/memory-compaction.ts",
1254
+ "src/vtx/context/git.py"
1255
+ ],
1256
+ "hit_at_1": false,
1257
+ "hit_at_5": true,
1258
+ "hit_at_10": true,
1259
+ "top1_score": 0.0189
1260
+ },
1261
+ {
1262
+ "query": "context item priority ranking",
1263
+ "description": "Context priority",
1264
+ "expected_file": "context",
1265
+ "latency_ms": 7.03,
1266
+ "top1_file": "src/vtx/ui/commands/settings.py",
1267
+ "top5_files": [
1268
+ "src/vtx/ui/commands/settings.py",
1269
+ "src/vtx/ui/input.py",
1270
+ "src/vtx/ui/app.py",
1271
+ "src/vtx/ui/tree.py",
1272
+ "src/vtx/ui/completion_ui.py"
1273
+ ],
1274
+ "top10_files": [
1275
+ "src/vtx/ui/commands/settings.py",
1276
+ "src/vtx/ui/input.py",
1277
+ "src/vtx/ui/app.py",
1278
+ "src/vtx/ui/tree.py",
1279
+ "src/vtx/ui/completion_ui.py",
1280
+ "src/vtx/llm/dynamic_models.py",
1281
+ "src/vtx/sdk/items.py",
1282
+ "src/vtx/llm/oauth/dynamic.py",
1283
+ "src/vtx/context/skills.py",
1284
+ "src/vtx/ui/floating_list.py"
1285
+ ],
1286
+ "hit_at_1": false,
1287
+ "hit_at_5": false,
1288
+ "hit_at_10": true,
1289
+ "top1_score": 0.0186
1290
+ },
1291
+ {
1292
+ "query": "tool dispatcher routing function calls",
1293
+ "description": "Tool dispatcher",
1294
+ "expected_file": "dispatcher",
1295
+ "latency_ms": 6.54,
1296
+ "top1_file": "src/vtx/dispatcher.py",
1297
+ "top5_files": [
1298
+ "src/vtx/dispatcher.py",
1299
+ "src/vtx/runtime.py",
1300
+ "scripts/supercode_proxy.py",
1301
+ "src/vtx/llm/sdk/supercode.py",
1302
+ "src/vtx/llm/providers/supercode.py"
1303
+ ],
1304
+ "top10_files": [
1305
+ "src/vtx/dispatcher.py",
1306
+ "src/vtx/runtime.py",
1307
+ "scripts/supercode_proxy.py",
1308
+ "src/vtx/llm/sdk/supercode.py",
1309
+ "src/vtx/llm/providers/supercode.py",
1310
+ "src/vtx/llm/tool_parser.py",
1311
+ "src/vtx/turn.py",
1312
+ "src/vtx/llm/base.py",
1313
+ "src/vtx/context_governance.py",
1314
+ "src/vtx/ui/export.py"
1315
+ ],
1316
+ "hit_at_1": true,
1317
+ "hit_at_5": true,
1318
+ "hit_at_10": true,
1319
+ "top1_score": 0.0222
1320
+ },
1321
+ {
1322
+ "query": "dispatch tool call with arguments",
1323
+ "description": "Tool call dispatch",
1324
+ "expected_file": "dispatcher",
1325
+ "latency_ms": 7.46,
1326
+ "top1_file": "src/vtx/turn.py",
1327
+ "top5_files": [
1328
+ "src/vtx/turn.py",
1329
+ "src/vtx/ui/tree.py",
1330
+ "src/vtx/ui/session_ui.py",
1331
+ "src/vtx/dispatcher.py",
1332
+ "src/vtx/llm/base.py"
1333
+ ],
1334
+ "top10_files": [
1335
+ "src/vtx/turn.py",
1336
+ "src/vtx/ui/tree.py",
1337
+ "src/vtx/ui/session_ui.py",
1338
+ "src/vtx/dispatcher.py",
1339
+ "src/vtx/llm/base.py",
1340
+ "src/vtx/llm/tool_parser.py",
1341
+ "src/vtx/tools/base.py",
1342
+ "src/vtx/llm/sdk/supercode.py",
1343
+ "src/vtx/tools/task.py",
1344
+ "src/vtx/llm/providers/mock.py"
1345
+ ],
1346
+ "hit_at_1": false,
1347
+ "hit_at_5": true,
1348
+ "hit_at_10": true,
1349
+ "top1_score": 0.0184
1350
+ },
1351
+ {
1352
+ "query": "event system publish subscribe hooks",
1353
+ "description": "Event system",
1354
+ "expected_file": "events",
1355
+ "latency_ms": 6.33,
1356
+ "top1_file": "src/vtx/hooks/loader.py",
1357
+ "top5_files": [
1358
+ "src/vtx/hooks/loader.py",
1359
+ "src/vtx/hooks/bridge.py",
1360
+ "src/vtx/hooks/registry.py",
1361
+ "src/vtx/hooks/runtime.py",
1362
+ "src/vtx/hooks/agent_hook.py"
1363
+ ],
1364
+ "top10_files": [
1365
+ "src/vtx/hooks/loader.py",
1366
+ "src/vtx/hooks/bridge.py",
1367
+ "src/vtx/hooks/registry.py",
1368
+ "src/vtx/hooks/runtime.py",
1369
+ "src/vtx/hooks/agent_hook.py",
1370
+ "src/vtx/agent_runner.py",
1371
+ "src/vtx/turn.py",
1372
+ "src/vtx/loop.py",
1373
+ "Site/src/content/blog/mcp-extensions.ts",
1374
+ "src/vtx/extensions.py"
1375
+ ],
1376
+ "hit_at_1": false,
1377
+ "hit_at_5": false,
1378
+ "hit_at_10": false,
1379
+ "top1_score": 0.0213
1380
+ },
1381
+ {
1382
+ "query": "streaming event output to terminal",
1383
+ "description": "Event streaming",
1384
+ "expected_file": "events",
1385
+ "latency_ms": 6.67,
1386
+ "top1_file": "src/vtx/turn.py",
1387
+ "top5_files": [
1388
+ "src/vtx/turn.py",
1389
+ "src/vtx/tools/bash.py",
1390
+ "src/vtx/ui/blocks.py",
1391
+ "Site/src/components/FeaturesPage.tsx",
1392
+ "Site/src/components/Hero.tsx"
1393
+ ],
1394
+ "top10_files": [
1395
+ "src/vtx/turn.py",
1396
+ "src/vtx/tools/bash.py",
1397
+ "src/vtx/ui/blocks.py",
1398
+ "Site/src/components/FeaturesPage.tsx",
1399
+ "Site/src/components/Hero.tsx",
1400
+ "src/vtx/tools/task.py",
1401
+ "src/vtx/events.py",
1402
+ "Site/src/components/TerminalBlock.tsx",
1403
+ "src/vtx/extensions.py",
1404
+ "benchmark.py"
1405
+ ],
1406
+ "hit_at_1": false,
1407
+ "hit_at_5": false,
1408
+ "hit_at_10": true,
1409
+ "top1_score": 0.0185
1410
+ },
1411
+ {
1412
+ "query": "git branch creation and switching",
1413
+ "description": "Git branch",
1414
+ "expected_file": "git_branch",
1415
+ "latency_ms": 6.88,
1416
+ "top1_file": "src/vtx/git_branch.py",
1417
+ "top5_files": [
1418
+ "src/vtx/git_branch.py",
1419
+ "src/vtx/context/git.py",
1420
+ "src/vtx/ui/widgets.py",
1421
+ "src/vtx/ui/startup.py",
1422
+ "scripts/install.sh"
1423
+ ],
1424
+ "top10_files": [
1425
+ "src/vtx/git_branch.py",
1426
+ "src/vtx/context/git.py",
1427
+ "src/vtx/ui/widgets.py",
1428
+ "src/vtx/ui/startup.py",
1429
+ "scripts/install.sh",
1430
+ "scripts/install.ps1",
1431
+ "src/vtx/prompts/builder.py",
1432
+ "src/vtx/ui/commands/settings.py",
1433
+ "src/vtx/git_branch.py",
1434
+ "src/vtx/prompts/identity.py"
1435
+ ],
1436
+ "hit_at_1": true,
1437
+ "hit_at_5": true,
1438
+ "hit_at_10": true,
1439
+ "top1_score": 0.0286
1440
+ },
1441
+ {
1442
+ "query": "github CLI integration shell command",
1443
+ "description": "GitHub CLI",
1444
+ "expected_file": "gh_cli",
1445
+ "latency_ms": 6.06,
1446
+ "top1_file": "src/vtx/tools/bash.py",
1447
+ "top5_files": [
1448
+ "src/vtx/tools/bash.py",
1449
+ "Site/src/components/FeaturesPage.tsx",
1450
+ "src/vtx/ui/agent_runner.py",
1451
+ "scripts/install.sh",
1452
+ "scripts/install.ps1"
1453
+ ],
1454
+ "top10_files": [
1455
+ "src/vtx/tools/bash.py",
1456
+ "Site/src/components/FeaturesPage.tsx",
1457
+ "src/vtx/ui/agent_runner.py",
1458
+ "scripts/install.sh",
1459
+ "scripts/install.ps1",
1460
+ "src/vtx/ui/input.py",
1461
+ "src/vtx/llm/oauth/copilot.py",
1462
+ "src/vtx/ui/formatting.py",
1463
+ "src/vtx/context/git.py",
1464
+ "src/vtx/ui/commands/agents.py"
1465
+ ],
1466
+ "hit_at_1": false,
1467
+ "hit_at_5": false,
1468
+ "hit_at_10": false,
1469
+ "top1_score": 0.0165
1470
+ },
1471
+ {
1472
+ "query": "diff display unified patch format",
1473
+ "description": "Diff display",
1474
+ "expected_file": "diff_display",
1475
+ "latency_ms": 6.21,
1476
+ "top1_file": "src/vtx/tools/edit.py",
1477
+ "top5_files": [
1478
+ "src/vtx/tools/edit.py",
1479
+ "src/vtx/ui/blocks.py",
1480
+ "src/vtx/tools/write.py",
1481
+ "src/vtx/diff_display.py",
1482
+ "src/vtx/tools/bash.py"
1483
+ ],
1484
+ "top10_files": [
1485
+ "src/vtx/tools/edit.py",
1486
+ "src/vtx/ui/blocks.py",
1487
+ "src/vtx/tools/write.py",
1488
+ "src/vtx/diff_display.py",
1489
+ "src/vtx/tools/bash.py",
1490
+ "src/vtx/core/types.py",
1491
+ "src/vtx/tools/skill.py",
1492
+ "benchmark.py",
1493
+ "src/vtx/ui/widgets.py",
1494
+ "src/vtx/themes.py"
1495
+ ],
1496
+ "hit_at_1": false,
1497
+ "hit_at_5": true,
1498
+ "hit_at_10": true,
1499
+ "top1_score": 0.0191
1500
+ },
1501
+ {
1502
+ "query": "show file changes colored diff output",
1503
+ "description": "Colored diff",
1504
+ "expected_file": "diff_display",
1505
+ "latency_ms": 5.67,
1506
+ "top1_file": "src/vtx/ui/widgets.py",
1507
+ "top5_files": [
1508
+ "src/vtx/ui/widgets.py",
1509
+ "src/vtx/tools/edit.py",
1510
+ "src/vtx/tools/write.py",
1511
+ "src/vtx/ui/launch.py",
1512
+ "src/vtx/ui/blocks.py"
1513
+ ],
1514
+ "top10_files": [
1515
+ "src/vtx/ui/widgets.py",
1516
+ "src/vtx/tools/edit.py",
1517
+ "src/vtx/tools/write.py",
1518
+ "src/vtx/ui/launch.py",
1519
+ "src/vtx/ui/blocks.py",
1520
+ "src/vtx/ui/commands/settings.py",
1521
+ "src/vtx/ui/app.py",
1522
+ "src/vtx/ui/selection_mode.py",
1523
+ "src/vtx/config.py",
1524
+ "src/vtx/ui/chat.py"
1525
+ ],
1526
+ "hit_at_1": false,
1527
+ "hit_at_5": false,
1528
+ "hit_at_10": false,
1529
+ "top1_score": 0.0192
1530
+ },
1531
+ {
1532
+ "query": "plugin extension registration loading",
1533
+ "description": "Extension loading",
1534
+ "expected_file": "extensions",
1535
+ "latency_ms": 6.21,
1536
+ "top1_file": "src/vtx/extensions.py",
1537
+ "top5_files": [
1538
+ "src/vtx/extensions.py",
1539
+ "Site/src/content/blog/mcp-extensions.ts",
1540
+ "Site/src/components/FeaturesPage.tsx",
1541
+ "src/vtx/hooks/registry.py",
1542
+ "src/vtx/ui/app.py"
1543
+ ],
1544
+ "top10_files": [
1545
+ "src/vtx/extensions.py",
1546
+ "Site/src/content/blog/mcp-extensions.ts",
1547
+ "Site/src/components/FeaturesPage.tsx",
1548
+ "src/vtx/hooks/registry.py",
1549
+ "src/vtx/ui/app.py",
1550
+ "src/vtx/hooks/loader.py",
1551
+ "src/vtx/extensions.py",
1552
+ "benchmark.py",
1553
+ "Site/scripts/prerender.mjs",
1554
+ "src/vtx/hooks/types.py"
1555
+ ],
1556
+ "hit_at_1": true,
1557
+ "hit_at_5": true,
1558
+ "hit_at_10": true,
1559
+ "top1_score": 0.0231
1560
+ },
1561
+ {
1562
+ "query": "builtin skill definition and registration",
1563
+ "description": "Builtin skills",
1564
+ "expected_file": "builtin_skill",
1565
+ "latency_ms": 7.28,
1566
+ "top1_file": "src/vtx/context/skills.py",
1567
+ "top5_files": [
1568
+ "src/vtx/context/skills.py",
1569
+ "src/vtx/tools/skill.py",
1570
+ "src/vtx/sdk/skills.py",
1571
+ "src/vtx/context/loader.py",
1572
+ "Site/src/content/blog/agentskill.ts"
1573
+ ],
1574
+ "top10_files": [
1575
+ "src/vtx/context/skills.py",
1576
+ "src/vtx/tools/skill.py",
1577
+ "src/vtx/sdk/skills.py",
1578
+ "src/vtx/context/loader.py",
1579
+ "Site/src/content/blog/agentskill.ts",
1580
+ "Site/src/components/FeaturesPage.tsx",
1581
+ "src/vtx/ui/app.py",
1582
+ "src/vtx/agents/registry.py",
1583
+ "src/vtx/context/skills.py",
1584
+ "src/vtx/tools/skill.py"
1585
+ ],
1586
+ "hit_at_1": false,
1587
+ "hit_at_5": false,
1588
+ "hit_at_10": false,
1589
+ "top1_score": 0.0226
1590
+ },
1591
+ {
1592
+ "query": "skill slash command frontmatter parsing",
1593
+ "description": "Skill frontmatter",
1594
+ "expected_file": "builtin_skill",
1595
+ "latency_ms": 5.74,
1596
+ "top1_file": "src/vtx/context/skills.py",
1597
+ "top5_files": [
1598
+ "src/vtx/context/skills.py",
1599
+ "Site/src/components/FeaturesPage.tsx",
1600
+ "src/vtx/ui/app.py",
1601
+ "Site/src/content/blog/agentskill.ts",
1602
+ "src/vtx/ui/autocomplete.py"
1603
+ ],
1604
+ "top10_files": [
1605
+ "src/vtx/context/skills.py",
1606
+ "Site/src/components/FeaturesPage.tsx",
1607
+ "src/vtx/ui/app.py",
1608
+ "Site/src/content/blog/agentskill.ts",
1609
+ "src/vtx/ui/autocomplete.py",
1610
+ "src/vtx/tools/skill.py",
1611
+ "src/vtx/ui/input.py",
1612
+ "src/vtx/sdk/skills.py",
1613
+ "src/vtx/ui/commands/agents.py",
1614
+ "src/vtx/context/skills.py"
1615
+ ],
1616
+ "hit_at_1": false,
1617
+ "hit_at_5": false,
1618
+ "hit_at_10": false,
1619
+ "top1_score": 0.0212
1620
+ },
1621
+ {
1622
+ "query": "subagent invocation and communication",
1623
+ "description": "Subagent invocation",
1624
+ "expected_file": "agents",
1625
+ "latency_ms": 6.02,
1626
+ "top1_file": "src/vtx/tools/task.py",
1627
+ "top5_files": [
1628
+ "src/vtx/tools/task.py",
1629
+ "src/vtx/config.py",
1630
+ "src/vtx/dispatcher.py",
1631
+ "benchmark.py",
1632
+ "src/vtx/tools/background.py"
1633
+ ],
1634
+ "top10_files": [
1635
+ "src/vtx/tools/task.py",
1636
+ "src/vtx/config.py",
1637
+ "src/vtx/dispatcher.py",
1638
+ "benchmark.py",
1639
+ "src/vtx/tools/background.py",
1640
+ "src/vtx/extensions.py",
1641
+ "src/vtx/tools/ask_user.py",
1642
+ "src/vtx/ui/chat.py",
1643
+ "src/vtx/loop.py",
1644
+ "src/vtx/llm/sdk/supercode.py"
1645
+ ],
1646
+ "hit_at_1": false,
1647
+ "hit_at_5": false,
1648
+ "hit_at_10": false,
1649
+ "top1_score": 0.017
1650
+ },
1651
+ {
1652
+ "query": "agent message passing protocol",
1653
+ "description": "Agent messaging",
1654
+ "expected_file": "agents",
1655
+ "latency_ms": 7.92,
1656
+ "top1_file": "src/vtx/ui/commands/agents.py",
1657
+ "top5_files": [
1658
+ "src/vtx/ui/commands/agents.py",
1659
+ "src/vtx/agents/loader.py",
1660
+ "src/vtx/ui/app_protocol.py",
1661
+ "src/vtx/sdk/runner.py",
1662
+ "src/vtx/agents/api.py"
1663
+ ],
1664
+ "top10_files": [
1665
+ "src/vtx/ui/commands/agents.py",
1666
+ "src/vtx/agents/loader.py",
1667
+ "src/vtx/ui/app_protocol.py",
1668
+ "src/vtx/sdk/runner.py",
1669
+ "src/vtx/agents/api.py",
1670
+ "src/vtx/agent_runner.py",
1671
+ "src/vtx/runtime.py",
1672
+ "src/vtx/hooks/agent_hook.py",
1673
+ "src/vtx/agents/registry.py",
1674
+ "src/vtx/ui/agent_runner.py"
1675
+ ],
1676
+ "hit_at_1": true,
1677
+ "hit_at_5": true,
1678
+ "hit_at_10": true,
1679
+ "top1_score": 0.0198
1680
+ },
1681
+ {
1682
+ "query": "pre-commit hook integration",
1683
+ "description": "Pre-commit hooks",
1684
+ "expected_file": "hooks",
1685
+ "latency_ms": 7.1,
1686
+ "top1_file": "src/vtx/hooks/bridge.py",
1687
+ "top5_files": [
1688
+ "src/vtx/hooks/bridge.py",
1689
+ "src/vtx/hooks/loader.py",
1690
+ "src/vtx/hooks/types.py",
1691
+ "src/vtx/hooks/agent_hook.py",
1692
+ "src/vtx/hooks/registry.py"
1693
+ ],
1694
+ "top10_files": [
1695
+ "src/vtx/hooks/bridge.py",
1696
+ "src/vtx/hooks/loader.py",
1697
+ "src/vtx/hooks/types.py",
1698
+ "src/vtx/hooks/agent_hook.py",
1699
+ "src/vtx/hooks/registry.py",
1700
+ "Site/scripts/prerender.mjs",
1701
+ "src/vtx/hooks/runtime.py",
1702
+ "src/vtx/hooks/__init__.py",
1703
+ "src/vtx/hooks/loader.py",
1704
+ "src/vtx/hooks/bridge.py"
1705
+ ],
1706
+ "hit_at_1": true,
1707
+ "hit_at_5": true,
1708
+ "hit_at_10": true,
1709
+ "top1_score": 0.0224
1710
+ },
1711
+ {
1712
+ "query": "async utility helpers gather timeout",
1713
+ "description": "Async utilities",
1714
+ "expected_file": "async_utils",
1715
+ "latency_ms": 11.93,
1716
+ "top1_file": "src/vtx/turn.py",
1717
+ "top5_files": [
1718
+ "src/vtx/turn.py",
1719
+ "src/vtx/hooks/bridge.py",
1720
+ "src/vtx/tools/bash.py",
1721
+ "src/vtx/llm/sdk/anthropic.py",
1722
+ "src/vtx/tools/background.py"
1723
+ ],
1724
+ "top10_files": [
1725
+ "src/vtx/turn.py",
1726
+ "src/vtx/hooks/bridge.py",
1727
+ "src/vtx/tools/bash.py",
1728
+ "src/vtx/llm/sdk/anthropic.py",
1729
+ "src/vtx/tools/background.py",
1730
+ "src/vtx/tools/web.py",
1731
+ "src/vtx/tools/_tool_utils.py",
1732
+ "src/vtx/llm/oauth/copilot.py",
1733
+ "src/vtx/llm/providers/mock.py",
1734
+ "benchmark.py"
1735
+ ],
1736
+ "hit_at_1": false,
1737
+ "hit_at_5": false,
1738
+ "hit_at_10": false,
1739
+ "top1_score": 0.0181
1740
+ },
1741
+ {
1742
+ "query": "headless non-interactive execution mode",
1743
+ "description": "Headless mode",
1744
+ "expected_file": "headless",
1745
+ "latency_ms": 15.42,
1746
+ "top1_file": "src/vtx/headless.py",
1747
+ "top5_files": [
1748
+ "src/vtx/headless.py",
1749
+ "Site/src/components/FeaturesPage.tsx",
1750
+ "Site/src/hooks/useRouteMeta.ts",
1751
+ "src/vtx/prompts/identity.py",
1752
+ "Site/src/components/Capabilities.tsx"
1753
+ ],
1754
+ "top10_files": [
1755
+ "src/vtx/headless.py",
1756
+ "Site/src/components/FeaturesPage.tsx",
1757
+ "Site/src/hooks/useRouteMeta.ts",
1758
+ "src/vtx/prompts/identity.py",
1759
+ "Site/src/components/Capabilities.tsx",
1760
+ "src/vtx/cli.py",
1761
+ "src/vtx/ui/commands/settings.py",
1762
+ "src/vtx/ui/app.py",
1763
+ "benchmark.py",
1764
+ "src/vtx/runtime.py"
1765
+ ],
1766
+ "hit_at_1": true,
1767
+ "hit_at_5": true,
1768
+ "hit_at_10": true,
1769
+ "top1_score": 0.0198
1770
+ },
1771
+ {
1772
+ "query": "error handling exception retry logic",
1773
+ "description": "Generic: error handling (open)",
1774
+ "expected_file": null,
1775
+ "latency_ms": 14.02,
1776
+ "top1_file": "src/vtx/llm/rate_limit.py",
1777
+ "top5_files": [
1778
+ "src/vtx/llm/rate_limit.py",
1779
+ "src/vtx/core/errors.py",
1780
+ "src/vtx/turn.py",
1781
+ "src/vtx/llm/sdk/openai.py",
1782
+ "src/vtx/llm/sdk/anthropic.py"
1783
+ ],
1784
+ "top10_files": [
1785
+ "src/vtx/llm/rate_limit.py",
1786
+ "src/vtx/core/errors.py",
1787
+ "src/vtx/turn.py",
1788
+ "src/vtx/llm/sdk/openai.py",
1789
+ "src/vtx/llm/sdk/anthropic.py",
1790
+ "src/vtx/llm/providers/openai_sdk.py",
1791
+ "src/vtx/llm/providers/anthropic_sdk.py",
1792
+ "src/vtx/events.py",
1793
+ "src/vtx/llm/base.py",
1794
+ "src/vtx/tools/background.py"
1795
+ ],
1796
+ "hit_at_1": null,
1797
+ "hit_at_5": null,
1798
+ "hit_at_10": null,
1799
+ "top1_score": 0.0177
1800
+ },
1801
+ {
1802
+ "query": "logging setup structured log output",
1803
+ "description": "Generic: logging (open)",
1804
+ "expected_file": null,
1805
+ "latency_ms": 10.64,
1806
+ "top1_file": "src/vtx/loop.py",
1807
+ "top5_files": [
1808
+ "src/vtx/loop.py",
1809
+ "Site/src/content/blog/memory-compaction.ts",
1810
+ "src/vtx/hooks/loader.py",
1811
+ "src/vtx/hooks/registry.py",
1812
+ "Site/src/components/FeaturesPage.tsx"
1813
+ ],
1814
+ "top10_files": [
1815
+ "src/vtx/loop.py",
1816
+ "Site/src/content/blog/memory-compaction.ts",
1817
+ "src/vtx/hooks/loader.py",
1818
+ "src/vtx/hooks/registry.py",
1819
+ "Site/src/components/FeaturesPage.tsx",
1820
+ "src/vtx/llm/sdk/openai.py",
1821
+ ".agents/skills/vtx-tmux-test/setup-test-project.sh",
1822
+ "src/vtx/ui/session_ui.py",
1823
+ "src/vtx/ui/app.py",
1824
+ "scripts/install.sh"
1825
+ ],
1826
+ "hit_at_1": null,
1827
+ "hit_at_5": null,
1828
+ "hit_at_10": null,
1829
+ "top1_score": 0.0179
1830
+ },
1831
+ {
1832
+ "query": "test fixtures mock patching pytest",
1833
+ "description": "Test utilities",
1834
+ "expected_file": "tests",
1835
+ "latency_ms": 6.85,
1836
+ "top1_file": "benchmark.py",
1837
+ "top5_files": [
1838
+ "benchmark.py",
1839
+ "tests/llm/test_mock_provider.py",
1840
+ "tests/ui/test_shell_command_detection.py",
1841
+ "tests/test_rate_limit.py",
1842
+ "tests/tools/test_web_expand_collapse.py"
1843
+ ],
1844
+ "top10_files": [
1845
+ "benchmark.py",
1846
+ "tests/llm/test_mock_provider.py",
1847
+ "tests/ui/test_shell_command_detection.py",
1848
+ "tests/test_rate_limit.py",
1849
+ "tests/tools/test_web_expand_collapse.py",
1850
+ "tests/tools/test_subprocess_cancellation.py",
1851
+ "tests/sdk/test_provider_field.py",
1852
+ "tests/sdk/conftest.py",
1853
+ "tests/tools/test_read.py",
1854
+ "tests/test_grep_tool.py"
1855
+ ],
1856
+ "hit_at_1": false,
1857
+ "hit_at_5": true,
1858
+ "hit_at_10": true,
1859
+ "top1_score": 0.0085
1860
+ }
1861
+ ],
1862
+ "recall_at_1": 0.4643,
1863
+ "recall_at_5": 0.6429,
1864
+ "recall_at_10": 0.7143,
1865
+ "mean_latency_ms": 7.28,
1866
+ "p50_latency_ms": 6.34,
1867
+ "p95_latency_ms": 11.93,
1868
+ "p99_latency_ms": 14.02,
1869
+ "evaluated_queries": 28,
1870
+ "open_queries": 2
1871
+ }
1872
+ ]