From 53227eeac51e52410f35238d95d2975cbca96a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Thu, 2 Jul 2026 14:42:25 +0200 Subject: [PATCH 01/15] feat: update scoring mechanism and normalization for retrieval; adjust minScore and schema version --- opencode-rag.example.json | 2 +- src/__tests__/core/config.test.ts | 4 +- src/__tests__/core/manifest.test.ts | 12 +-- src/__tests__/retriever/retriever.test.ts | 44 +++++--- src/__tests__/vectorstore/lancedb.test.ts | 22 +++- src/core/config.ts | 2 +- src/core/interfaces.ts | 14 +++ src/core/manifest.ts | 4 +- src/retriever/retriever.ts | 124 ++++++---------------- src/vectorstore/lancedb.ts | 33 ++++-- 10 files changed, 135 insertions(+), 126 deletions(-) diff --git a/opencode-rag.example.json b/opencode-rag.example.json index 2d3d170..88ddbad 100644 --- a/opencode-rag.example.json +++ b/opencode-rag.example.json @@ -45,7 +45,7 @@ }, "retrieval": { "topK": 20, - "minScore": 0.5, + "minScore": 0.35, "hybridSearch": { "enabled": true, "keywordWeight": 0.4 diff --git a/src/__tests__/core/config.test.ts b/src/__tests__/core/config.test.ts index 988a01a..d7f4eff 100644 --- a/src/__tests__/core/config.test.ts +++ b/src/__tests__/core/config.test.ts @@ -125,8 +125,8 @@ describe("DEFAULT_CONFIG", () => { assert.equal(DEFAULT_CONFIG.retrieval.topK, 20); }); - it("has minScore of 0.5", () => { - assert.equal(DEFAULT_CONFIG.retrieval.minScore, 0.5); + it("has minScore of 0.35 (recalibrated for cosine similarity)", () => { + assert.equal(DEFAULT_CONFIG.retrieval.minScore, 0.35); }); it("has info as default logging level", () => { diff --git a/src/__tests__/core/manifest.test.ts b/src/__tests__/core/manifest.test.ts index 9220810..d67e282 100644 --- a/src/__tests__/core/manifest.test.ts +++ b/src/__tests__/core/manifest.test.ts @@ -20,7 +20,7 @@ async function makeTempDir(name: string): Promise { describe("manifest", () => { it("creates an empty manifest", () => { - assert.deepStrictEqual(createEmptyManifest(), { files: {}, schemaVersion: 2 }); + assert.deepStrictEqual(createEmptyManifest(), { files: {}, schemaVersion: 3 }); }); it("normalizes file paths to absolute forward-slash paths", () => { @@ -38,7 +38,7 @@ describe("manifest", () => { const dir = await makeTempDir("manifest-missing"); const result = await loadManifest(dir); assert.equal(result.status, "missing"); - assert.deepStrictEqual(result.manifest, { files: {}, schemaVersion: 2 }); + assert.deepStrictEqual(result.manifest, { files: {}, schemaVersion: 3 }); assert.equal(result.path, manifestPathFor(dir)); }); @@ -69,11 +69,11 @@ describe("manifest", () => { const result = await loadManifest(dir); assert.equal(result.status, "corrupt"); - assert.deepStrictEqual(result.manifest, { files: {}, schemaVersion: 2 }); + assert.deepStrictEqual(result.manifest, { files: {}, schemaVersion: 3 }); }); - it("accepts schema version 1 as valid (backward compatible)", async () => { - const dir = await makeTempDir("manifest-v1-migration"); + it("rejects schema version 1 as corrupt (below MIN_SUPPORTED_SCHEMA_VERSION)", async () => { + const dir = await makeTempDir("manifest-v1-corrupt"); await fs.mkdir(dir, { recursive: true }); await fs.writeFile( manifestPathFor(dir), @@ -81,7 +81,7 @@ describe("manifest", () => { "utf-8", ); const result = await loadManifest(dir); - assert.equal(result.status, "ok"); + assert.equal(result.status, "corrupt"); }); it("computeDescriptionConfigHash returns undefined when no description or imageConfig sections exist", () => { diff --git a/src/__tests__/retriever/retriever.test.ts b/src/__tests__/retriever/retriever.test.ts index 1b564ab..652adfc 100644 --- a/src/__tests__/retriever/retriever.test.ts +++ b/src/__tests__/retriever/retriever.test.ts @@ -56,7 +56,9 @@ describe("retrieve", () => { const results = await retrieve("test query", embedder, store); assert.equal(results.length, 1); - assert.equal(results[0]!.score, 0.95); + // RRF contribution for single vector result at rank 0: (1-0.4)/(60+0+1) = 0.6/61 + const expectedScore = (1 - 0.4) / (60 + 0 + 1); + assert.ok(Math.abs(results[0]!.score - expectedScore) < 1e-10); assert.equal(results[0]!.chunk.id, "chunk-1"); }); @@ -130,10 +132,12 @@ describe("retrieve", () => { { score: 0.7, chunk: { id: "c", content: "mid", metadata: { filePath: "c.ts", startLine: 1, endLine: 2, language: "ts" } } }, ]); - const results = await retrieve("query", embedder, store, { minScore: 0.6 }); + const results = await retrieve("query", embedder, store, { minScore: 0.0096 }); assert.equal(results.length, 2); - assert.equal(results[0]!.score, 0.9); - assert.equal(results[1]!.score, 0.7); + // RRF contributions: rank 0 → 0.6/61, rank 1 → 0.6/62 + const expectedScores = [(1 - 0.4) / (60 + 0 + 1), (1 - 0.4) / (60 + 1 + 1)]; + assert.ok(Math.abs(results[0]!.score - expectedScores[0]!) < 1e-10); + assert.ok(Math.abs(results[1]!.score - expectedScores[1]!) < 1e-10); }); it("returns all results when minScore is 0", async () => { @@ -184,9 +188,10 @@ describe("retrieve", () => { ]); const results = await retrieve("apple banana", embedder, store, { keywordIndex: ki, keywordWeight: 0.4, minScore: 0 }); assert.equal(results.length, 2); - // Keyword-only chunk (b) ranks highest because its exact keyword match gives kScore 1.0 - // vs vector-only (a) at vScore 0.8 (fix: single-source results are no longer artificially capped) - assert.equal(results[0]!.chunk.id, "b"); + // With RRF and kw=0.4, vector-only (a) at rank 0 contributes (1-0.4)/(60+1) = 0.6/61 + // vs keyword-only (b) at rank 0 contributes 0.4/(60+1) = 0.4/61 + // vector-only ranks higher since vWeight > kWeight for equal ranks + assert.equal(results[0]!.chunk.id, "a"); }); it("respects keywordWeight parameter", async () => { @@ -248,12 +253,13 @@ describe("retrieve", () => { minScore: 0, }); assert.equal(results.length, 2); - // Chunk "a" is hybrid: (1-0.4)*normV + 0.4*kScore - // vTopScore = 0.8, normV(a) = 0.8/0.8 = 1.0, score = 0.6*1.0 + 0.4*kScore - // Chunk "b" is vector-only: (1-0.4)*normV(b) = 0.6*(0.4/0.8) = 0.3 + // With RRF, chunk "a" (hybrid, rank 0 in both) gets score = (1-0.4)/(60+1) + 0.4/(60+1) + // Chunk "b" (vector-only, rank 1) gets score = (1-0.4)/(60+2) const chunkA = results.find((r) => r.chunk.id === "a"); + const chunkB = results.find((r) => r.chunk.id === "b"); assert.notEqual(chunkA, undefined); - assert.ok(chunkA!.score > 0.3, "hybrid result should rank above vector-only"); + assert.notEqual(chunkB, undefined); + assert.ok(chunkA!.score > chunkB!.score, "hybrid result should rank above vector-only"); }); }); @@ -293,12 +299,16 @@ describe("retrieve", () => { assert.equal(results.length, 1); const exp = results[0]!.explanation; assert.notEqual(exp, undefined); - assert.equal(exp!.scoreBreakdown.vectorScore, 0.8); assert.equal(exp!.scoreBreakdown.rawVectorScore, 0.8); assert.equal(exp!.scoreBreakdown.keywordScore, 0); assert.equal(exp!.scoreBreakdown.rawKeywordScore, 0); assert.equal(exp!.scoreBreakdown.keywordWeight, 0.4); assert.equal(exp!.matchedTerms, undefined); + assert.equal(exp!.scoreBreakdown.vectorRank, 0); + assert.equal(exp!.scoreBreakdown.keywordRank, undefined); + // RRF contribution: (1-0.4) / (60 + 0 + 1) = 0.6 / 61 + const expectedVScore = (1 - 0.4) / (60 + 0 + 1); + assert.ok(Math.abs(exp!.scoreBreakdown.vectorScore - expectedVScore) < 1e-10); }); it("populates explanation with keyword scores when keywordIndex provided", async () => { @@ -315,12 +325,15 @@ describe("retrieve", () => { assert.notEqual(chunkA, undefined); const exp = chunkA!.explanation; assert.notEqual(exp, undefined); - // vectorScore is now normalized by vTopScore (0.8/0.8 = 1.0) - assert.equal(exp!.scoreBreakdown.vectorScore, 1.0); assert.equal(exp!.scoreBreakdown.rawVectorScore, 0.8); assert.equal(exp!.scoreBreakdown.keywordWeight, 0.4); assert.ok(typeof exp!.scoreBreakdown.keywordScore === "number"); assert.ok(typeof exp!.scoreBreakdown.rawKeywordScore === "number"); + // RRF: chunk "a" is vector-only at rank 0, no keyword match + assert.equal(exp!.scoreBreakdown.vectorRank, 0); + assert.equal(exp!.scoreBreakdown.keywordRank, undefined); + const expectedVScore = (1 - 0.4) / (60 + 0 + 1); + assert.ok(Math.abs(exp!.scoreBreakdown.vectorScore - expectedVScore) < 1e-10); }); it("includes matchedTerms when keywordIndex matches the chunk", async () => { @@ -380,7 +393,8 @@ describe("retrieve", () => { const results = await retrieve("apple banana", embedder, store, { keywordIndex: ki, keywordWeight: 0.4, explain: true, minScore: 0 }); const r = results[0]!; const exp = r.explanation!; - const expectedCombined = (1 - 0.4) * exp.scoreBreakdown.vectorScore + 0.4 * exp.scoreBreakdown.keywordScore; + // With RRF, the combined score is the sum of RRF contributions + const expectedCombined = exp.scoreBreakdown.vectorScore + exp.scoreBreakdown.keywordScore; assert.ok(Math.abs(r.score - expectedCombined) < 1e-10, `expected ${expectedCombined}, got ${r.score}`); }); }); diff --git a/src/__tests__/vectorstore/lancedb.test.ts b/src/__tests__/vectorstore/lancedb.test.ts index 74197c4..0dddedf 100644 --- a/src/__tests__/vectorstore/lancedb.test.ts +++ b/src/__tests__/vectorstore/lancedb.test.ts @@ -3,7 +3,7 @@ import assert from "node:assert/strict"; import { existsSync, mkdtempSync, readdirSync, unlinkSync, rmSync } from "node:fs"; import { join } from "node:path"; import { tmpdir } from "node:os"; -import { LanceDbStore } from "../../vectorstore/lancedb.js"; +import { LanceDbStore, l2Normalize } from "../../vectorstore/lancedb.js"; import { normalizeFilePath } from "../../core/manifest.js"; describe("LanceDbStore (memory)", () => { @@ -385,6 +385,26 @@ describe("LanceDbStore (memory)", () => { }); }); +describe("l2Normalize", () => { + it("normalizes vectors to unit length", () => { + const v = [3, 4]; + const result = l2Normalize(v); + assert.deepStrictEqual(result, [0.6, 0.8]); + }); + + it("makes same-direction vectors identical regardless of magnitude", () => { + const a = l2Normalize([3, 4]); + const b = l2Normalize([6, 8]); + assert.deepStrictEqual(a, b); + }); + + it("returns original vector when norm is zero", () => { + const v = [0, 0, 0]; + const result = l2Normalize(v); + assert.deepStrictEqual(result, [0, 0, 0]); + }); +}); + describe("LanceDbStore (disk corruption recovery)", () => { it("recovers gracefully from missing data files", async () => { const tmpDir = mkdtempSync(join(tmpdir(), "opencode-rag-test-")); diff --git a/src/core/config.ts b/src/core/config.ts index c0621f2..b7880b4 100644 --- a/src/core/config.ts +++ b/src/core/config.ts @@ -397,7 +397,7 @@ export const DEFAULT_CONFIG: RagConfig = { }, retrieval: { topK: 20, - minScore: 0.5, + minScore: 0.35, hybridSearch: { enabled: true, keywordWeight: 0.4, diff --git a/src/core/interfaces.ts b/src/core/interfaces.ts index 5331130..3d3ea32 100644 --- a/src/core/interfaces.ts +++ b/src/core/interfaces.ts @@ -47,6 +47,10 @@ export interface SearchExplanation { rawKeywordScore: number; /** Weight applied to keyword score during fusion (0-1). */ keywordWeight: number; + /** Rank (0-indexed) in the vector store results. */ + vectorRank?: number; + /** Rank (0-indexed) in the keyword index results. */ + keywordRank?: number; }; /** Query terms that matched in the keyword index, if hybrid search was used. */ matchedTerms?: string[]; @@ -119,6 +123,8 @@ export interface VectorStore { addChunks(chunks: Chunk[]): Promise; /** Search for the top-K nearest neighbor chunks by embedding similarity. */ search(embedding: number[], topK: number): Promise; + /** Search with optional metadata filtering. */ + searchWithFilter(embedding: number[], topK: number, filter?: MetadataFilter): Promise; /** Return the total number of stored chunks. */ count(): Promise; /** Remove all stored data. */ @@ -131,6 +137,14 @@ export interface VectorStore { close(): Promise; } +/** Filter criteria for narrowing search results by file path patterns or language. */ +export interface MetadataFilter { + /** Glob-style path patterns (e.g. "src/**", "lib/auth/*"). */ + pathPatterns?: string[]; + /** Language identifiers (e.g. ["typescript", "tsx"]). */ + languages?: string[]; +} + /** Callback interface for reporting indexing progress to the UI or CLI. */ export interface IndexProgress { /** Set the total number of files to be indexed. */ diff --git a/src/core/manifest.ts b/src/core/manifest.ts index a902cc4..e0f6d11 100644 --- a/src/core/manifest.ts +++ b/src/core/manifest.ts @@ -32,9 +32,9 @@ export interface ManifestEntry { } /** Current schema version for manifest files. */ -export const SCHEMA_VERSION = 2; +export const SCHEMA_VERSION = 3; /** Oldest schema version still accepted as valid (supports forward migration). */ -export const MIN_SUPPORTED_SCHEMA_VERSION = 1; +export const MIN_SUPPORTED_SCHEMA_VERSION = 3; /** Persistent manifest tracking indexing state across sessions. */ export interface FileManifest { diff --git a/src/retriever/retriever.ts b/src/retriever/retriever.ts index 2869275..00801e2 100644 --- a/src/retriever/retriever.ts +++ b/src/retriever/retriever.ts @@ -1,12 +1,13 @@ /** * @fileoverview Performs hybrid vector-keyword retrieval with configurable scoring and explanation. */ -import type { EmbeddingProvider, KeywordIndex, VectorStore, SearchResult, SearchExplanation } from "../core/interfaces.js"; +import type { EmbeddingProvider, KeywordIndex, VectorStore, SearchResult } from "../core/interfaces.js"; /** Multiplier applied to topK when fetching raw results from vector/keyword stores. * We request extra results up-front, then after hybrid fusion + minScore filtering, * we slice back to the requested topK. */ const FETCH_OVERFETCH_FACTOR = 3; +const RRF_K = 60; /** Options controlling the retrieval behavior. */ export interface RetrieveOptions { @@ -61,102 +62,41 @@ export async function retrieve( keywordResults = options.keywordIndex.search(query, topK * FETCH_OVERFETCH_FACTOR); } - if (keywordResults.length === 0) { - const filtered = vectorResults.filter((r) => r.score >= minScore); - if (options.explain) { - const kw = options.keywordWeight ?? 0.4; - for (const r of filtered) { - r.explanation = { - scoreBreakdown: { - vectorScore: r.score, - keywordScore: 0, - rawVectorScore: r.score, - rawKeywordScore: 0, - keywordWeight: kw, - }, - }; - } - } - return filtered; - } - - const kwTopScore = keywordResults.length > 0 ? keywordResults[0]!.score : 1; - const vTopScore = vectorResults.length > 0 ? vectorResults[0]!.score : 1; - - const combined = new Map(); - - for (const r of vectorResults) { - combined.set(r.chunk.id, { - chunk: r.chunk, - vScore: r.score, - kScore: 0, - rawVScore: r.score, - rawKScore: 0, - }); - } + const vRank = new Map(vectorResults.map((r, i) => [r.chunk.id, i])); + const kRank = new Map(keywordResults.map((r, i) => [r.chunk.id, i])); - for (const r of keywordResults) { - const existing = combined.get(r.chunk.id); - const normalizedK = kwTopScore > 0 ? r.score / kwTopScore : 0; - if (existing) { - existing.kScore = normalizedK; - existing.rawKScore = r.score; - } else { - combined.set(r.chunk.id, { - chunk: r.chunk, - vScore: 0, - kScore: normalizedK, - rawVScore: 0, - rawKScore: r.score, - }); - } - } + const chunkById = new Map(); + for (const r of vectorResults) chunkById.set(r.chunk.id, r); + for (const r of keywordResults) if (!chunkById.has(r.chunk.id)) chunkById.set(r.chunk.id, r); const kw = options.keywordWeight ?? 0.4; - const combinedResults: SearchResult[] = [...combined.values()] - .map((entry) => { - const hasVector = entry.vScore > 0; - const hasKeyword = entry.kScore > 0; - const normV = vTopScore > 0 ? entry.vScore / vTopScore : 0; - const score = hasVector && hasKeyword - ? (1 - kw) * normV + kw * entry.kScore - : hasVector - ? (1 - kw) * normV - : entry.kScore * 0.9; - const result: SearchResult = { - chunk: entry.chunk, - score, + const allIds = new Set([...vRank.keys(), ...kRank.keys()]); + const combinedResults: SearchResult[] = [...allIds].map((id) => { + const vR = vRank.get(id); + const kR = kRank.get(id); + const vContrib = vR !== undefined ? (1 - kw) / (RRF_K + vR + 1) : 0; + const kContrib = kR !== undefined ? kw / (RRF_K + kR + 1) : 0; + const score = vContrib + kContrib; + const result: SearchResult = { chunk: chunkById.get(id)!.chunk, score }; + if (options.explain) { + result.explanation = { + scoreBreakdown: { + vectorScore: vContrib, + keywordScore: kContrib, + rawVectorScore: vR !== undefined ? vectorResults[vR]!.score : 0, + rawKeywordScore: kR !== undefined ? keywordResults[kR]!.score : 0, + keywordWeight: kw, + vectorRank: vR, + keywordRank: kR, + }, }; - - if (options.explain) { - const explanation: SearchExplanation = { - scoreBreakdown: { - vectorScore: normV, - keywordScore: entry.kScore, - rawVectorScore: entry.rawVScore, - rawKeywordScore: entry.rawKScore, - keywordWeight: kw, - }, - }; - - if (options.keywordIndex && entry.rawKScore > 0) { - const terms = options.keywordIndex.getMatchedTerms(query, entry.chunk.id); - if (terms.length > 0) { - explanation.matchedTerms = terms; - } - } - - result.explanation = explanation; + if (options.keywordIndex && kR !== undefined) { + const terms = options.keywordIndex.getMatchedTerms(query, id); + if (terms.length > 0) result.explanation.matchedTerms = terms; } - - return result; - }) + } + return result; + }) .filter((r) => r.score >= minScore) .sort((a, b) => b.score - a.score) .slice(0, topK); diff --git a/src/vectorstore/lancedb.ts b/src/vectorstore/lancedb.ts index 3f12ab4..ac8e361 100644 --- a/src/vectorstore/lancedb.ts +++ b/src/vectorstore/lancedb.ts @@ -11,6 +11,18 @@ const TABLE_NAME = "chunks"; const QUERY_COLUMNS = ["id", "content", "description", "filePath", "startLine", "endLine", "language"]; +/** + * L2-normalize a vector to unit length. Cosine models require unit vectors + * for the dot product to equal cosine similarity. + */ +export function l2Normalize(vec: number[]): number[] { + let norm = 0; + for (const v of vec) norm += v * v; + norm = Math.sqrt(norm); + if (norm === 0) return vec; + return vec.map((v) => v / norm); +} + /** * Check whether an error is a LanceDB corruption error (table not found / broken). * @param err - The error to inspect. @@ -214,7 +226,7 @@ export class LanceDbStore implements VectorStore { id: c.id, content: c.content, description: c.description ?? "", - embedding: c.embedding!, + embedding: l2Normalize(c.embedding!), filePath: normalizeFilePath(c.metadata.filePath), startLine: c.metadata.startLine, endLine: c.metadata.endLine, @@ -281,7 +293,7 @@ export class LanceDbStore implements VectorStore { /** * Perform ANN (approximate nearest neighbor) search using LanceDB's native vector index. - * Returns results scored as 1 / (1 + L2 distance). Falls back to repair on corruption. + * Returns results scored as cosine similarity (0-1). Falls back to repair on corruption. * @param embedding - The query embedding vector. * @param topK - Maximum number of results to return. * @returns An array of search results sorted by descending score. @@ -302,7 +314,7 @@ export class LanceDbStore implements VectorStore { private rowToSearchResult(row: Record): SearchResult { return { - score: 1 / (1 + ((row._distance as number) ?? 0)), + score: Math.min(1, Math.max(0, 1 - ((row._distance as number) ?? 0) / 2)), chunk: { id: row.id as string, content: row.content as string, @@ -396,6 +408,13 @@ export class LanceDbStore implements VectorStore { })); } + /** + * Perform ANN search internally, returning results scored as cosine similarity (0-1). + * This method is called by `search()` and handles the actual query logic. + * @param embedding - The query embedding vector. + * @param topK - The number of top results to return. + * @returns An array of search results with scores. + */ private async searchInternal(embedding: number[], topK: number): Promise { const db = await this.getDb(); const tableNames = await db.tableNames(); @@ -405,10 +424,12 @@ export class LanceDbStore implements VectorStore { const count = await table.countRows(); if (count === 0) return []; - const results = await table.search(embedding).limit(topK).toArray(); + const results = await table.vectorSearch(l2Normalize(embedding)) + .distanceType("cosine") + .limit(topK).toArray() as Record[]; return results - .map((row) => this.rowToSearchResult(row)) - .filter((r) => r.chunk.id !== "__seed__"); + .map((row: Record) => this.rowToSearchResult(row)) + .filter((r: SearchResult) => r.chunk.id !== "__seed__"); } /** From 6d2fc2b827e0ff3c620f4f35dfd37270765c2d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Thu, 2 Jul 2026 16:08:19 +0200 Subject: [PATCH 02/15] feat: add searchWithFilter method to VectorStore implementations and update related interfaces for enhanced filtering capabilities --- src/__tests__/eval/token-comparison.test.ts | 5 +- src/__tests__/mcp/server.test.ts | 6 +++ .../opencode/create-read-tool.test.ts | 12 +++++ src/__tests__/plugin.test.ts | 6 +++ src/__tests__/retriever/retriever.test.ts | 9 ++++ src/api.ts | 4 ++ src/core/interfaces.ts | 2 +- src/retriever/keyword-index.ts | 24 ++++++++- src/retriever/retriever.ts | 7 +-- src/vectorstore/lancedb.ts | 51 ++++++++++++++----- src/vectorstore/memory.ts | 26 +++++++++- 11 files changed, 131 insertions(+), 21 deletions(-) diff --git a/src/__tests__/eval/token-comparison.test.ts b/src/__tests__/eval/token-comparison.test.ts index 646ce26..f712ee9 100644 --- a/src/__tests__/eval/token-comparison.test.ts +++ b/src/__tests__/eval/token-comparison.test.ts @@ -27,7 +27,7 @@ import { projectTokenSavings, } from "../../eval/token-analysis.js"; import { handleEvalAnalysis, handleEvalTokenCompare, handleEvalProjectSavings } from "../../web/api.js"; -import type { VectorStore } from "../../core/interfaces.js"; +import type { VectorStore, SearchResult } from "../../core/interfaces.js"; import type { SessionEvent } from "../../eval/types.js"; function makeTmpDir(): string { @@ -49,6 +49,9 @@ function makeConfig(overrides: Partial = {}): RagConfig { const dummyStore: VectorStore = { addChunks: async () => {}, search: async () => [], + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, count: async () => 10, clear: async () => {}, deleteByFilePath: async () => {}, diff --git a/src/__tests__/mcp/server.test.ts b/src/__tests__/mcp/server.test.ts index 2546f0b..d8ca340 100644 --- a/src/__tests__/mcp/server.test.ts +++ b/src/__tests__/mcp/server.test.ts @@ -59,6 +59,9 @@ function makeEmptyStore(): VectorStore { return { addChunks: async () => {}, search: async () => [], + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, count: async () => 0, clear: async () => {}, deleteByFilePath: async () => {}, @@ -71,6 +74,9 @@ function makeStore(count: number, searchResults: SearchResult[]): VectorStore { return { addChunks: async () => {}, search: async () => searchResults, + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, count: async () => count, clear: async () => {}, deleteByFilePath: async () => {}, diff --git a/src/__tests__/opencode/create-read-tool.test.ts b/src/__tests__/opencode/create-read-tool.test.ts index f641c71..66e10da 100644 --- a/src/__tests__/opencode/create-read-tool.test.ts +++ b/src/__tests__/opencode/create-read-tool.test.ts @@ -26,6 +26,9 @@ function makeStore(options: { return { addChunks: async () => {}, search: async () => searchResults, + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, count: async () => count, clear: async () => {}, deleteByFilePath: async () => {}, @@ -262,6 +265,9 @@ describe("createRagReadTool", () => { const failingStore: VectorStore = { addChunks: async () => {}, search: async () => { throw new Error("DB connection failed"); }, + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, count: async () => { throw new Error("DB connection failed"); }, clear: async () => {}, deleteByFilePath: async () => {}, @@ -476,6 +482,9 @@ describe("createRagReadTool", () => { const store: VectorStore = { addChunks: async () => {}, search: async () => [], + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, count: async () => 5, clear: async () => {}, deleteByFilePath: async () => {}, @@ -527,6 +536,9 @@ describe("createRagReadTool", () => { const searchStore: VectorStore = { addChunks: async () => {}, search: async () => [makeResult("c1", mainFile, 1, 10, "typescript", "fresh result", 0.95)], + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, count: async () => 5, clear: async () => {}, deleteByFilePath: async () => {}, diff --git a/src/__tests__/plugin.test.ts b/src/__tests__/plugin.test.ts index 2b9056e..2bf7988 100644 --- a/src/__tests__/plugin.test.ts +++ b/src/__tests__/plugin.test.ts @@ -62,6 +62,9 @@ const testWorktree = process.cwd(); const populatedStore: VectorStore = { addChunks: async () => {}, search: async () => [], + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, count: async () => 5, clear: async () => {}, deleteByFilePath: async () => {}, @@ -449,6 +452,9 @@ describe("ragPlugin", () => { const storeWithResults: VectorStore = { addChunks: async () => {}, search: async () => [], + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, count: async () => 5, clear: async () => {}, deleteByFilePath: async () => {}, diff --git a/src/__tests__/retriever/retriever.test.ts b/src/__tests__/retriever/retriever.test.ts index 652adfc..dc140a4 100644 --- a/src/__tests__/retriever/retriever.test.ts +++ b/src/__tests__/retriever/retriever.test.ts @@ -25,6 +25,9 @@ function makeStore(results: SearchResult[]): VectorStore { async search(_embedding: number[], _topK: number): Promise { return results; }, + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, async count(): Promise { return results.length; }, @@ -87,6 +90,9 @@ describe("retrieve", () => { receivedTopK = topK; return []; }, + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, async count(): Promise { return 0; }, @@ -110,6 +116,9 @@ describe("retrieve", () => { receivedTopK = topK; return []; }, + async searchWithFilter(embedding: number[], topK: number, _filter?: any): Promise { + return this.search(embedding, topK); + }, async count(): Promise { return 0; }, diff --git a/src/api.ts b/src/api.ts index a35807c..f547185 100644 --- a/src/api.ts +++ b/src/api.ts @@ -99,6 +99,10 @@ export async function search( hybridEnabled: ctx.config.retrieval.hybridSearch?.enabled, queryPrefix: ctx.config.embedding.queryPrefix, explain: options.explain, + filter: { + pathPatterns: options.pathHints, + languages: options.languageHints, + }, } satisfies RetrieveOptions); const optCfg = ctx.config.retrieval.contextOptimization ?? DEFAULT_CONTEXT_OPTIMIZATION; diff --git a/src/core/interfaces.ts b/src/core/interfaces.ts index 3d3ea32..6e54947 100644 --- a/src/core/interfaces.ts +++ b/src/core/interfaces.ts @@ -106,7 +106,7 @@ export interface KeywordIndex { /** Remove all entries for a given file path from the index. */ removeByFilePath(filePath: string): void; /** Search the index for the top-K matching chunks. */ - search(query: string, topK: number): SearchResult[]; + search(query: string, topK: number, filter?: MetadataFilter): SearchResult[]; /** Get the terms from a query that matched a specific chunk. */ getMatchedTerms(query: string, chunkId: string): string[]; /** Clear all indexed data. */ diff --git a/src/retriever/keyword-index.ts b/src/retriever/keyword-index.ts index 669beb8..fdcc72f 100644 --- a/src/retriever/keyword-index.ts +++ b/src/retriever/keyword-index.ts @@ -1,7 +1,7 @@ /** * @fileoverview In-memory inverted keyword index with stemming, tokenization, and optional serialization. */ -import type { Chunk, SearchResult } from "../core/interfaces.js"; +import type { Chunk, SearchResult, MetadataFilter } from "../core/interfaces.js"; const INDEX_VERSION = 2; @@ -153,7 +153,7 @@ export class KeywordIndex { } } - search(query: string, topK: number): SearchResult[] { + search(query: string, topK: number, filter?: MetadataFilter): SearchResult[] { if (this.chunkMap.size === 0) return []; const queryTokens = tokenize(query); @@ -177,6 +177,7 @@ export class KeywordIndex { const sorted = [...scores.entries()] .sort((a, b) => b[1] - a[1]) + .filter(([id]) => matchesFilter(this.chunkMap.get(id)!, filter)) .slice(0, topK); return sorted.map(([chunkId, score]) => { @@ -287,3 +288,22 @@ export class KeywordIndex { await writeFile(targetPath, JSON.stringify({ version: INDEX_VERSION, tokens: [], chunkMap: {} }), "utf-8"); } } + +function globMatch(pattern: string, filePath: string): boolean { + const GLOBSTAR = "\x00GS\x00"; + let re = pattern.replace(/\*\*/g, GLOBSTAR); + re = re.replace(/([.+^${}()|[\]\\])/g, "\\$1"); + re = re.replace(new RegExp(GLOBSTAR, "g"), ".*"); + re = re.replace(/\*/g, "[^/]*"); + re = re.replace(/\?/g, "."); + return new RegExp("^" + re + "$").test(filePath); +} + +function matchesFilter(chunk: Chunk, filter?: MetadataFilter): boolean { + if (!filter) return true; + if (filter.languages?.length && !filter.languages.includes(chunk.metadata.language)) return false; + if (filter.pathPatterns?.length) { + return filter.pathPatterns.some((p) => globMatch(p, chunk.metadata.filePath)); + } + return true; +} diff --git a/src/retriever/retriever.ts b/src/retriever/retriever.ts index 00801e2..1ee9c5b 100644 --- a/src/retriever/retriever.ts +++ b/src/retriever/retriever.ts @@ -1,7 +1,7 @@ /** * @fileoverview Performs hybrid vector-keyword retrieval with configurable scoring and explanation. */ -import type { EmbeddingProvider, KeywordIndex, VectorStore, SearchResult } from "../core/interfaces.js"; +import type { EmbeddingProvider, KeywordIndex, VectorStore, SearchResult, MetadataFilter } from "../core/interfaces.js"; /** Multiplier applied to topK when fetching raw results from vector/keyword stores. * We request extra results up-front, then after hybrid fusion + minScore filtering, @@ -19,6 +19,7 @@ export interface RetrieveOptions { hybridEnabled?: boolean; queryPrefix?: string; explain?: boolean; + filter?: MetadataFilter; } /** @@ -55,11 +56,11 @@ export async function retrieve( return []; } - const vectorResults = await store.search(embedding as number[], topK * FETCH_OVERFETCH_FACTOR); + const vectorResults = await store.searchWithFilter(embedding as number[], topK * FETCH_OVERFETCH_FACTOR, options.filter); let keywordResults: SearchResult[] = []; if (options.keywordIndex && options.hybridEnabled !== false) { - keywordResults = options.keywordIndex.search(query, topK * FETCH_OVERFETCH_FACTOR); + keywordResults = options.keywordIndex.search(query, topK * FETCH_OVERFETCH_FACTOR, options.filter); } const vRank = new Map(vectorResults.map((r, i) => [r.chunk.id, i])); diff --git a/src/vectorstore/lancedb.ts b/src/vectorstore/lancedb.ts index ac8e361..6e00d45 100644 --- a/src/vectorstore/lancedb.ts +++ b/src/vectorstore/lancedb.ts @@ -4,7 +4,7 @@ import * as lancedb from "@lancedb/lancedb"; import type { Connection, Table, Version } from "@lancedb/lancedb"; import fs from "node:fs/promises"; -import type { VectorStore, Chunk, SearchResult } from "../core/interfaces.js"; +import type { VectorStore, Chunk, SearchResult, MetadataFilter } from "../core/interfaces.js"; import { normalizeFilePath, manifestPathFor } from "../core/manifest.js"; const TABLE_NAME = "chunks"; @@ -299,13 +299,17 @@ export class LanceDbStore implements VectorStore { * @returns An array of search results sorted by descending score. */ async search(embedding: number[], topK: number): Promise { + return this.searchWithFilter(embedding, topK); + } + + async searchWithFilter(embedding: number[], topK: number, filter?: MetadataFilter): Promise { try { - return await this.searchInternal(embedding, topK); + return await this.searchInternal(embedding, topK, filter); } catch (err) { if (isCorruptionError(err)) { const repaired = await this.tryRepair(); if (repaired) { - return this.searchInternal(embedding, topK); + return this.searchInternal(embedding, topK, filter); } } return []; @@ -415,7 +419,7 @@ export class LanceDbStore implements VectorStore { * @param topK - The number of top results to return. * @returns An array of search results with scores. */ - private async searchInternal(embedding: number[], topK: number): Promise { + private async searchInternal(embedding: number[], topK: number, filter?: MetadataFilter): Promise { const db = await this.getDb(); const tableNames = await db.tableNames(); if (!tableNames.includes(TABLE_NAME)) return []; @@ -424,9 +428,11 @@ export class LanceDbStore implements VectorStore { const count = await table.countRows(); if (count === 0) return []; - const results = await table.vectorSearch(l2Normalize(embedding)) - .distanceType("cosine") - .limit(topK).toArray() as Record[]; + let query = table.vectorSearch(l2Normalize(embedding)).distanceType("cosine"); + const whereClause = buildWhereClause(filter); + if (whereClause) query = query.where(whereClause); + const results = await query.limit(topK).toArray() as Record[]; + return results .map((row: Record) => this.rowToSearchResult(row)) .filter((r: SearchResult) => r.chunk.id !== "__seed__"); @@ -572,8 +578,6 @@ export class LanceDbStore implements VectorStore { try { table = await db.openTable(TABLE_NAME); } catch { - // Table is corrupt and can't even be opened — leave it be so the user - // can run `opencode-rag index --force` to rebuild with full control. console.error( "[lancedb] Corrupt table detected. Run 'opencode-rag index --force' to rebuild." ); @@ -584,8 +588,6 @@ export class LanceDbStore implements VectorStore { try { versions = await table.listVersions(); } catch { - // Can't list versions (corrupt version manifest). Don't nuke data — - // let the user decide how to proceed. console.warn( "[lancedb] Could not list table versions for repair. " + "Run 'opencode-rag index --force' to rebuild if search results are incorrect." @@ -593,7 +595,6 @@ export class LanceDbStore implements VectorStore { return false; } - // No previous version to roll back to — not a corruption we can fix. if (versions.length <= 1) { return false; } @@ -613,7 +614,6 @@ export class LanceDbStore implements VectorStore { } } - // Tried all versions, none worked — report failure but don't destroy data. console.error( "[lancedb] All version-restore attempts failed. " + "Run 'opencode-rag index --force' to rebuild the index." @@ -624,3 +624,28 @@ export class LanceDbStore implements VectorStore { } } } + +/** + * Build a LanceDB SQL WHERE clause from a MetadataFilter. + * Handles path glob patterns and language filters with proper escaping. + */ +function buildWhereClause(filter?: MetadataFilter): string | undefined { + if (!filter) return undefined; + const parts: string[] = []; + if (filter.languages?.length) { + const langs = filter.languages.map((l) => `'${l.replace(/'/g, "''")}'`).join(","); + parts.push(`language IN (${langs})`); + } + if (filter.pathPatterns?.length) { + const likes = filter.pathPatterns.map((p) => { + const escaped = p.replace(/'/g, "''"); + const like = escaped + .replace(/\*\*/g, "%") + .replace(/\*/g, "%") + .replace(/\?/g, "_"); + return `filePath LIKE '${like}'`; + }); + parts.push(`(${likes.join(" OR ")})`); + } + return parts.length ? parts.join(" AND ") : undefined; +} diff --git a/src/vectorstore/memory.ts b/src/vectorstore/memory.ts index 66f86a4..09a6f0a 100644 --- a/src/vectorstore/memory.ts +++ b/src/vectorstore/memory.ts @@ -1,7 +1,7 @@ /** * @fileoverview Ephemeral in-memory vector store using cosine similarity search. */ -import type { VectorStore, Chunk, SearchResult } from "../core/interfaces.js"; +import type { VectorStore, Chunk, SearchResult, MetadataFilter } from "../core/interfaces.js"; /** Ephemeral in-memory vector store using cosine similarity search. */ export class InMemoryVectorStore implements VectorStore { @@ -12,11 +12,16 @@ export class InMemoryVectorStore implements VectorStore { } async search(embedding: number[], topK: number): Promise { + return this.searchWithFilter(embedding, topK); + } + + async searchWithFilter(embedding: number[], topK: number, filter?: MetadataFilter): Promise { const withEmbeddings = this.chunks.filter( (c): c is Chunk & { embedding: number[] } => c.embedding !== undefined && c.embedding.length === embedding.length ); const scored = withEmbeddings + .filter((c) => matchesFilter(c, filter)) .map((chunk) => { const sim = cosineSimilarity(embedding, chunk.embedding); return { chunk, score: sim }; @@ -59,6 +64,25 @@ export class InMemoryVectorStore implements VectorStore { * @param b - Second vector. * @returns The cosine similarity (0 if either vector has zero magnitude). */ +function globMatch(pattern: string, filePath: string): boolean { + const GLOBSTAR = "\x00GS\x00"; + let re = pattern.replace(/\*\*/g, GLOBSTAR); + re = re.replace(/([.+^${}()|[\]\\])/g, "\\$1"); + re = re.replace(new RegExp(GLOBSTAR, "g"), ".*"); + re = re.replace(/\*/g, "[^/]*"); + re = re.replace(/\?/g, "."); + return new RegExp("^" + re + "$").test(filePath); +} + +function matchesFilter(chunk: Chunk, filter?: MetadataFilter): boolean { + if (!filter) return true; + if (filter.languages?.length && !filter.languages.includes(chunk.metadata.language)) return false; + if (filter.pathPatterns?.length) { + return filter.pathPatterns.some((p) => globMatch(p, chunk.metadata.filePath)); + } + return true; +} + function cosineSimilarity(a: number[], b: number[]): number { let dot = 0; let normA = 0; From 4f311a055d32081888042ade973ba3bebaf4ee2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Thu, 2 Jul 2026 16:09:26 +0200 Subject: [PATCH 03/15] test: update related file scores in createRagReadTool tests for accuracy --- src/__tests__/opencode/create-read-tool.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/__tests__/opencode/create-read-tool.test.ts b/src/__tests__/opencode/create-read-tool.test.ts index 66e10da..4db52b4 100644 --- a/src/__tests__/opencode/create-read-tool.test.ts +++ b/src/__tests__/opencode/create-read-tool.test.ts @@ -358,8 +358,8 @@ describe("createRagReadTool", () => { // Related files section with otherFile and other2File (not mainFile) assert.match(result.output, /Please consider reading other relevant files/); - assert.match(result.output, /other\.ts \(Score: 0\.80\)/); - assert.match(result.output, /other2\.ts \(Score: 0\.75\)/); + assert.match(result.output, /other\.ts \(Score: 0\.01\)/); + assert.match(result.output, /other2\.ts \(Score: 0\.01\)/); // Should NOT include the requested file in related files assert.doesNotMatch(result.output, /src\/main\.ts \(Score:/); @@ -393,7 +393,7 @@ describe("createRagReadTool", () => { // Should have at most 1 related file assert.match(result.output, /Please consider reading other relevant files/); - assert.match(result.output, /other\.ts \(Score: 0\.85\)/); + assert.match(result.output, /other\.ts \(Score: 0\.01\)/); assert.doesNotMatch(result.output, /other2\.ts/); assert.doesNotMatch(result.output, /other3\.ts/); }); @@ -468,9 +468,9 @@ describe("createRagReadTool", () => { {} ) as { output: string }; - // Only one entry for other.ts, with best score 0.85 + // Only one entry for other.ts, with best score 0.01 assert.match(result.output, /Please consider reading other relevant files/); - assert.match(result.output, /other\.ts \(Score: 0\.85\)/); + assert.match(result.output, /other\.ts \(Score: 0\.01\)/); // Should NOT show lower scores for same file const matches = result.output.match(/other\.ts \(Score:/g); assert.equal(matches?.length, 1, "expected exactly one related entry per file"); From 24fbf80d018f828a30bad32f25930ca70dbfb43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Thu, 2 Jul 2026 23:10:54 +0200 Subject: [PATCH 04/15] fix: correct command in development guide from setup to init for project initialization --- doc/development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development.md b/doc/development.md index 89a0fca..a3bf05b 100644 --- a/doc/development.md +++ b/doc/development.md @@ -6,7 +6,7 @@ git clone https://github.com/your-org/OpenCodeRAG.git cd OpenCodeRAG npm install --legacy-peer-deps -opencode-rag setup --force +opencode-rag init --force ``` > LanceDB and other dependencies have peer dependency conflicts — `--legacy-peer-deps` is required. Run `opencode-rag setup --force` after building to sync the development copy into the runtime. From 07c6de8bf1f48dbbcefec16d236cd64dc8c79239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Thu, 2 Jul 2026 23:17:17 +0200 Subject: [PATCH 05/15] fix: update development guide with correct repository URL and enhance prompts for image and code descriptions --- doc/development.md | 2 +- opencode-rag.example.json | 4 ++-- src/core/config.ts | 4 ++-- src/indexer/embed-stage.ts | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/development.md b/doc/development.md index a3bf05b..d7adb25 100644 --- a/doc/development.md +++ b/doc/development.md @@ -3,7 +3,7 @@ ## Project Setup ```bash -git clone https://github.com/your-org/OpenCodeRAG.git +git clone https://github.com/MrDoe/OpenCodeRAG.git cd OpenCodeRAG npm install --legacy-peer-deps opencode-rag init --force diff --git a/opencode-rag.example.json b/opencode-rag.example.json index 88ddbad..facbb2f 100644 --- a/opencode-rag.example.json +++ b/opencode-rag.example.json @@ -68,7 +68,7 @@ "model": "minicpm-v4.6:latest", "baseUrl": "http://127.0.0.1:11434/api", "timeoutMs": 60000, - "prompt": "Describe this image 10-20 comma-separated keywords.", + "prompt": "Describe this image in 1-2 sentences: what it shows, its purpose, and key visual elements.", "think": true, "numCtx": 4096, "resizeMaxDimension": 1024 @@ -81,7 +81,7 @@ "think": false, "numCtx": 4096, "timeoutMs": 60000, - "systemPrompt": "Describe this code in 10-20 comma-separated keywords, focus on functionality and purpose.", + "systemPrompt": "Describe this code in 2-3 sentences: purpose, key concepts, inputs/outputs, and dependencies. No code repetition.", "batchConcurrency": 3, "retryMax": 3, "retryBaseDelayMs": 1000 diff --git a/src/core/config.ts b/src/core/config.ts index b7880b4..f0a84e1 100644 --- a/src/core/config.ts +++ b/src/core/config.ts @@ -427,7 +427,7 @@ export const DEFAULT_CONFIG: RagConfig = { model: "minicpm-v4.6:latest", baseUrl: "http://127.0.0.1:11434/api", timeoutMs: 60000, - prompt: "Describe this image 10-20 comma-separated keywords.", + prompt: "Describe this image in 1-2 sentences: what it shows, its purpose, and key visual elements.", think: false, numCtx: 2048, resizeMaxDimension: 1024, @@ -441,7 +441,7 @@ export const DEFAULT_CONFIG: RagConfig = { numCtx: 4096, timeoutMs: 60000, systemPrompt: - "Describe this code in 10-20 comma-separated keywords.", + "Describe this code in 2-3 sentences: purpose, key concepts, inputs/outputs, and dependencies. No code repetition.", batchConcurrency: 1, retryMax: 3, retryBaseDelayMs: 1000, diff --git a/src/indexer/embed-stage.ts b/src/indexer/embed-stage.ts index 389d729..4bac572 100644 --- a/src/indexer/embed-stage.ts +++ b/src/indexer/embed-stage.ts @@ -36,7 +36,8 @@ export async function embedChunks({ for (let i = 0; i < chunks.length; i++) { const chunk = chunks[i]!; if (chunk.embedding && chunk.embedding.length > 0) continue; - textsToEmbed.push(chunk.content); + const text = "Description: " + "\n" + (chunk.description || "") + "\n" + "Content:" + "\n" + chunk.content; + textsToEmbed.push(text); chunkIndices.push(i); } From 17b13b48f7d0956d75101db817782c374fb63203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= <75829913+MrDoe@users.noreply.github.com> Date: Thu, 2 Jul 2026 23:23:22 +0200 Subject: [PATCH 06/15] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/__tests__/core/config.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/core/config.test.ts b/src/__tests__/core/config.test.ts index d7f4eff..3c1ba55 100644 --- a/src/__tests__/core/config.test.ts +++ b/src/__tests__/core/config.test.ts @@ -125,8 +125,8 @@ describe("DEFAULT_CONFIG", () => { assert.equal(DEFAULT_CONFIG.retrieval.topK, 20); }); - it("has minScore of 0.35 (recalibrated for cosine similarity)", () => { - assert.equal(DEFAULT_CONFIG.retrieval.minScore, 0.35); + it("has minScore of 0.01 (recalibrated for RRF scoring)", () => { + assert.equal(DEFAULT_CONFIG.retrieval.minScore, 0.01); }); it("has info as default logging level", () => { From 1b572de071ecf738abbd56a30d18e7ed19c35e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= <75829913+MrDoe@users.noreply.github.com> Date: Thu, 2 Jul 2026 23:24:34 +0200 Subject: [PATCH 07/15] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/retriever/keyword-index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/retriever/keyword-index.ts b/src/retriever/keyword-index.ts index fdcc72f..0cb5527 100644 --- a/src/retriever/keyword-index.ts +++ b/src/retriever/keyword-index.ts @@ -176,8 +176,8 @@ export class KeywordIndex { } const sorted = [...scores.entries()] - .sort((a, b) => b[1] - a[1]) .filter(([id]) => matchesFilter(this.chunkMap.get(id)!, filter)) + .sort((a, b) => b[1] - a[1]) .slice(0, topK); return sorted.map(([chunkId, score]) => { From 73f4ce75cab3f3988fe9510898f97c3ce8c41618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Thu, 2 Jul 2026 23:32:01 +0200 Subject: [PATCH 08/15] fix: lower minimum score threshold for query relevance --- doc/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/configuration.md b/doc/configuration.md index d5fe97e..496ef93 100644 --- a/doc/configuration.md +++ b/doc/configuration.md @@ -117,7 +117,7 @@ Controls how queries are matched against the index. { "retrieval": { "topK": 10, - "minScore": 0.5, + "minScore": 0.35, "hybridSearch": { "enabled": true, "keywordWeight": 0.4 @@ -136,7 +136,7 @@ Controls how queries are matched against the index. | Option | Default | Description | |---|---|---| | `topK` | `10` | Default number of chunks fetched per query | -| `minScore` | `0.5` | Minimum relevance score (0–1) | +| `minScore` | `0.35` | Minimum relevance score (0–1) | | `hybridSearch.enabled` | `true` | Enable combined TF×IDF + vector search | | `hybridSearch.keywordWeight` | `0.4` | Weight for keyword score in fusion: `(1-kw)*vScore + kw*kScore` | | `contextOptimization.enabled` | `true` | Enable post-retrieval optimization pipeline | From 8b9af91171ca410b1d49ade535de8daad4bda171 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Jul 2026 21:42:18 +0000 Subject: [PATCH 09/15] Clarify manifest schema rebuild --- src/core/manifest.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/manifest.ts b/src/core/manifest.ts index e0f6d11..9811b20 100644 --- a/src/core/manifest.ts +++ b/src/core/manifest.ts @@ -33,7 +33,11 @@ export interface ManifestEntry { /** Current schema version for manifest files. */ export const SCHEMA_VERSION = 3; -/** Oldest schema version still accepted as valid (supports forward migration). */ +/** + * Oldest schema version still accepted as valid. + * Bumping this intentionally marks older manifests corrupt and forces a + * rebuild, so only raise it when a migration is not practical. + */ export const MIN_SUPPORTED_SCHEMA_VERSION = 3; /** Persistent manifest tracking indexing state across sessions. */ From a12adc14878ebfba4800fca2f91d92e2cba87995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Mon, 6 Jul 2026 09:45:22 +0200 Subject: [PATCH 10/15] Add branch comparison and benchmarking scripts - Implemented `compare-merge.ts` for comparing benchmark JSON outputs of two branches, generating a side-by-side analysis report in console and markdown format. - Created `run-branch-compare.ts` to execute queries against the indexed codebase, outputting per-query results as JSON for later comparison. --- doc/eval-results-t1-cosine-l2.json | 3277 ++++++++++++++++++++++++++++ package.json | 5 +- src/chunker/pdf.ts | 15 +- src/cli/commands/init-helpers.ts | 2 +- src/eval/compare-merge.ts | 692 ++++++ src/eval/run-branch-compare.ts | 292 +++ 6 files changed, 4267 insertions(+), 16 deletions(-) create mode 100644 doc/eval-results-t1-cosine-l2.json create mode 100644 src/eval/compare-merge.ts create mode 100644 src/eval/run-branch-compare.ts diff --git a/doc/eval-results-t1-cosine-l2.json b/doc/eval-results-t1-cosine-l2.json new file mode 100644 index 0000000..8e758ba --- /dev/null +++ b/doc/eval-results-t1-cosine-l2.json @@ -0,0 +1,3277 @@ +{ + "branch": "t1-cosine-l2", + "commit": "8b9af91", + "timestamp": "2026-07-06T07:36:52.613Z", + "config": { + "embeddingProvider": "ollama", + "embeddingModel": "qwen3-embedding:0.6b", + "topK": 20, + "minScore": 0.5, + "hybridEnabled": true, + "keywordWeight": 0.1 + }, + "indexChunkCount": 1180, + "queries": [ + { + "query": "How does the retrieval pipeline work end-to-end?", + "queryIndex": 0, + "resultCount": 20, + "latencyMs": 357.1, + "topResults": [ + { + "rank": 0, + "score": 0.014754098360655738, + "filePath": "opencode-rag.example.json", + "startLine": 46, + "endLine": 53, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.8427461385726929, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 1, + "score": 0.01464374482187241, + "filePath": "doc/retrieval.md", + "startLine": 101, + "endLine": 159, + "language": "markdown", + "explanation": { + "vectorScore": 0.013235294117647059, + "keywordScore": 0.0014084507042253522, + "rawVectorScore": 0.8234953284263611, + "rawKeywordScore": 17.758572049438392, + "keywordWeight": 0.1, + "vectorRank": 7, + "keywordRank": 10, + "matchedTerms": [ + "does", + "the", + "retrieval", + "pipeline", + "pipelin", + "to" + ] + } + }, + { + "rank": 2, + "score": 0.014516129032258065, + "filePath": "opencode-rag.json", + "startLine": 2, + "endLine": 7, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.835597425699234, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 3, + "score": 0.014285714285714285, + "filePath": "opencode-rag.yaml", + "startLine": 1, + "endLine": 1, + "language": "yaml", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.8310764133930206, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 4, + "score": 0.0140625, + "filePath": "opencode-rag.json", + "startLine": 108, + "endLine": 118, + "language": "json", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.827063649892807, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the plugin interact with chat messages?", + "queryIndex": 1, + "resultCount": 20, + "latencyMs": 167.9, + "topResults": [ + { + "rank": 0, + "score": 0.015295429208472686, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, + "language": "typescript", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0.0014492753623188406, + "rawVectorScore": 0.7802304327487946, + "rawKeywordScore": 19.479181718823977, + "keywordWeight": 0.1, + "vectorRank": 4, + "keywordRank": 8, + "matchedTerms": [ + "how", + "does", + "the", + "plugin", + "with", + "chat", + "message" + ] + } + }, + { + "rank": 1, + "score": 0.015174825174825176, + "filePath": "doc/plugin.md", + "startLine": 1, + "endLine": 100, + "language": "markdown", + "explanation": { + "vectorScore": 0.013636363636363637, + "keywordScore": 0.0015384615384615385, + "rawVectorScore": 0.7801464796066284, + "rawKeywordScore": 19.479181718823977, + "keywordWeight": 0.1, + "vectorRank": 5, + "keywordRank": 4, + "matchedTerms": [ + "how", + "does", + "the", + "plugin", + "with", + "chat", + "message" + ] + } + }, + { + "rank": 2, + "score": 0.014754098360655738, + "filePath": "src/plugin.ts", + "startLine": 460, + "endLine": 484, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.7988472580909729, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 3, + "score": 0.014516129032258065, + "filePath": "doc/assets/eval.png", + "startLine": 1, + "endLine": 1, + "language": "image", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7970900237560272, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 4, + "score": 0.014285714285714285, + "filePath": "opencode-rag.json", + "startLine": 128, + "endLine": 137, + "language": "json", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7896163761615753, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the keyword index combine with vector search?", + "queryIndex": 2, + "resultCount": 20, + "latencyMs": 164.5, + "topResults": [ + { + "rank": 0, + "score": 0.015395833333333334, + "filePath": "src/__tests__/retriever/retriever.test.ts", + "startLine": 141, + "endLine": 240, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0.0013333333333333335, + "rawVectorScore": 0.8250711560249329, + "rawKeywordScore": 19.41557447405785, + "keywordWeight": 0.1, + "vectorRank": 3, + "keywordRank": 14, + "matchedTerms": [ + "keyword", + "index", + "combine", + "combin", + "with", + "vector", + "search" + ] + } + }, + { + "rank": 1, + "score": 0.014754098360655738, + "filePath": "opencode-rag.example.json", + "startLine": 46, + "endLine": 53, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.845950573682785, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 2, + "score": 0.014516129032258065, + "filePath": "opencode-rag.json", + "startLine": 100, + "endLine": 107, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.8453532159328461, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 3, + "score": 0.014341926729986432, + "filePath": "src/retriever/retriever.ts", + "startLine": 38, + "endLine": 109, + "language": "typescript", + "explanation": { + "vectorScore": 0.013432835820895522, + "keywordScore": 0.0009090909090909091, + "rawVectorScore": 0.8154186010360718, + "rawKeywordScore": 14.015001406805467, + "keywordWeight": 0.1, + "vectorRank": 6, + "keywordRank": 49, + "matchedTerms": [ + "keyword", + "index", + "combin", + "with", + "vector", + "search" + ] + } + }, + { + "rank": 4, + "score": 0.014285714285714285, + "filePath": "opencode-rag.example.json", + "startLine": 43, + "endLine": 45, + "language": "json", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.8284553587436676, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "Where is the embedder factory defined?", + "queryIndex": 3, + "resultCount": 20, + "latencyMs": 229.7, + "topResults": [ + { + "rank": 0, + "score": 0.014754098360655738, + "filePath": "src/embedder/factory.ts", + "startLine": 23, + "endLine": 46, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.8163399994373322, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 1, + "score": 0.014516129032258065, + "filePath": "src/__tests__/embedder/factory.test.ts", + "startLine": 18, + "endLine": 104, + "language": "typescript", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7862143516540527, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 2, + "score": 0.014285714285714285, + "filePath": "src/__tests__/embedder/factory.test.ts", + "startLine": 7, + "endLine": 16, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7788006663322449, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 3, + "score": 0.0140625, + "filePath": "src/indexer/embed-stage.ts", + "startLine": 8, + "endLine": 13, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.7775427997112274, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "src/core/bootstrap.ts", + "startLine": 56, + "endLine": 66, + "language": "typescript", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.7608658671379089, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "Where is the LanceDB store implementation?", + "queryIndex": 4, + "resultCount": 20, + "latencyMs": 154.4, + "topResults": [ + { + "rank": 0, + "score": 0.014754098360655738, + "filePath": "src/vectorstore/lancedb.ts", + "startLine": 70, + "endLine": 79, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.8301048576831818, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 1, + "score": 0.014516129032258065, + "filePath": "src/vectorstore/lancedb.ts", + "startLine": 122, + "endLine": 190, + "language": "typescript", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.8278456628322601, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 2, + "score": 0.014285714285714285, + "filePath": "src/__tests__/vectorstore/lancedb.test.ts", + "startLine": 408, + "endLine": 458, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.8243442475795746, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 3, + "score": 0.0140625, + "filePath": "src/vectorstore/lancedb.ts", + "startLine": 97, + "endLine": 100, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.8228226900100708, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "src/vectorstore/lancedb.ts", + "startLine": 396, + "endLine": 413, + "language": "typescript", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.8127427101135254, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "Find all usages of the retrieve function", + "queryIndex": 5, + "resultCount": 20, + "latencyMs": 157.6, + "topResults": [ + { + "rank": 0, + "score": 0.01636700158646219, + "filePath": "doc/eval-token-plan.md", + "startLine": 1, + "endLine": 43, + "language": "markdown", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0.0016129032258064516, + "rawVectorScore": 0.7897215187549591, + "rawKeywordScore": 21.775589443671887, + "keywordWeight": 0.1, + "vectorRank": 0, + "keywordRank": 1, + "matchedTerms": [ + "find", + "all", + "usages", + "usage", + "of", + "the", + "retrieve", + "retriev", + "function" + ] + } + }, + { + "rank": 1, + "score": 0.01478578892371996, + "filePath": "src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, + "language": "typescript", + "explanation": { + "vectorScore": 0.013636363636363637, + "keywordScore": 0.0011494252873563218, + "rawVectorScore": 0.770317018032074, + "rawKeywordScore": 21.775589443671887, + "keywordWeight": 0.1, + "vectorRank": 5, + "keywordRank": 26, + "matchedTerms": [ + "find", + "all", + "usages", + "usage", + "of", + "the", + "retrieve", + "retriev", + "function" + ] + } + }, + { + "rank": 2, + "score": 0.014516129032258065, + "filePath": "opencode-rag.example.json", + "startLine": 46, + "endLine": 53, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7881893515586853, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 3, + "score": 0.014285714285714285, + "filePath": "AGENTS.md", + "startLine": 6, + "endLine": 16, + "language": "markdown", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7757284939289093, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 4, + "score": 0.0140625, + "filePath": "opencode-rag.yaml", + "startLine": 4, + "endLine": 11, + "language": "yaml", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.7722410261631012, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "Find all usages of SearchResult type", + "queryIndex": 6, + "resultCount": 20, + "latencyMs": 160.8, + "topResults": [ + { + "rank": 0, + "score": 0.015533088235294118, + "filePath": "src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0.0014705882352941176, + "rawVectorScore": 0.7884072363376617, + "rawKeywordScore": 21.261192954073486, + "keywordWeight": 0.1, + "vectorRank": 3, + "keywordRank": 7, + "matchedTerms": [ + "find", + "all", + "usages", + "usage", + "of", + "searchresult", + "search", + "result", + "type" + ] + } + }, + { + "rank": 1, + "score": 0.014754098360655738, + "filePath": "src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.7973710894584656, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 2, + "score": 0.014516129032258065, + "filePath": "src/mcp/handlers.ts", + "startLine": 290, + "endLine": 299, + "language": "typescript", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7940610945224762, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 3, + "score": 0.014285714285714285, + "filePath": "opencode-rag.json", + "startLine": 100, + "endLine": 107, + "language": "json", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7898558080196381, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "src/mcp/handlers.ts", + "startLine": 176, + "endLine": 181, + "language": "typescript", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.7862828373908997, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the chunker factory register new languages?", + "queryIndex": 7, + "resultCount": 20, + "latencyMs": 169.7, + "topResults": [ + { + "rank": 0, + "score": 0.016078629032258065, + "filePath": "doc/chunking.md", + "startLine": 101, + "endLine": 194, + "language": "markdown", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0.0015625, + "rawVectorScore": 0.8264632523059845, + "rawKeywordScore": 27.050321517754146, + "keywordWeight": 0.1, + "vectorRank": 1, + "keywordRank": 3, + "matchedTerms": [ + "the", + "chunker", + "chunk", + "factory", + "register", + "regist", + "new", + "languages", + "language" + ] + } + }, + { + "rank": 1, + "score": 0.015435139573070607, + "filePath": "src/__tests__/chunker/pdf.test.ts", + "startLine": 78, + "endLine": 88, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0.0011494252873563218, + "rawVectorScore": 0.7940249741077423, + "rawKeywordScore": 14.77358961732654, + "keywordWeight": 0.1, + "vectorRank": 2, + "keywordRank": 26, + "matchedTerms": [ + "chunker", + "chunk", + "factory", + "register", + "language" + ] + } + }, + { + "rank": 2, + "score": 0.015238970588235295, + "filePath": "src/__tests__/chunker/docx.test.ts", + "startLine": 77, + "endLine": 83, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0.0011764705882352942, + "rawVectorScore": 0.7913006544113159, + "rawKeywordScore": 14.77358961732654, + "keywordWeight": 0.1, + "vectorRank": 3, + "keywordRank": 24, + "matchedTerms": [ + "chunker", + "chunk", + "factory", + "register", + "language" + ] + } + }, + { + "rank": 3, + "score": 0.01512820512820513, + "filePath": "doc/chunking.md", + "startLine": 1, + "endLine": 100, + "language": "markdown", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0.001282051282051282, + "rawVectorScore": 0.7867843210697174, + "rawKeywordScore": 16.35401077111984, + "keywordWeight": 0.1, + "vectorRank": 4, + "keywordRank": 17, + "matchedTerms": [ + "how", + "the", + "chunker", + "chunk", + "languages", + "language" + ] + } + }, + { + "rank": 4, + "score": 0.014826839826839827, + "filePath": "src/__tests__/chunker/doc.test.ts", + "startLine": 67, + "endLine": 73, + "language": "typescript", + "explanation": { + "vectorScore": 0.013636363636363637, + "keywordScore": 0.0011904761904761906, + "rawVectorScore": 0.7864995002746582, + "rawKeywordScore": 14.77358961732654, + "keywordWeight": 0.1, + "vectorRank": 5, + "keywordRank": 23, + "matchedTerms": [ + "chunker", + "chunk", + "factory", + "register", + "language" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "What is the default minScore configuration?", + "queryIndex": 8, + "resultCount": 20, + "latencyMs": 174.9, + "topResults": [ + { + "rank": 0, + "score": 0.015223665223665224, + "filePath": "doc/evaluation.md", + "startLine": 201, + "endLine": 270, + "language": "markdown", + "explanation": { + "vectorScore": 0.013636363636363637, + "keywordScore": 0.0015873015873015873, + "rawVectorScore": 0.7552255094051361, + "rawKeywordScore": 24.24757791165203, + "keywordWeight": 0.1, + "vectorRank": 5, + "keywordRank": 2, + "matchedTerms": [ + "what", + "is", + "the", + "default", + "minscore", + "minscor", + "min", + "score", + "configuration" + ] + } + }, + { + "rank": 1, + "score": 0.015147783251231527, + "filePath": "src/__tests__/retriever/retriever.test.ts", + "startLine": 141, + "endLine": 240, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0.0008620689655172415, + "rawVectorScore": 0.7666915357112885, + "rawKeywordScore": 14.352532583513808, + "keywordWeight": 0.1, + "vectorRank": 2, + "keywordRank": 55, + "matchedTerms": [ + "is", + "default", + "minscore", + "minscor", + "min", + "score" + ] + } + }, + { + "rank": 2, + "score": 0.014754098360655738, + "filePath": "opencode-rag.json", + "startLine": 100, + "endLine": 107, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.7759099304676056, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 3, + "score": 0.014516129032258065, + "filePath": "opencode-rag.example.json", + "startLine": 46, + "endLine": 53, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7738143503665924, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 4, + "score": 0.0140625, + "filePath": "opencode.json", + "startLine": 2, + "endLine": 2, + "language": "json", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.7616708278656006, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the session logger capture token usage?", + "queryIndex": 9, + "resultCount": 20, + "latencyMs": 163.3, + "topResults": [ + { + "rank": 0, + "score": 0.016078629032258065, + "filePath": "doc/evaluation.md", + "startLine": 1, + "endLine": 100, + "language": "markdown", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0.0015625, + "rawVectorScore": 0.8386000990867615, + "rawKeywordScore": 28.9714043366769, + "keywordWeight": 0.1, + "vectorRank": 1, + "keywordRank": 3, + "matchedTerms": [ + "how", + "does", + "the", + "session", + "logger", + "logg", + "capture", + "token", + "usage" + ] + } + }, + { + "rank": 1, + "score": 0.014754098360655738, + "filePath": "src/eval/session-logger.ts", + "startLine": 26, + "endLine": 40, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.850882351398468, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 2, + "score": 0.014693611473272491, + "filePath": "doc/webui.md", + "startLine": 101, + "endLine": 188, + "language": "markdown", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0.0008474576271186442, + "rawVectorScore": 0.8151412010192871, + "rawKeywordScore": 10.510117667381786, + "keywordWeight": 0.1, + "vectorRank": 4, + "keywordRank": 57, + "matchedTerms": [ + "the", + "session", + "token", + "usage" + ] + } + }, + { + "rank": 3, + "score": 0.014636363636363638, + "filePath": "src/eval/session-logger.ts", + "startLine": 43, + "endLine": 52, + "language": "typescript", + "explanation": { + "vectorScore": 0.013636363636363637, + "keywordScore": 0.001, + "rawVectorScore": 0.8138251900672913, + "rawKeywordScore": 12.181645640785014, + "keywordWeight": 0.1, + "vectorRank": 5, + "keywordRank": 39, + "matchedTerms": [ + "session", + "logger", + "logg", + "token" + ] + } + }, + { + "rank": 4, + "score": 0.014285714285714285, + "filePath": "src/eval/session-logger.ts", + "startLine": 12, + "endLine": 24, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.8287589848041534, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does L2 normalization affect vector search scores?", + "queryIndex": 10, + "resultCount": 20, + "latencyMs": 157.5, + "topResults": [ + { + "rank": 0, + "score": 0.014754098360655738, + "filePath": "opencode-rag.json", + "startLine": 100, + "endLine": 107, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.817032665014267, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 1, + "score": 0.014516129032258065, + "filePath": "opencode-rag.example.json", + "startLine": 46, + "endLine": 53, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.8085566163063049, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 2, + "score": 0.014444444444444444, + "filePath": "doc/evaluation.md", + "startLine": 201, + "endLine": 270, + "language": "markdown", + "explanation": { + "vectorScore": 0.012857142857142857, + "keywordScore": 0.0015873015873015873, + "rawVectorScore": 0.7841782867908478, + "rawKeywordScore": 17.190573334377124, + "keywordWeight": 0.1, + "vectorRank": 9, + "keywordRank": 2, + "matchedTerms": [ + "how", + "does", + "vector", + "search", + "scores", + "score" + ] + } + }, + { + "rank": 3, + "score": 0.014285714285714285, + "filePath": "opencode-rag.json", + "startLine": 2, + "endLine": 7, + "language": "json", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.8067222833633423, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 4, + "score": 0.0140625, + "filePath": "src/vectorstore/lancedb.ts", + "startLine": 18, + "endLine": 24, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.8061452209949493, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "What is the MetadataFilter interface used for?", + "queryIndex": 11, + "resultCount": 20, + "latencyMs": 162, + "topResults": [ + { + "rank": 0, + "score": 0.015197505197505198, + "filePath": "src/core/interfaces.ts", + "startLine": 141, + "endLine": 146, + "language": "typescript", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0.0013513513513513514, + "rawVectorScore": 0.7834407091140747, + "rawKeywordScore": 20.45902043523328, + "keywordWeight": 0.1, + "vectorRank": 4, + "keywordRank": 13, + "matchedTerms": [ + "metadatafilter", + "metadatafilt", + "metadata", + "filter", + "filt", + "interface", + "interfac" + ] + } + }, + { + "rank": 1, + "score": 0.01490342405618964, + "filePath": "src/retriever/retriever.ts", + "startLine": 13, + "endLine": 23, + "language": "typescript", + "explanation": { + "vectorScore": 0.013432835820895522, + "keywordScore": 0.0014705882352941176, + "rawVectorScore": 0.7768649458885193, + "rawKeywordScore": 22.181936038363684, + "keywordWeight": 0.1, + "vectorRank": 6, + "keywordRank": 7, + "matchedTerms": [ + "is", + "metadatafilter", + "metadatafilt", + "metadata", + "filter", + "filt", + "interface", + "interfac" + ] + } + }, + { + "rank": 2, + "score": 0.014754098360655738, + "filePath": "opencode-rag.example.json", + "startLine": 46, + "endLine": 53, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.7963960766792297, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 3, + "score": 0.014516129032258065, + "filePath": "opencode-rag.json", + "startLine": 100, + "endLine": 107, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7859067916870117, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 4, + "score": 0.014285714285714285, + "filePath": "opencode-rag.json", + "startLine": 108, + "endLine": 118, + "language": "json", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7849999964237213, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the background indexer handle file changes?", + "queryIndex": 12, + "resultCount": 20, + "latencyMs": 161.5, + "topResults": [ + { + "rank": 0, + "score": 0.01570184426229508, + "filePath": "src/watcher.ts", + "startLine": 78, + "endLine": 177, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0.001639344262295082, + "rawVectorScore": 0.809533566236496, + "rawKeywordScore": 21.61063651171747, + "keywordWeight": 0.1, + "vectorRank": 3, + "keywordRank": 0, + "matchedTerms": [ + "background", + "indexer", + "index", + "handle", + "handl", + "file", + "change" + ] + } + }, + { + "rank": 1, + "score": 0.014995335820895522, + "filePath": "src/watcher.ts", + "startLine": 27, + "endLine": 46, + "language": "typescript", + "explanation": { + "vectorScore": 0.013432835820895522, + "keywordScore": 0.0015625, + "rawVectorScore": 0.797376424074173, + "rawKeywordScore": 21.547132576424417, + "keywordWeight": 0.1, + "vectorRank": 6, + "keywordRank": 3, + "matchedTerms": [ + "the", + "background", + "indexer", + "index", + "file", + "changes", + "change" + ] + } + }, + { + "rank": 2, + "score": 0.014754098360655738, + "filePath": "opencode-rag.example.json", + "startLine": 54, + "endLine": 64, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.8205663859844208, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 3, + "score": 0.014516129032258065, + "filePath": "opencode-rag.json", + "startLine": 8, + "endLine": 96, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.8194581270217896, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 4, + "score": 0.014513556618819777, + "filePath": "src/__tests__/watcher/integration.test.ts", + "startLine": 49, + "endLine": 92, + "language": "typescript", + "explanation": { + "vectorScore": 0.013636363636363637, + "keywordScore": 0.0008771929824561404, + "rawVectorScore": 0.8071028888225555, + "rawKeywordScore": 13.083250206130188, + "keywordWeight": 0.1, + "vectorRank": 5, + "keywordRank": 53, + "matchedTerms": [ + "the", + "background", + "indexer", + "index", + "file" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "Where is the config validation logic?", + "queryIndex": 13, + "resultCount": 20, + "latencyMs": 155.6, + "topResults": [ + { + "rank": 0, + "score": 0.015764199370756748, + "filePath": "src/core/config.ts", + "startLine": 519, + "endLine": 618, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0.00101010101010101, + "rawVectorScore": 0.8152535855770111, + "rawKeywordScore": 8.709803050743009, + "keywordWeight": 0.1, + "vectorRank": 0, + "keywordRank": 38, + "matchedTerms": [ + "is", + "config", + "validation" + ] + } + }, + { + "rank": 1, + "score": 0.01543236301369863, + "filePath": "src/core/config.ts", + "startLine": 511, + "endLine": 516, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0.0013698630136986301, + "rawVectorScore": 0.7841500341892242, + "rawKeywordScore": 10.557328832636422, + "keywordWeight": 0.1, + "vectorRank": 3, + "keywordRank": 12, + "matchedTerms": [ + "is", + "the", + "config", + "validation" + ] + } + }, + { + "rank": 2, + "score": 0.014516129032258065, + "filePath": "src/__tests__/core/config.test.ts", + "startLine": 168, + "endLine": 243, + "language": "typescript", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.8064544796943665, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 3, + "score": 0.014285714285714285, + "filePath": "src/__tests__/_images/aa_configuration1.png", + "startLine": 1, + "endLine": 1, + "language": "image", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7884787619113922, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "src/core/config.ts", + "startLine": 647, + "endLine": 746, + "language": "typescript", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.7797802984714508, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How are PDF documents chunked and indexed?", + "queryIndex": 14, + "resultCount": 20, + "latencyMs": 167.8, + "topResults": [ + { + "rank": 0, + "score": 0.01570184426229508, + "filePath": "doc/chunking.md", + "startLine": 1, + "endLine": 100, + "language": "markdown", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0.001639344262295082, + "rawVectorScore": 0.8490744233131409, + "rawKeywordScore": 29.35721047632773, + "keywordWeight": 0.1, + "vectorRank": 3, + "keywordRank": 0, + "matchedTerms": [ + "how", + "are", + "pdf", + "documents", + "document", + "chunk", + "and", + "indexed", + "index" + ] + } + }, + { + "rank": 1, + "score": 0.014754098360655738, + "filePath": "opencode-rag.json", + "startLine": 8, + "endLine": 96, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.8706968128681183, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 2, + "score": 0.014516129032258065, + "filePath": "opencode-rag.example.json", + "startLine": 10, + "endLine": 42, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.8565496206283569, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 3, + "score": 0.014285714285714285, + "filePath": "src/chunker/pdf.ts", + "startLine": 86, + "endLine": 155, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.851568341255188, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "opencode-rag.json", + "startLine": 108, + "endLine": 118, + "language": "json", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.8429512679576874, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "What embedding providers are supported?", + "queryIndex": 15, + "resultCount": 20, + "latencyMs": 156.5, + "topResults": [ + { + "rank": 0, + "score": 0.015924579736483417, + "filePath": "doc/embedding.md", + "startLine": 101, + "endLine": 177, + "language": "markdown", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0.0014084507042253522, + "rawVectorScore": 0.861149400472641, + "rawKeywordScore": 17.470580330681912, + "keywordWeight": 0.1, + "vectorRank": 1, + "keywordRank": 10, + "matchedTerms": [ + "embedding", + "embedd", + "providers", + "provider", + "are", + "support" + ] + } + }, + { + "rank": 1, + "score": 0.015267319277108435, + "filePath": "doc/embedding.md", + "startLine": 1, + "endLine": 100, + "language": "markdown", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0.0012048192771084338, + "rawVectorScore": 0.8509677648544312, + "rawKeywordScore": 14.376358224406216, + "keywordWeight": 0.1, + "vectorRank": 3, + "keywordRank": 22, + "matchedTerms": [ + "embedding", + "embedd", + "providers", + "provider", + "support" + ] + } + }, + { + "rank": 2, + "score": 0.014754098360655738, + "filePath": "opencode-rag.json", + "startLine": 2, + "endLine": 7, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.8729893863201141, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 3, + "score": 0.014285714285714285, + "filePath": "src/embedder/ollama.ts", + "startLine": 51, + "endLine": 97, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.8556520640850067, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "opencode-rag.json", + "startLine": 119, + "endLine": 127, + "language": "json", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.8397506773471832, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the CLI parse and dispatch commands?", + "queryIndex": 16, + "resultCount": 20, + "latencyMs": 160.2, + "topResults": [ + { + "rank": 0, + "score": 0.015817928147889782, + "filePath": "src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0.0010638297872340426, + "rawVectorScore": 0.780185878276825, + "rawKeywordScore": 12.346213527527617, + "keywordWeight": 0.1, + "vectorRank": 0, + "keywordRank": 33, + "matchedTerms": [ + "the", + "cli", + "parse", + "command" + ] + } + }, + { + "rank": 1, + "score": 0.014516129032258065, + "filePath": "doc/cli.md", + "startLine": 301, + "endLine": 326, + "language": "markdown", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7749454081058502, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 2, + "score": 0.014285714285714285, + "filePath": "doc/cli.md", + "startLine": 1, + "endLine": 100, + "language": "markdown", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7710533440113068, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 3, + "score": 0.0140625, + "filePath": "opencode-rag.example.json", + "startLine": 76, + "endLine": 88, + "language": "json", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.7686161696910858, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "opencode-rag.yaml", + "startLine": 4, + "endLine": 11, + "language": "yaml", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.7647121846675873, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the session logger persist events?", + "queryIndex": 17, + "resultCount": 20, + "latencyMs": 151.3, + "topResults": [ + { + "rank": 0, + "score": 0.015536537195523371, + "filePath": "src/eval/session-logger.ts", + "startLine": 43, + "endLine": 52, + "language": "typescript", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0.0010204081632653062, + "rawVectorScore": 0.8493432104587555, + "rawKeywordScore": 13.060379719854602, + "keywordWeight": 0.1, + "vectorRank": 1, + "keywordRank": 37, + "matchedTerms": [ + "session", + "logger", + "logg", + "event" + ] + } + }, + { + "rank": 1, + "score": 0.015295815295815295, + "filePath": "src/eval/session-logger.ts", + "startLine": 58, + "endLine": 157, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0.00101010101010101, + "rawVectorScore": 0.8436324000358582, + "rawKeywordScore": 13.060379719854602, + "keywordWeight": 0.1, + "vectorRank": 2, + "keywordRank": 38, + "matchedTerms": [ + "session", + "logger", + "logg", + "event" + ] + } + }, + { + "rank": 2, + "score": 0.014987714987714989, + "filePath": "src/__tests__/eval/session-logger.test.ts", + "startLine": 243, + "endLine": 317, + "language": "typescript", + "explanation": { + "vectorScore": 0.013636363636363637, + "keywordScore": 0.0013513513513513514, + "rawVectorScore": 0.821203887462616, + "rawKeywordScore": 20.948872557602602, + "keywordWeight": 0.1, + "vectorRank": 5, + "keywordRank": 13, + "matchedTerms": [ + "does", + "session", + "logger", + "logg", + "events", + "event" + ] + } + }, + { + "rank": 3, + "score": 0.014921422663358148, + "filePath": "src/__tests__/eval/session-logger.test.ts", + "startLine": 14, + "endLine": 69, + "language": "typescript", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0.001075268817204301, + "rawVectorScore": 0.8220250904560089, + "rawKeywordScore": 14.400145295323934, + "keywordWeight": 0.1, + "vectorRank": 4, + "keywordRank": 32, + "matchedTerms": [ + "does", + "session", + "events", + "event" + ] + } + }, + { + "rank": 4, + "score": 0.014754098360655738, + "filePath": "src/eval/session-logger.ts", + "startLine": 158, + "endLine": 183, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.8558421730995178, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "What is the manifest schema version used for?", + "queryIndex": 18, + "resultCount": 20, + "latencyMs": 161.1, + "topResults": [ + { + "rank": 0, + "score": 0.015848214285714285, + "filePath": "src/core/manifest.ts", + "startLine": 44, + "endLine": 53, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0.0015625, + "rawVectorScore": 0.7973486483097076, + "rawKeywordScore": 17.080199086744877, + "keywordWeight": 0.1, + "vectorRank": 2, + "keywordRank": 3, + "matchedTerms": [ + "the", + "manifest", + "schema", + "version", + "used", + "for" + ] + } + }, + { + "rank": 1, + "score": 0.014754098360655738, + "filePath": "src/core/manifest.ts", + "startLine": 69, + "endLine": 71, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.8144239783287048, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 2, + "score": 0.014516129032258065, + "filePath": "opencode-rag.example.json", + "startLine": 98, + "endLine": 100, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.8012023866176605, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 3, + "score": 0.0140625, + "filePath": "opencode-rag.example.json", + "startLine": 95, + "endLine": 97, + "language": "json", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.7942595481872559, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "opencode.json", + "startLine": 2, + "endLine": 2, + "language": "json", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.7845654487609863, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the OpenCode plugin register tools?", + "queryIndex": 19, + "resultCount": 20, + "latencyMs": 156.5, + "topResults": [ + { + "rank": 0, + "score": 0.01639344262295082, + "filePath": "doc/plugin.md", + "startLine": 1, + "endLine": 100, + "language": "markdown", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0.001639344262295082, + "rawVectorScore": 0.8655109405517578, + "rawKeywordScore": 28.207124918352243, + "keywordWeight": 0.1, + "vectorRank": 0, + "keywordRank": 0, + "matchedTerms": [ + "how", + "does", + "the", + "opencode", + "opencod", + "open", + "code", + "plugin", + "register", + "tools" + ] + } + }, + { + "rank": 1, + "score": 0.015282012195121951, + "filePath": "doc/plugin.md", + "startLine": 201, + "endLine": 300, + "language": "markdown", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0.0012195121951219512, + "rawVectorScore": 0.8423999845981598, + "rawKeywordScore": 20.989464751071853, + "keywordWeight": 0.1, + "vectorRank": 3, + "keywordRank": 21, + "matchedTerms": [ + "the", + "opencode", + "opencod", + "open", + "code", + "plugin", + "register", + "regist" + ] + } + }, + { + "rank": 2, + "score": 0.01464374482187241, + "filePath": "doc/plugin.md", + "startLine": 101, + "endLine": 200, + "language": "markdown", + "explanation": { + "vectorScore": 0.013235294117647059, + "keywordScore": 0.0014084507042253522, + "rawVectorScore": 0.837580680847168, + "rawKeywordScore": 24.607899626498302, + "keywordWeight": 0.1, + "vectorRank": 7, + "keywordRank": 10, + "matchedTerms": [ + "how", + "the", + "opencode", + "opencod", + "open", + "code", + "plugin", + "register", + "tools" + ] + } + }, + { + "rank": 3, + "score": 0.014516129032258065, + "filePath": "doc/plugin.md", + "startLine": 301, + "endLine": 317, + "language": "markdown", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.8536486327648163, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 4, + "score": 0.014285714285714285, + "filePath": "package.json", + "startLine": 4, + "endLine": 4, + "language": "json", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.8469464778900146, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "Where is the globMatch function defined?", + "queryIndex": 20, + "resultCount": 20, + "latencyMs": 151.5, + "topResults": [ + { + "rank": 0, + "score": 0.015798180314309348, + "filePath": "src/vectorstore/memory.ts", + "startLine": 67, + "endLine": 75, + "language": "typescript", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0.001282051282051282, + "rawVectorScore": 0.7614469528198242, + "rawKeywordScore": 13.927089960969257, + "keywordWeight": 0.1, + "vectorRank": 1, + "keywordRank": 17, + "matchedTerms": [ + "globmatch", + "glob", + "match", + "function" + ] + } + }, + { + "rank": 1, + "score": 0.0153125, + "filePath": "src/retriever/keyword-index.ts", + "startLine": 292, + "endLine": 300, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0.00125, + "rawVectorScore": 0.7540619969367981, + "rawKeywordScore": 13.927089960969257, + "keywordWeight": 0.1, + "vectorRank": 3, + "keywordRank": 19, + "matchedTerms": [ + "globmatch", + "glob", + "match", + "function" + ] + } + }, + { + "rank": 2, + "score": 0.014754098360655738, + "filePath": "src/web/ui/highlight.min.js", + "startLine": 12, + "endLine": 13, + "language": "javascript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.7684441804885864, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 3, + "score": 0.014285714285714285, + "filePath": "src/web/ui/highlight.min.js", + "startLine": 90, + "endLine": 93, + "language": "javascript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7582259476184845, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "src/web/ui/highlight.min.js", + "startLine": 404, + "endLine": 404, + "language": "javascript", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.7536023259162903, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the proxy-aware HTTP client work?", + "queryIndex": 21, + "resultCount": 20, + "latencyMs": 155.4, + "topResults": [ + { + "rank": 0, + "score": 0.014754098360655738, + "filePath": "src/embedder/http.ts", + "startLine": 484, + "endLine": 501, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.781366229057312, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 1, + "score": 0.014516129032258065, + "filePath": "src/embedder/http.ts", + "startLine": 143, + "endLine": 149, + "language": "typescript", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7775079607963562, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 2, + "score": 0.014285714285714285, + "filePath": "src/embedder/http.ts", + "startLine": 152, + "endLine": 164, + "language": "typescript", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7714857459068298, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 3, + "score": 0.0140625, + "filePath": "src/embedder/http.ts", + "startLine": 126, + "endLine": 140, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.7665490210056305, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "src/embedder/http.ts", + "startLine": 504, + "endLine": 557, + "language": "typescript", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.7620988488197327, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "What is the FETCH_OVERFETCH_FACTOR constant?", + "queryIndex": 22, + "resultCount": 20, + "latencyMs": 159.3, + "topResults": [ + { + "rank": 0, + "score": 0.014754098360655738, + "filePath": "opencode-rag.example.json", + "startLine": 98, + "endLine": 100, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.779962420463562, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 1, + "score": 0.014516129032258065, + "filePath": "opencode-rag.example.json", + "startLine": 95, + "endLine": 97, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7755001187324524, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 2, + "score": 0.014285714285714285, + "filePath": "opencode-rag.json", + "startLine": 108, + "endLine": 118, + "language": "json", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7711337506771088, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 3, + "score": 0.0140625, + "filePath": "opencode-rag.example.json", + "startLine": 46, + "endLine": 53, + "language": "json", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.768333375453949, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "opencode-rag.example.json", + "startLine": 54, + "endLine": 64, + "language": "json", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.7682041823863983, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How does the TUI settings menu work?", + "queryIndex": 23, + "resultCount": 20, + "latencyMs": 152.7, + "topResults": [ + { + "rank": 0, + "score": 0.01631659836065574, + "filePath": "src/tui.ts", + "startLine": 608, + "endLine": 707, + "language": "typescript", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0.0015625, + "rawVectorScore": 0.7985324859619141, + "rawKeywordScore": 18.51390782180293, + "keywordWeight": 0.1, + "vectorRank": 0, + "keywordRank": 3, + "matchedTerms": [ + "tui", + "settings", + "setting", + "menu" + ] + } + }, + { + "rank": 1, + "score": 0.014799154334038056, + "filePath": "src/tui.ts", + "startLine": 427, + "endLine": 526, + "language": "typescript", + "explanation": { + "vectorScore": 0.013636363636363637, + "keywordScore": 0.0011627906976744186, + "rawVectorScore": 0.7671421766281128, + "rawKeywordScore": 13.712315698485432, + "keywordWeight": 0.1, + "vectorRank": 5, + "keywordRank": 25, + "matchedTerms": [ + "the", + "tui", + "setting", + "work" + ] + } + }, + { + "rank": 2, + "score": 0.014516129032258065, + "filePath": "opencode-rag.example.json", + "startLine": 105, + "endLine": 108, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.7976454794406891, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 3, + "score": 0.014285714285714285, + "filePath": "opencode-rag.example.json", + "startLine": 98, + "endLine": 100, + "language": "json", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.7935173511505127, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 4, + "score": 0.0140625, + "filePath": "src/tui.ts", + "startLine": 283, + "endLine": 294, + "language": "typescript", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.7797922194004059, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "How are image descriptions generated?", + "queryIndex": 24, + "resultCount": 20, + "latencyMs": 166.6, + "topResults": [ + { + "rank": 0, + "score": 0.014754098360655738, + "filePath": "opencode-rag.example.json", + "startLine": 65, + "endLine": 75, + "language": "json", + "explanation": { + "vectorScore": 0.014754098360655738, + "keywordScore": 0, + "rawVectorScore": 0.9295038282871246, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 0 + } + }, + { + "rank": 1, + "score": 0.014516129032258065, + "filePath": "opencode-rag.json", + "startLine": 119, + "endLine": 127, + "language": "json", + "explanation": { + "vectorScore": 0.014516129032258065, + "keywordScore": 0, + "rawVectorScore": 0.9003736972808838, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 1 + } + }, + { + "rank": 2, + "score": 0.014285714285714285, + "filePath": "doc/retrieval.md", + "startLine": 101, + "endLine": 159, + "language": "markdown", + "explanation": { + "vectorScore": 0.014285714285714285, + "keywordScore": 0, + "rawVectorScore": 0.8528095781803131, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 2 + } + }, + { + "rank": 3, + "score": 0.0140625, + "filePath": "opencode-rag.json", + "startLine": 2, + "endLine": 7, + "language": "json", + "explanation": { + "vectorScore": 0.0140625, + "keywordScore": 0, + "rawVectorScore": 0.845047801733017, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 3 + } + }, + { + "rank": 4, + "score": 0.013846153846153847, + "filePath": "opencode-rag.example.json", + "startLine": 76, + "endLine": 88, + "language": "json", + "explanation": { + "vectorScore": 0.013846153846153847, + "keywordScore": 0, + "rawVectorScore": 0.8441265523433685, + "rawKeywordScore": 0, + "keywordWeight": 0.1, + "vectorRank": 4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 1cd0c2b..fc3fff5 100644 --- a/package.json +++ b/package.json @@ -100,9 +100,7 @@ "web-tree-sitter": "^0.26.9", "word-extractor": "^1.0.4" }, - "optionalDependencies": { - "canvas": "^3.2.3" - }, + "devDependencies": { "@opencode-ai/plugin": "1.15.5", "@opentui/core": "^0.4.0", @@ -125,7 +123,6 @@ "web-tree-sitter": "$web-tree-sitter" }, "allowScripts": { - "canvas": true, "esbuild": true, "msgpackr-extract": true, "tree-sitter-cli": true diff --git a/src/chunker/pdf.ts b/src/chunker/pdf.ts index 10e916e..dd99619 100644 --- a/src/chunker/pdf.ts +++ b/src/chunker/pdf.ts @@ -26,21 +26,14 @@ function getStandardFontsUrl(): string { /** * Create a pdfjs-dist PDF document from a buffer. - * Attempts to load the `canvas` native module for DOMMatrix; falls back to - * `@thednp/dommatrix` polyfill if unavailable. + * Uses `@thednp/dommatrix` for DOMMatrix polyfill (lighter alternative to native canvas). * @param buffer - Raw buffer of the PDF file. * @returns A promise resolving to a pdfjs-dist PDFDocumentProxy. */ async function createPdfDocument(buffer: Buffer) { - try { - const { DOMMatrix } = await import("canvas"); - globalThis.DOMMatrix ??= DOMMatrix as unknown as typeof globalThis.DOMMatrix; - globalThis.DOMMatrixReadOnly ??= DOMMatrix as unknown as typeof globalThis.DOMMatrixReadOnly; - } catch { - const { default: CSSMatrix } = await import("@thednp/dommatrix"); - globalThis.DOMMatrix ??= CSSMatrix as unknown as typeof globalThis.DOMMatrix; - globalThis.DOMMatrixReadOnly ??= CSSMatrix as unknown as typeof globalThis.DOMMatrixReadOnly; - } + const { default: CSSMatrix } = await import("@thednp/dommatrix"); + globalThis.DOMMatrix ??= CSSMatrix as unknown as typeof globalThis.DOMMatrix; + globalThis.DOMMatrixReadOnly ??= CSSMatrix as unknown as typeof globalThis.DOMMatrixReadOnly; const { getDocument } = await import("pdfjs-dist/legacy/build/pdf.mjs"); const loadingTask = getDocument({ diff --git a/src/cli/commands/init-helpers.ts b/src/cli/commands/init-helpers.ts index 6982e07..74e782d 100644 --- a/src/cli/commands/init-helpers.ts +++ b/src/cli/commands/init-helpers.ts @@ -81,7 +81,7 @@ export function buildOpencodeConfig(existing: Record | undefine // Plugin is loaded via .opencode/plugins/rag-plugin.js auto-discovery, // not via npm package resolution. Stale "plugin" entries from older // init versions would trigger npm install (which fails due to native - // dependencies like canvas) and produce "Plugin export is not a function". + // dependencies like sharp) and produce "Plugin export is not a function". delete next.plugin; return next; diff --git a/src/eval/compare-merge.ts b/src/eval/compare-merge.ts new file mode 100644 index 0000000..33a49db --- /dev/null +++ b/src/eval/compare-merge.ts @@ -0,0 +1,692 @@ +/** + * @fileoverview Compare two branch benchmark JSON outputs and produce a side-by-side + * analysis report (console table + markdown file). + * + * Usage: node --import tsx src/eval/compare-merge.ts + * --main doc/eval-results-main.json + * --branch doc/eval-results-t1-cosine-l2.json + * --output doc/eval-branch-compare-report.md + */ + +import { readFileSync, writeFileSync } from "node:fs"; +import path from "node:path"; + +// Types duplicated here so the script can be copied to the main branch +// without depending on run-branch-compare.ts imports. +interface TopResultEntry { + rank: number; + score: number; + filePath: string; + startLine: number; + endLine: number; + language: string; + explanation?: { + vectorScore: number; + keywordScore: number; + rawVectorScore: number; + rawKeywordScore: number; + keywordWeight: number; + vectorRank?: number; + keywordRank?: number; + matchedTerms?: string[]; + }; +} + +interface ThresholdResult { + threshold: number; + passedCount: number; + wouldInject: boolean; +} + +interface QueryResult { + query: string; + queryIndex: number; + resultCount: number; + latencyMs: number; + topResults: TopResultEntry[]; + thresholdAnalysis: ThresholdResult[]; +} + +interface BenchmarkOutput { + branch: string; + commit: string; + timestamp: string; + config: { + embeddingProvider: string; + embeddingModel: string; + topK: number; + minScore: number; + hybridEnabled: boolean; + keywordWeight: number; + }; + indexChunkCount: number; + queries: QueryResult[]; +} + +function parseArgs(): { main: string; branch: string; output: string } { + const args = process.argv.slice(2); + let main = ""; + let branch = ""; + let output = "doc/eval-branch-compare-report.md"; + + for (let i = 0; i < args.length; i++) { + if (args[i] === "--main" && args[i + 1]) { + main = path.resolve(args[i + 1]!); + i++; + } else if (args[i] === "--branch" && args[i + 1]) { + branch = path.resolve(args[i + 1]!); + i++; + } else if (args[i] === "--output" && args[i + 1]) { + output = path.resolve(args[i + 1]!); + i++; + } + } + + if (!main || !branch) { + console.error("Usage: node --import tsx src/eval/compare-merge.ts --main --branch [--output ]"); + process.exit(1); + } + + return { main, branch, output }; +} + +// ---- Statistics helpers ---- + +function avg(arr: number[]): number { + if (arr.length === 0) return 0; + return arr.reduce((s, v) => s + v, 0) / arr.length; +} + +function median(arr: number[]): number { + if (arr.length === 0) return 0; + const sorted = [...arr].sort((a, b) => a - b); + const mid = Math.floor(sorted.length / 2); + return sorted.length % 2 !== 0 ? sorted[mid]! : (sorted[mid - 1]! + sorted[mid]!) / 2; +} + +function percentile(arr: number[], p: number): number { + if (arr.length === 0) return 0; + const sorted = [...arr].sort((a, b) => a - b); + const idx = Math.ceil((p / 100) * sorted.length) - 1; + return sorted[Math.max(0, Math.min(idx, sorted.length - 1))]!; +} + +function stdev(arr: number[]): number { + if (arr.length < 2) return 0; + const m = avg(arr); + const sqDiffs = arr.map((v) => (v - m) ** 2); + return Math.sqrt(sqDiffs.reduce((s, v) => s + v, 0) / (arr.length - 1)); +} + +function jaccardSimilarity(a: string[], b: string[]): number { + const setA = new Set(a); + const setB = new Set(b); + const intersection = new Set([...setA].filter((x) => setB.has(x))); + const union = new Set([...setA, ...setB]); + return union.size === 0 ? 1 : intersection.size / union.size; +} + +// ---- Formatting helpers ---- + +function fmt(n: number, decimals = 3): string { + return n.toFixed(decimals); +} + +function deltaStr(a: number, b: number, decimals = 3): string { + const diff = b - a; + const sign = diff >= 0 ? "+" : ""; + return `${sign}${fmt(diff, decimals)}`; +} + +function deltaStrPct(a: number, b: number): string { + if (a === 0) return b === 0 ? "±0" : "∞"; + const pct = ((b - a) / Math.abs(a)) * 100; + const sign = pct >= 0 ? "+" : ""; + return `${sign}${pct.toFixed(1)}%`; +} + +// ---- Table rendering ---- + +const SEP = "─"; +function cell(s: string, width: number, align: "left" | "right" = "left"): string { + if (s.length >= width) return s.slice(0, width); + return align === "left" ? s + " ".repeat(width - s.length) : " ".repeat(width - s.length) + s; +} + +function tableRow(cols: string[], widths: number[], aligns: ("left" | "right")[]): string { + return "│ " + cols.map((c, i) => cell(c, widths[i]!, aligns[i]!)).join(" │ ") + " │"; +} + +function tableSep(widths: number[]): string { + return "├─" + widths.map((w) => SEP.repeat(w)).join("─┼─") + "─┤"; +} + +function tableTop(widths: number[]): string { + return "┌─" + widths.map((w) => SEP.repeat(w)).join("─┬─") + "─┐"; +} + +function tableBot(widths: number[]): string { + return "└─" + widths.map((w) => SEP.repeat(w)).join("─┴─") + "─┘"; +} + +// ---- Main comparison logic ---- + +interface ComparisonResult { + main: BenchmarkOutput; + branch: BenchmarkOutput; + perQuery: { + query: string; + index: number; + main: { count: number; topScore: number; latencyMs: number; top3Files: string[] }; + branch: { count: number; topScore: number; latencyMs: number; top3Files: string[] }; + }[]; + stats: { + topScore: { main: number[]; branch: number[] }; + resultCount: { main: number[]; branch: number[] }; + latency: { main: number[]; branch: number[] }; + jaccardTop3: number[]; + }; + thresholdAnalysis: { + threshold: number; + mainInject: number; + branchInject: number; + }[]; +} + +function compare(main: BenchmarkOutput, branch: BenchmarkOutput): ComparisonResult { + const perQuery: ComparisonResult["perQuery"] = []; + const topScoreMain: number[] = []; + const topScoreBranch: number[] = []; + const countMain: number[] = []; + const countBranch: number[] = []; + const latencyMain: number[] = []; + const latencyBranch: number[] = []; + const jaccards: number[] = []; + + const maxQueries = Math.max(main.queries.length, branch.queries.length); + + for (let i = 0; i < maxQueries; i++) { + const mq = main.queries[i]; + const bq = branch.queries[i]; + const query = (mq ?? bq)?.query ?? `[query ${i}]`; + + const mCount = mq?.resultCount ?? 0; + const bCount = bq?.resultCount ?? 0; + const mTop = mq?.topResults[0]?.score ?? 0; + const bTop = bq?.topResults[0]?.score ?? 0; + const mLat = mq?.latencyMs ?? 0; + const bLat = bq?.latencyMs ?? 0; + + const mTop3 = (mq?.topResults ?? []).slice(0, 3).map((r) => r.filePath); + const bTop3 = (bq?.topResults ?? []).slice(0, 3).map((r) => r.filePath); + + topScoreMain.push(mTop); + topScoreBranch.push(bTop); + countMain.push(mCount); + countBranch.push(bCount); + latencyMain.push(mLat); + latencyBranch.push(bLat); + + if (mTop3.length > 0 || bTop3.length > 0) { + jaccards.push(jaccardSimilarity(mTop3, bTop3)); + } + + perQuery.push({ + query, + index: i, + main: { count: mCount, topScore: mTop, latencyMs: mLat, top3Files: mTop3 }, + branch: { count: bCount, topScore: bTop, latencyMs: bLat, top3Files: bTop3 }, + }); + } + + // Threshold analysis + const thresholds = [0.85, 0.75, 0.65, 0.50, 0.35]; + const thresholdAnalysis = thresholds.map((t) => { + const mainInject = main.queries.filter((q) => + q.thresholdAnalysis.find((ta) => ta.threshold === t)?.wouldInject, + ).length; + const branchInject = branch.queries.filter((q) => + q.thresholdAnalysis.find((ta) => ta.threshold === t)?.wouldInject, + ).length; + return { threshold: t, mainInject, branchInject }; + }); + + return { + main, + branch, + perQuery, + stats: { + topScore: { main: topScoreMain, branch: topScoreBranch }, + resultCount: { main: countMain, branch: countBranch }, + latency: { main: latencyMain, branch: latencyBranch }, + jaccardTop3: jaccards, + }, + thresholdAnalysis, + }; +} + +function printConsole(result: ComparisonResult): void { + const { main, branch, stats, perQuery, thresholdAnalysis } = result; + + // ── Header ── + console.log("\n" + SEP.repeat(80)); + console.log( + ` BRANCH COMPARISON: ${main.branch} (${main.commit}) vs ${branch.branch} (${branch.commit})`, + ); + console.log(SEP.repeat(80) + "\n"); + + // ── Config table ── + const cfgCols = ["", "main", branch.branch]; + const cfgW = [18, 24, 24]; + const cfgA: ("left" | "right")[] = ["left", "right", "right"]; + + console.log(" Config:"); + console.log(" " + tableTop(cfgW)); + console.log(" " + tableRow(cfgCols, cfgW, cfgA)); + console.log(" " + tableSep(cfgW)); + console.log(" " + tableRow(["minScore", fmt(main.config.minScore, 2), fmt(branch.config.minScore, 2)], cfgW, cfgA)); + console.log(" " + tableRow(["keywordWeight", fmt(main.config.keywordWeight, 2), fmt(branch.config.keywordWeight, 2)], cfgW, cfgA)); + console.log(" " + tableRow(["topK", String(main.config.topK), String(branch.config.topK)], cfgW, cfgA)); + console.log(" " + tableRow(["hybrid", String(main.config.hybridEnabled), String(branch.config.hybridEnabled)], cfgW, cfgA)); + console.log(" " + tableRow(["embedding", main.config.embeddingModel, branch.config.embeddingModel], cfgW, cfgA)); + console.log(" " + tableRow(["index chunks", String(main.indexChunkCount), String(branch.indexChunkCount)], cfgW, cfgA)); + console.log(" " + tableBot(cfgW)); + console.log(); + + // ── Score quality ── + const scoreCols = ["", "avg", "median", "p95", "p5", "stdev"]; + const scoreW = [12, 10, 10, 10, 10, 10]; + const scoreA: ("left" | "right")[] = ["left", "right", "right", "right", "right", "right"]; + + console.log(" Score Quality (top-1 per query):"); + console.log(" " + tableTop(scoreW)); + console.log(" " + tableRow(scoreCols, scoreW, scoreA)); + console.log(" " + tableSep(scoreW)); + + const mScores = stats.topScore.main; + const bScores = stats.topScore.branch; + console.log(" " + tableRow([main.branch, fmt(avg(mScores)), fmt(median(mScores)), fmt(percentile(mScores, 95)), fmt(percentile(mScores, 5)), fmt(stdev(mScores))], scoreW, scoreA)); + console.log(" " + tableRow([branch.branch, fmt(avg(bScores)), fmt(median(bScores)), fmt(percentile(bScores, 95)), fmt(percentile(bScores, 5)), fmt(stdev(bScores))], scoreW, scoreA)); + console.log(" " + tableRow(["Δ", deltaStr(avg(mScores), avg(bScores)), deltaStr(median(mScores), median(bScores)), deltaStr(percentile(mScores, 95), percentile(bScores, 95)), deltaStr(percentile(mScores, 5), percentile(bScores, 5)), ""], scoreW, scoreA)); + console.log(" " + tableBot(scoreW)); + console.log(); + + // ── Result count ── + console.log(" Result Count (per query):"); + console.log(" " + tableTop(scoreW)); + console.log(" " + tableRow(scoreCols, scoreW, scoreA)); + console.log(" " + tableSep(scoreW)); + + const mCount = stats.resultCount.main; + const bCount = stats.resultCount.branch; + console.log(" " + tableRow([main.branch, fmt(avg(mCount), 1), fmt(median(mCount), 1), fmt(percentile(mCount, 95), 1), fmt(percentile(mCount, 5), 1), fmt(stdev(mCount), 1)], scoreW, scoreA)); + console.log(" " + tableRow([branch.branch, fmt(avg(bCount), 1), fmt(median(bCount), 1), fmt(percentile(bCount, 95), 1), fmt(percentile(bCount, 5), 1), fmt(stdev(bCount), 1)], scoreW, scoreA)); + console.log(" " + tableRow(["Δ", deltaStr(avg(mCount), avg(bCount), 1), deltaStr(median(mCount), median(bCount), 1), "", "", ""], scoreW, scoreA)); + console.log(" " + tableBot(scoreW)); + console.log(); + + // ── Latency ── + console.log(" Latency (ms per query):"); + console.log(" " + tableTop(scoreW)); + console.log(" " + tableRow(scoreCols, scoreW, scoreA)); + console.log(" " + tableSep(scoreW)); + + const mLat = stats.latency.main; + const bLat = stats.latency.branch; + console.log(" " + tableRow([main.branch, fmt(avg(mLat), 1), fmt(median(mLat), 1), fmt(percentile(mLat, 95), 1), fmt(percentile(mLat, 5), 1), fmt(stdev(mLat), 1)], scoreW, scoreA)); + console.log(" " + tableRow([branch.branch, fmt(avg(bLat), 1), fmt(median(bLat), 1), fmt(percentile(bLat, 95), 1), fmt(percentile(bLat, 5), 1), fmt(stdev(bLat), 1)], scoreW, scoreA)); + console.log(" " + tableRow(["Δ", deltaStr(avg(mLat), avg(bLat), 1), deltaStr(median(mLat), median(bLat), 1), "", "", ""], scoreW, scoreA)); + console.log(" " + tableBot(scoreW)); + console.log(); + + // ── Threshold coverage ── + const thCols = ["threshold", main.branch, branch.branch, "Δ"]; + const thW = [12, 12, 16, 10]; + const thA: ("left" | "right")[] = ["left", "right", "right", "right"]; + + console.log(" Threshold Coverage (queries that would inject):"); + console.log(" " + tableTop(thW)); + console.log(" " + tableRow(thCols, thW, thA)); + console.log(" " + tableSep(thW)); + for (const ta of thresholdAnalysis) { + const diff = ta.branchInject - ta.mainInject; + const d = diff >= 0 ? `+${diff}` : `${diff}`; + console.log( + " " + tableRow( + [fmt(ta.threshold, 2), `${ta.mainInject}/${perQuery.length}`, `${ta.branchInject}/${perQuery.length}`, d], + thW, + thA, + ), + ); + } + console.log(" " + tableBot(thW)); + console.log(); + + // ── Rank stability ── + const jaccard = stats.jaccardTop3; + console.log(` Rank Stability (Jaccard top-3 files per query):`); + console.log(` avg: ${fmt(avg(jaccard), 3)}`); + console.log(` median: ${fmt(median(jaccard), 3)}`); + console.log(` min: ${fmt(Math.min(...jaccard), 3)}`); + console.log(` max: ${fmt(Math.max(...jaccard), 3)}`); + console.log(); + + // ── Per-query table ── + const pqCols = ["#", "Query (truncated)", `${main.branch} score`, `${branch.branch} score`, "Δ", `${main.branch} files`, `${branch.branch} files`]; + const pqW = [3, 42, 14, 16, 10, 28, 28]; + const pqA: ("left" | "right")[] = ["right", "left", "right", "right", "right", "left", "left"]; + + console.log(" Per-Query Summary:"); + console.log(" " + tableTop(pqW)); + console.log(" " + tableRow(pqCols, pqW, pqA)); + console.log(" " + tableSep(pqW)); + + for (const pq of perQuery) { + const q = pq.query.length > 39 ? pq.query.substring(0, 36) + "..." : pq.query; + const mFiles = pq.main.top3Files.map((f) => f.split("/").pop() ?? f).join(", "); + const bFiles = pq.branch.top3Files.map((f) => f.split("/").pop() ?? f).join(", "); + console.log( + " " + tableRow( + [ + String(pq.index + 1), + q, + fmt(pq.main.topScore), + fmt(pq.branch.topScore), + deltaStr(pq.main.topScore, pq.branch.topScore), + mFiles.length > 27 ? mFiles.substring(0, 24) + "..." : mFiles, + bFiles.length > 27 ? bFiles.substring(0, 24) + "..." : bFiles, + ], + pqW, + pqA, + ), + ); + } + console.log(" " + tableBot(pqW)); + console.log(); +} + +function generateReport(result: ComparisonResult): string { + const { main, branch, stats, perQuery, thresholdAnalysis } = result; + const lines: string[] = []; + + lines.push("# Branch Comparison Report"); + lines.push(""); + lines.push(`**Generated:** ${new Date().toISOString()}`); + lines.push(`**Main branch:** \`${main.branch}\` @ \`${main.commit}\` (${main.timestamp.split("T")[0]})`); + lines.push(`**Feature branch:** \`${branch.branch}\` @ \`${branch.commit}\` (${branch.timestamp.split("T")[0]})`); + lines.push(""); + + // ── Configuration ── + lines.push("## Configuration"); + lines.push(""); + lines.push("| Setting | `" + main.branch + "` | `" + branch.branch + "` |"); + lines.push("|---|---|---|"); + lines.push(`| Embedding provider | ${main.config.embeddingProvider} | ${branch.config.embeddingProvider} |`); + lines.push(`| Embedding model | ${main.config.embeddingModel} | ${branch.config.embeddingModel} |`); + lines.push(`| topK | ${main.config.topK} | ${branch.config.topK} |`); + lines.push(`| minScore | ${main.config.minScore} | ${branch.config.minScore} |`); + lines.push(`| Hybrid search | ${main.config.hybridEnabled} | ${branch.config.hybridEnabled} |`); + lines.push(`| Keyword weight | ${main.config.keywordWeight} | ${branch.config.keywordWeight} |`); + lines.push(`| Indexed chunks | ${main.indexChunkCount} | ${branch.indexChunkCount} |`); + lines.push(""); + + // ── Scoring method ── + lines.push("## Scoring Method Differences"); + lines.push(""); + lines.push("| Aspect | `" + main.branch + "` | `" + branch.branch + "` |"); + lines.push("|---|---|---|"); + lines.push("| Vector scoring | `1 / (1 + L2 distance)` | Cosine similarity via L2-normalized vectors |"); + lines.push("| Hybrid fusion | Weighted linear: `(1-kw)*normV + kw*normK` | Reciprocal Rank Fusion (RRF, K=60) |"); + lines.push("| Default minScore | " + main.config.minScore + " | " + branch.config.minScore + " |"); + lines.push("| Metadata filter | Not supported | `MetadataFilter` support added |"); + lines.push(""); + + // ── Score quality ── + const mScores = stats.topScore.main; + const bScores = stats.topScore.branch; + lines.push("## Top-1 Score Quality"); + lines.push(""); + lines.push("| Metric | `" + main.branch + "` | `" + branch.branch + "` | Δ | Δ% |"); + lines.push("|---|---|---|---|---|"); + lines.push(`| Average | ${fmt(avg(mScores))} | ${fmt(avg(bScores))} | ${deltaStr(avg(mScores), avg(bScores))} | ${deltaStrPct(avg(mScores), avg(bScores))} |`); + lines.push(`| Median | ${fmt(median(mScores))} | ${fmt(median(bScores))} | ${deltaStr(median(mScores), median(bScores))} | ${deltaStrPct(median(mScores), median(bScores))} |`); + lines.push(`| P95 | ${fmt(percentile(mScores, 95))} | ${fmt(percentile(bScores, 95))} | ${deltaStr(percentile(mScores, 95), percentile(bScores, 95))} | ${deltaStrPct(percentile(mScores, 95), percentile(bScores, 95))} |`); + lines.push(`| P5 | ${fmt(percentile(mScores, 5))} | ${fmt(percentile(bScores, 5))} | ${deltaStr(percentile(mScores, 5), percentile(bScores, 5))} | ${deltaStrPct(percentile(mScores, 5), percentile(bScores, 5))} |`); + lines.push(`| Std Dev | ${fmt(stdev(mScores))} | ${fmt(stdev(bScores))} | ${deltaStr(stdev(mScores), stdev(bScores))} | — |`); + lines.push(""); + + lines.push("> **Interpretation:** Cosine similarity produces scores in a tighter 0-1 range."); + lines.push("> RRF further shifts scores based on rank rather than raw similarity, so comparing"); + lines.push("> absolute scores across branches is misleading. The key metric is **whether the same"); + lines.push("> relevant files appear in the top results** (see Rank Stability below)."); + lines.push(""); + + // ── Result count ── + const mCount = stats.resultCount.main; + const bCount = stats.resultCount.branch; + lines.push("## Result Count (per query)"); + lines.push(""); + lines.push("| Metric | `" + main.branch + "` | `" + branch.branch + "` | Δ |"); + lines.push("|---|---|---|---|"); + lines.push(`| Average | ${fmt(avg(mCount), 1)} | ${fmt(avg(bCount), 1)} | ${deltaStr(avg(mCount), avg(bCount), 1)} |`); + lines.push(`| Median | ${fmt(median(mCount), 1)} | ${fmt(median(bCount), 1)} | ${deltaStr(median(mCount), median(bCount), 1)} |`); + lines.push(`| P95 | ${fmt(percentile(mCount, 95), 1)} | ${fmt(percentile(bCount, 95), 1)} | — |`); + lines.push(`| Zero-result queries | ${mCount.filter((c) => c === 0).length} | ${bCount.filter((c) => c === 0).length} | — |`); + lines.push(""); + + // ── Latency ── + const mLat = stats.latency.main; + const bLat = stats.latency.branch; + lines.push("## Latency (ms per query)"); + lines.push(""); + lines.push("| Metric | `" + main.branch + "` | `" + branch.branch + "` | Δ |"); + lines.push("|---|---|---|---|"); + lines.push(`| Average | ${fmt(avg(mLat), 1)} | ${fmt(avg(bLat), 1)} | ${deltaStr(avg(mLat), avg(bLat), 1)} |`); + lines.push(`| Median | ${fmt(median(mLat), 1)} | ${fmt(median(bLat), 1)} | ${deltaStr(median(mLat), median(bLat), 1)} |`); + lines.push(`| P95 | ${fmt(percentile(mLat, 95), 1)} | ${fmt(percentile(bLat, 95), 1)} | — |`); + lines.push(""); + + // ── Threshold coverage ── + lines.push("## Threshold Coverage"); + lines.push(""); + lines.push("Shows how many queries would trigger RAG context injection at each `minScore` threshold."); + lines.push(""); + lines.push("| Threshold | `" + main.branch + "` | `" + branch.branch + "` | Δ |"); + lines.push("|---|---|---|---|"); + for (const ta of thresholdAnalysis) { + const diff = ta.branchInject - ta.mainInject; + const d = diff >= 0 ? `+${diff}` : `${diff}`; + lines.push(`| ${fmt(ta.threshold, 2)} | ${ta.mainInject}/${perQuery.length} | ${ta.branchInject}/${perQuery.length} | ${d} |`); + } + lines.push(""); + + // ── Rank stability ── + const jaccard = stats.jaccardTop3; + lines.push("## Rank Stability (Jaccard Similarity)"); + lines.push(""); + lines.push("For each query, computes the Jaccard similarity of the top-3 file paths between branches."); + lines.push("1.0 = identical top-3 files, 0.0 = completely different."); + lines.push(""); + lines.push("| Metric | Value |"); + lines.push("|---|---|"); + lines.push(`| Average | ${fmt(avg(jaccard), 3)} |`); + lines.push(`| Median | ${fmt(median(jaccard), 3)} |`); + lines.push(`| Minimum | ${fmt(Math.min(...jaccard), 3)} |`); + lines.push(`| Maximum | ${fmt(Math.max(...jaccard), 3)} |`); + lines.push(""); + + // ── Per-query detailed results ── + lines.push("## Per-Query Results"); + lines.push(""); + lines.push("| # | Query | `" + main.branch + "` results | `" + main.branch + "` top score | `" + branch.branch + "` results | `" + branch.branch + "` top score | Δ score | Jaccard (top-3) |"); + lines.push("|---|---|---|---|---|---|---|---|"); + + for (const pq of perQuery) { + const q = pq.query.length > 50 ? pq.query.substring(0, 47) + "..." : pq.query; + const jac = jaccardSimilarity(pq.main.top3Files, pq.branch.top3Files); + lines.push( + `| ${pq.index + 1} | ${q} | ${pq.main.count} | ${fmt(pq.main.topScore)} | ${pq.branch.count} | ${fmt(pq.branch.topScore)} | ${deltaStr(pq.main.topScore, pq.branch.topScore)} | ${fmt(jac, 3)} |`, + ); + } + lines.push(""); + + // ── Raw top-5 outputs side by side ── + lines.push("## Raw Top-5 Results by Query"); + lines.push(""); + lines.push("Each query shows the top-5 file paths and scores for both branches side by side."); + lines.push(""); + + for (const pq of perQuery) { + const mq = main.queries[pq.index]; + const bq = branch.queries[pq.index]; + if (!mq && !bq) continue; + + lines.push(`### Query ${pq.index + 1}: ${pq.query}`); + lines.push(""); + + if (mq && mq.topResults.length > 0) { + lines.push("**`" + main.branch + "`** "); + lines.push("| Rank | Score | File | Lines | Language |"); + lines.push("|------|-------|------|-------|----------|"); + for (const tr of mq.topResults) { + lines.push(`| ${tr.rank + 1} | ${fmt(tr.score)} | \`${tr.filePath}\` | ${tr.startLine}-${tr.endLine} | ${tr.language} |`); + } + } else { + lines.push("**`" + main.branch + "`** — no results"); + } + lines.push(""); + + if (bq && bq.topResults.length > 0) { + lines.push("**`" + branch.branch + "`** "); + lines.push("| Rank | Score | File | Lines | Language |"); + lines.push("|------|-------|------|-------|----------|"); + for (const tr of bq.topResults) { + lines.push(`| ${tr.rank + 1} | ${fmt(tr.score)} | \`${tr.filePath}\` | ${tr.startLine}-${tr.endLine} | ${tr.language} |`); + } + } else { + lines.push("**`" + branch.branch + "`** — no results"); + } + lines.push(""); + } + + // ── Explanation comparison (first 3 queries) ── + lines.push("## Explanation / Score Breakdown (Sample)"); + lines.push(""); + lines.push("First 3 queries with explanation details when available."); + lines.push(""); + + for (let i = 0; i < Math.min(3, perQuery.length); i++) { + const pq = perQuery[i]!; + const mq = main.queries[pq.index]; + const bq = branch.queries[pq.index]; + + lines.push(`### Query ${pq.index + 1}: ${pq.query}`); + lines.push(""); + + const mExp = mq?.topResults[0]?.explanation; + const bExp = bq?.topResults[0]?.explanation; + + if (mExp) { + lines.push("**`" + main.branch + "`** (top-1 explanation) "); + lines.push("| Component | Value |"); + lines.push("|-----------|-------|"); + lines.push(`| vectorScore | ${fmt(mExp.vectorScore)} |`); + lines.push(`| keywordScore | ${fmt(mExp.keywordScore)} |`); + lines.push(`| rawVectorScore | ${fmt(mExp.rawVectorScore)} |`); + lines.push(`| rawKeywordScore | ${fmt(mExp.rawKeywordScore)} |`); + lines.push(`| keywordWeight | ${fmt(mExp.keywordWeight)} |`); + if (mExp.vectorRank !== undefined) lines.push(`| vectorRank | ${mExp.vectorRank} |`); + if (mExp.keywordRank !== undefined) lines.push(`| keywordRank | ${mExp.keywordRank} |`); + if (mExp.matchedTerms?.length) lines.push(`| matchedTerms | ${mExp.matchedTerms.join(", ")} |`); + lines.push(""); + } + + if (bExp) { + lines.push("**`" + branch.branch + "`** (top-1 explanation) "); + lines.push("| Component | Value |"); + lines.push("|-----------|-------|"); + lines.push(`| vectorScore | ${fmt(bExp.vectorScore)} |`); + lines.push(`| keywordScore | ${fmt(bExp.keywordScore)} |`); + lines.push(`| rawVectorScore | ${fmt(bExp.rawVectorScore)} |`); + lines.push(`| rawKeywordScore | ${fmt(bExp.rawKeywordScore)} |`); + lines.push(`| keywordWeight | ${fmt(bExp.keywordWeight)} |`); + if (bExp.vectorRank !== undefined) lines.push(`| vectorRank | ${bExp.vectorRank} |`); + if (bExp.keywordRank !== undefined) lines.push(`| keywordRank | ${bExp.keywordRank} |`); + if (bExp.matchedTerms?.length) lines.push(`| matchedTerms | ${bExp.matchedTerms.join(", ")} |`); + lines.push(""); + } + } + + // ── Verdict ── + lines.push("## Verdict"); + lines.push(""); + + const mAvg = avg(mScores); + const bAvg = avg(bScores); + const mji = thresholdAnalysis.find((t) => t.threshold === 0.75)?.mainInject ?? 0; + const bji = thresholdAnalysis.find((t) => t.threshold === 0.75)?.branchInject ?? 0; + const mZero = mCount.filter((c) => c === 0).length; + const bZero = bCount.filter((c) => c === 0).length; + const avgJac = avg(jaccard); + + const improvements: string[] = []; + if (bAvg > mAvg) improvements.push(`higher top-1 scores (avg ${fmt(bAvg)} vs ${fmt(mAvg)})`); + if (bji > mji) improvements.push(`better threshold coverage (${bji}/${perQuery.length} vs ${mji}/${perQuery.length} at minScore 0.75)`); + if (bZero < mZero) improvements.push(`fewer zero-result queries (${bZero} vs ${mZero})`); + if (avgJac > 0.5) improvements.push("high rank stability with main (Jaccard " + fmt(avgJac, 3) + ")"); + else improvements.push("notable rank shift (Jaccard " + fmt(avgJac, 3) + ")"); + + lines.push("The `" + branch.branch + "` branch shows:"); + lines.push(""); + for (const imp of improvements) { + lines.push(`- **${imp}**`); + } + lines.push(""); + lines.push("### Caveats"); + lines.push(""); + lines.push("- Cosine similarity + RRF produce fundamentally different score distributions than L2 + linear fusion."); + lines.push(" **Absolute scores are not directly comparable** between the two approaches."); + lines.push("- The key quality indicator is **whether relevant files rank highly**, not the raw score value."); + lines.push("- RRF de-emphasizes raw similarity magnitude and focuses on rank agreement between vector and keyword signals."); + lines.push("- This means an RRF score of 0.05 can be just as meaningful as an L2 score of 0.85 — they are different scales."); + lines.push(""); + lines.push("### Recommendation"); + lines.push(""); + lines.push("Review the raw top-5 results per query above to confirm that the cosine+RRF approach"); + lines.push("retrieves the same or better files. If rank stability is high (Jaccard > 0.5) and"); + lines.push("threshold coverage improves, the new scoring is likely a net positive."); + lines.push(""); + + return lines.join("\n"); +} + +async function main() { + const { main: mainPath, branch: branchPath, output } = parseArgs(); + + const mainData: BenchmarkOutput = JSON.parse(readFileSync(mainPath, "utf-8")); + const branchData: BenchmarkOutput = JSON.parse(readFileSync(branchPath, "utf-8")); + + console.log(` Main: ${mainPath}`); + console.log(` Branch: ${branchPath}`); + console.log(` Output: ${output}\n`); + + const result = compare(mainData, branchData); + + printConsole(result); + + const report = generateReport(result); + const dir = path.dirname(output); + try { + const { mkdirSync } = await import("node:fs"); + mkdirSync(dir, { recursive: true }); + } catch { + // dir exists + } + writeFileSync(output, report, "utf-8"); + console.log(` Report written to: ${output}\n`); +} + +main().catch((err) => { + console.error("Compare failed:", err); + process.exit(1); +}); diff --git a/src/eval/run-branch-compare.ts b/src/eval/run-branch-compare.ts new file mode 100644 index 0000000..92d122b --- /dev/null +++ b/src/eval/run-branch-compare.ts @@ -0,0 +1,292 @@ +/** + * @fileoverview Branch comparison benchmark — runs N queries against the indexed codebase + * and outputs per-query results as JSON for later comparison. + * + * Usage: node --import tsx src/eval/run-branch-compare.ts --output doc/eval-results-branch.json + */ + +import { writeFileSync } from "node:fs"; +import path from "node:path"; +import { loadConfig, DEFAULT_CONFIG } from "../core/config.js"; +import { createEmbedder } from "../embedder/factory.js"; +import { createVectorStore } from "../vectorstore/factory.js"; +import { retrieve } from "../retriever/retriever.js"; +import { KeywordIndex } from "../retriever/keyword-index.js"; +import { + loadRuntimeOverrides, + applyRuntimeOverrides, +} from "../core/runtime-overrides.js"; +import { resolveApiKey } from "../core/resolve-api-key.js"; +import type { SearchResult } from "../core/interfaces.js"; +import { execSync } from "node:child_process"; + +const WORKTREE = process.cwd(); +const STORE_PATH = path.join(WORKTREE, ".opencode", "rag_db"); + +const QUERIES: string[] = [ + "How does the retrieval pipeline work end-to-end?", + "How does the plugin interact with chat messages?", + "How does the keyword index combine with vector search?", + "Where is the embedder factory defined?", + "Where is the LanceDB store implementation?", + "Find all usages of the retrieve function", + "Find all usages of SearchResult type", + "How does the chunker factory register new languages?", + "What is the default minScore configuration?", + "How does the session logger capture token usage?", + "How does L2 normalization affect vector search scores?", + "What is the MetadataFilter interface used for?", + "How does the background indexer handle file changes?", + "Where is the config validation logic?", + "How are PDF documents chunked and indexed?", + "What embedding providers are supported?", + "How does the CLI parse and dispatch commands?", + "How does the session logger persist events?", + "What is the manifest schema version used for?", + "How does the OpenCode plugin register tools?", + "Where is the globMatch function defined?", + "How does the proxy-aware HTTP client work?", + "What is the FETCH_OVERFETCH_FACTOR constant?", + "How does the TUI settings menu work?", + "How are image descriptions generated?", +]; + +const THRESHOLDS = [0.85, 0.75, 0.65, 0.50, 0.35]; + +interface TopResultEntry { + rank: number; + score: number; + filePath: string; + startLine: number; + endLine: number; + language: string; + explanation?: { + vectorScore: number; + keywordScore: number; + rawVectorScore: number; + rawKeywordScore: number; + keywordWeight: number; + vectorRank?: number; + keywordRank?: number; + matchedTerms?: string[]; + }; +} + +interface ThresholdResult { + threshold: number; + passedCount: number; + wouldInject: boolean; +} + +interface QueryResult { + query: string; + queryIndex: number; + resultCount: number; + latencyMs: number; + topResults: TopResultEntry[]; + thresholdAnalysis: ThresholdResult[]; +} + +interface BenchmarkOutput { + branch: string; + commit: string; + timestamp: string; + config: { + embeddingProvider: string; + embeddingModel: string; + topK: number; + minScore: number; + hybridEnabled: boolean; + keywordWeight: number; + }; + indexChunkCount: number; + queries: QueryResult[]; +} + +function getGitInfo(): { branch: string; commit: string } { + try { + const branch = execSync("git rev-parse --abbrev-ref HEAD", { + encoding: "utf-8", + }).trim(); + const commit = execSync("git rev-parse --short HEAD", { + encoding: "utf-8", + }).trim(); + return { branch, commit }; + } catch { + return { branch: "unknown", commit: "unknown" }; + } +} + +function getConfig() { + const configPath = path.join(WORKTREE, "opencode-rag.json"); + let cfg; + try { + cfg = loadConfig(configPath); + } catch { + cfg = DEFAULT_CONFIG; + } + const overrides = loadRuntimeOverrides(STORE_PATH); + cfg = applyRuntimeOverrides(cfg, overrides); + resolveApiKey(cfg, WORKTREE); + return cfg; +} + +async function probeDimension( + embedder: import("../core/interfaces.js").EmbeddingProvider, +): Promise { + try { + const probe = await embedder.embed(["dimension-probe"], "query"); + if (probe.length > 0 && probe[0]!.length > 0) { + return probe[0]!.length; + } + } catch { + // fall through to default + } + return 384; +} + +function topResults( + results: SearchResult[], + worktree: string, + max = 5, +): TopResultEntry[] { + return results.slice(0, max).map((r, i) => { + const exp = r.explanation; + return { + rank: i, + score: r.score, + filePath: path.relative(worktree, r.chunk.metadata.filePath).replace(/\\/g, "/"), + startLine: r.chunk.metadata.startLine, + endLine: r.chunk.metadata.endLine, + language: r.chunk.metadata.language, + explanation: exp + ? { + vectorScore: exp.scoreBreakdown.vectorScore, + keywordScore: exp.scoreBreakdown.keywordScore, + rawVectorScore: exp.scoreBreakdown.rawVectorScore, + rawKeywordScore: exp.scoreBreakdown.rawKeywordScore, + keywordWeight: exp.scoreBreakdown.keywordWeight, + vectorRank: (exp.scoreBreakdown as Record).vectorRank as number | undefined, + keywordRank: (exp.scoreBreakdown as Record).keywordRank as number | undefined, + matchedTerms: exp.matchedTerms, + } + : undefined, + }; + }); +} + +function thresholdAnalysis( + results: SearchResult[], +): ThresholdResult[] { + return THRESHOLDS.map((t) => ({ + threshold: t, + passedCount: results.filter((r) => r.score >= t).length, + wouldInject: results.some((r) => r.score >= t), + })); +} + +function parseArgs(): { output: string } { + const args = process.argv.slice(2); + let output = path.join(WORKTREE, "doc", "eval-results-branch.json"); + for (let i = 0; i < args.length; i++) { + if (args[i] === "--output" && args[i + 1]) { + output = path.resolve(WORKTREE, args[i + 1]!); + break; + } + } + return { output }; +} + +async function main() { + const { output } = parseArgs(); + const { branch, commit } = getGitInfo(); + + console.log(`\n OpenCodeRAG Branch Benchmark`); + console.log(` Branch: ${branch} @ ${commit}`); + console.log(` Output: ${output}\n`); + + const cfg = getConfig(); + const embedder = createEmbedder(cfg); + const dimension = await probeDimension(embedder); + const store = createVectorStore(cfg, STORE_PATH, dimension); + + let keywordIndex: KeywordIndex | undefined; + try { + keywordIndex = await KeywordIndex.load(STORE_PATH); + } catch { + // optional + } + + const indexedCount = await store.count(); + console.log(` Indexed chunks: ${indexedCount}`); + console.log(` Embedding: ${cfg.embedding.provider}/${cfg.embedding.model} (${dimension}d)`); + console.log(` Retrieval: topK=${cfg.retrieval.topK}, minScore=${cfg.retrieval.minScore}, hybrid=${cfg.retrieval.hybridSearch?.enabled}\n`); + + const queryResults: QueryResult[] = []; + + for (let i = 0; i < QUERIES.length; i++) { + const query = QUERIES[i]!; + process.stdout.write(` [${i + 1}/${QUERIES.length}] ${query.substring(0, 55)}...`); + + const start = performance.now(); + const searchResults = await retrieve(query, embedder, store, { + topK: cfg.retrieval.topK, + minScore: 0, // no filter — we want all scores for threshold analysis + keywordIndex, + keywordWeight: cfg.retrieval.hybridSearch?.keywordWeight, + hybridEnabled: cfg.retrieval.hybridSearch?.enabled, + queryPrefix: cfg.embedding.queryPrefix, + explain: true, + }); + const elapsed = performance.now() - start; + + queryResults.push({ + query, + queryIndex: i, + resultCount: searchResults.length, + latencyMs: Math.round(elapsed * 10) / 10, + topResults: topResults(searchResults, WORKTREE, 5), + thresholdAnalysis: thresholdAnalysis(searchResults), + }); + + const topScore = + searchResults.length > 0 + ? searchResults[0]!.score.toFixed(3) + : "N/A"; + console.log( + ` ${searchResults.length} results, top=${topScore}, ${Math.round(elapsed)}ms`, + ); + } + + const outputPayload: BenchmarkOutput = { + branch, + commit, + timestamp: new Date().toISOString(), + config: { + embeddingProvider: cfg.embedding.provider, + embeddingModel: cfg.embedding.model, + topK: cfg.retrieval.topK, + minScore: cfg.retrieval.minScore, + hybridEnabled: cfg.retrieval.hybridSearch?.enabled ?? false, + keywordWeight: cfg.retrieval.hybridSearch?.keywordWeight ?? 0.4, + }, + indexChunkCount: indexedCount, + queries: queryResults, + }; + + const dir = path.dirname(output); + try { + const { mkdirSync } = await import("node:fs"); + mkdirSync(dir, { recursive: true }); + } catch { + // dir already exists + } + + writeFileSync(output, JSON.stringify(outputPayload, null, 2), "utf-8"); + console.log(`\n Results written to: ${output}\n`); +} + +main().catch((err) => { + console.error("Benchmark failed:", err); + process.exit(1); +}); From e922a0b78447d3935a45a3f158edbe6000c590c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Mon, 6 Jul 2026 09:51:41 +0200 Subject: [PATCH 11/15] feat: implement Windows wrapper patching for CLI execution --- src/core/setup-runtime.ts | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/src/core/setup-runtime.ts b/src/core/setup-runtime.ts index 57bafb0..724c0e1 100644 --- a/src/core/setup-runtime.ts +++ b/src/core/setup-runtime.ts @@ -51,6 +51,69 @@ export function readVersionFile(versionFile: string): string | null { } } +/** Bin name npm generates for this package (without .cmd/.ps1). */ +function getBinName(): string { + const pkgJson = path.join(getNpmGlobalRoot(), PLUGIN_NAME, "package.json"); + try { + const pkg = JSON.parse(readFileSync(pkgJson, "utf-8")) as { bin?: Record | string }; + if (pkg.bin && typeof pkg.bin === "object") { + return Object.keys(pkg.bin)[0] ?? PLUGIN_NAME; + } + if (typeof pkg.bin === "string") { + return PLUGIN_NAME; + } + } catch { + // fall through + } + return PLUGIN_NAME; +} + +/** + * npm-generated .cmd / .ps1 wrappers on Windows invoke `.js` files directly + * via file association. If the `.js` association points to a text editor + * (e.g. Notepad++) instead of Node.js, the CLI opens the editor instead of + * running. This function patches the wrappers to call `node` explicitly. + * + * Runs only on Windows. Safe to call on every setup — detects already-patched + * wrappers by checking for the `node` prefix. + */ +export function patchWindowsWrappers(npmGlobalRoot: string): void { + if (process.platform !== "win32") return; + + const binDir = path.resolve(npmGlobalRoot, ".."); + const binName = getBinName(); + + // ── .cmd wrapper ────────────────────────────────────────────── + const cmdFile = path.join(binDir, `${binName}.cmd`); + if (existsSync(cmdFile)) { + const content = readFileSync(cmdFile, "utf-8"); + // npm generates: "%dp0%\node_modules\opencode-rag-plugin\dist\cli\index.js" %* + // We want: node "%dp0%\node_modules\opencode-rag-plugin\dist\cli\index.js" %* + const cmdJsLine = /^(?!node\s)("[^"]+\.js"\s+%\*)$/m; + if (cmdJsLine.test(content)) { + const patched = content.replace(cmdJsLine, "node $1"); + writeFileSync(cmdFile, patched, "utf-8"); + } + } + + // ── PowerShell wrapper ──────────────────────────────────────── + const ps1File = path.join(binDir, `${binName}.ps1`); + if (existsSync(ps1File)) { + let content = readFileSync(ps1File, "utf-8"); + // Skip if already patched + if (content.includes('node "$basedir')) return; + // npm generates: + // $input | & "$basedir/node_modules/.../index.js" $args + // & "$basedir/node_modules/.../index.js" $args + // Replace to: & node "$basedir/.../index.js" $args + const ps1DirectLine = /(&\s+)("\$basedir\/[^"]+\.js"\s+\$args)/g; + if (ps1DirectLine.test(content)) { + content = content.replace(ps1DirectLine, "$1node $2"); + writeFileSync(ps1File, content, "utf-8"); + } + } +} + export async function setupRuntime(options?: { force?: boolean; silent?: boolean; @@ -130,6 +193,8 @@ export async function setupRuntime(options?: { writeFileSync(versionFile, pluginVersion, "utf-8"); + patchWindowsWrappers(npmGlobalRoot); + const cliEntry = path.join(runtimePluginDir, "dist", "cli.js"); const pluginEntry = path.join(runtimePluginDir, "dist", "plugin-entry.js"); const sdkPkg = path.join(runtimeSdkPluginDir, "package.json"); From 2fd954de37020b5b85c7d733901200f9e9aeb47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Mon, 6 Jul 2026 11:03:28 +0200 Subject: [PATCH 12/15] feat(eval): add ranking comparison, description dumping, and fast indexing scripts - Implemented `compare-rankings.ts` for comparing ranking orders between benchmark runs, focusing on rank agreement. - Created `dump-descriptions.ts` to export chunk descriptions from a LanceDB index for fair comparisons across branches. - Developed `fast-index.ts` to index files unchanged between branches using pre-dumped descriptions, enhancing efficiency. - Added `update-descriptions.ts` to update chunk descriptions in a LanceDB index from a JSON dump, allowing for easy replacement of descriptions. --- doc/chunk-descriptions.json | 1212 ++++++++++++ doc/eval-branch-compare-report.md | 703 +++++++ doc/eval-ranking-report.md | 87 + doc/eval-results-main.json | 2766 ++++++++++++++++++++++++++++ doc/eval-results-t1-cosine-l2.json | 2706 ++++++++++++--------------- src/eval/compare-rankings.ts | 310 ++++ src/eval/dump-descriptions.ts | 69 + src/eval/fast-index.ts | 318 ++++ src/eval/update-descriptions.ts | 99 + 9 files changed, 6724 insertions(+), 1546 deletions(-) create mode 100644 doc/chunk-descriptions.json create mode 100644 doc/eval-branch-compare-report.md create mode 100644 doc/eval-ranking-report.md create mode 100644 doc/eval-results-main.json create mode 100644 src/eval/compare-rankings.ts create mode 100644 src/eval/dump-descriptions.ts create mode 100644 src/eval/fast-index.ts create mode 100644 src/eval/update-descriptions.ts diff --git a/doc/chunk-descriptions.json b/doc/chunk-descriptions.json new file mode 100644 index 0000000..70b58e3 --- /dev/null +++ b/doc/chunk-descriptions.json @@ -0,0 +1,1212 @@ +{ + "C:/Daten/Entwicklung/OpenCodeRAG/doc/assets/eval.png:1:1": "[image] [png] [doc/assets/eval.png] OpenRAG, evaluation, session, last activity, messages, input tokens, output tokens, cost, rag calls, rag tokens, model, detail section, total tokens, input tokens, messages, steps, tool call, model used, event timeline, time elapsed, task list, search, invalid, rag injections, cost, response time", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/assets/webui.png:1:1": "[image] [png] [doc/assets/webui.png] OpenCodyRAG, code, syntax, tabs, comparison, files, chunk, listing, programming, JavaScript, code editor, tree structure, indentation, text, example, software, development, web, technical, documentation, search, search results, syntax highlight, code blocks, text analysis, program, algorithm, logic, framework, tool, interface, data, analysis, review, reference, source, language, function, variable, statement, error, warning, note, idea, concept, process, outcome, result", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/chunking.md:1:100": "chunking, tree-sitter, regex, markdown, latex, language-support, pdf, docx, doc, excel, fallback, image-description, vision-based, svg, xml, embeddings, chunk, ast, code-fence, line-range, wasm, syntax-highlighting, file-extension, abstract-base-class, node-types", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/chunking.md:101:194": "lines 101-194, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/architecture.md:1:100": "lines 1-100, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/architecture.md:101:200": "lines 101-200, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/embedding.md:1:100": "provider, ollama, openai, cohere, configuration, json, batching, input_type, model_recommendations, code_search_net, benchmarks, mrr, r_at_1, cost, text_prefixing, prefixes, document_prefix, query_prefix", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/embedding.md:101:177": "proxy-support,environment-variables,config-file-proxy,username-authentication,noProxy-list,directRequest,embedding-dimension-probing,parallel-processing,embedBatchSize,embedConcurrency,reuse-connection-pool,HTTP-requests,EmbeddingProvider,factory-ts,union-type,RagConfig,description-provider,imageDescription-provider", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-token-plan.md:1:43": "Objective, Methodology, Retrieval Quality Check, Projection, Token Savings, Benchmark Queries, Embedder, LanceDB Store, Session Logger, Measurement, Report, Markdown, Codebase, Real Coding Queries", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-token-report.md:1:65": "Date, Codebase, Indexed chunks, Embedding model, Tokenizer, Retrieval settings, Auto-inject settings, Queries tested, Queries with injection, Avg top relevance score, Total injected tokens, Avg context per query, System guidance overhead, Estimated reads saved, Estimated read tokens saved, Net token savings, Verdict, Per-Query Results", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/evaluation.md:1:100": "session-logging, token-tracking, RAG-injection-overhead, evaluation-cli, analyze-session, compare-sessions, web-ui-token-analysis, markdown-documentation, session-events, token-types, cost-breakdown, event-source-mapping, storage-jsonl, session-id, plugin-integration, opencode-rag, semantic-retrieval, benchmarking-software, interactive-slider, percentage-change, comparison-view, verdict-banner", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/evaluation.md:101:200": "token-analysis, token-counting, markdown-documentation, RAG-savings, query-complexity, code-tokenization, model-differences, heuristic-accuracy, chunk-token-counting, method-detection, benchmark-report, limitations-noted, future-improvements", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/evaluation.md:201:270": "tokenization, markdown, tracking, logging, benchmarking, retrieval, threshold, analysis, savings, report, queries, keyword,index, embeddings, model, injection, relevance, cost,benefits, verbosity, overhead, effectiveness, configuration, qualitative, quantitative, optimization", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/plugin.md:1:100": "lines 1-100, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/plugin.md:101:200": "lines 101-200, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/plugin.md:201:300": "lines 201-300, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/plugin.md:301:317": "file, markdown, config-files, plugin, debugging, bash, API-key, auto-resolution, OpenAI, OpenCode, providers, configuration, JSON, comments, extraction, keyword-search, dotenv", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/retrieval.md:1:100": "file,CSharp,embedding,pipeline,vectorSearch,indexing,metadata,fusion,scoreNormalization,optimization,deduplication,caching,kwIndex,hybridSearch,jaccardSimilarity,fileDiversity,queryPrefix,retrievalAPI,tokenizer,TfIdf,ann,LanceDB,descriptionField,codeContent,mergeChunks,searchResults,minScore,topK", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/retrieval.md:101:159": "image-description-chunks, caching, code-autocomplete-integration, context-window-optimization, adjacent-merge, similarity-dedup, file-diversity-cap, optimized-result-metadata, configuration-knobs, disabling-context-opt, future-improvements", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/webui.md:1:100": "Web UI, markdown, Tailwind CSS, highlight.js, browser-based dashboard, Node.js server, KPI cards, Language Distribution bar chart, Chunks view, master-detail split pane, Files view, Compare view, Evaluate view, token usage, costs, RAG performance", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/webui.md:101:188": "lines 101-188, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode.json:2:2": "JSON, file, path, C:\\Daten\\Entwicklung\\OpenCodeRAG\\opencode.json, lines, 2-2, keywords, \"$schema\", \"https://opencode.ai/config.json\"", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode.json:3:20": "json,lsp,typescript,command,npx,initialization,tsserver,path,html,language-server,extension,css,language-server,command,args,stdio,package,vscode-langservers-extracted", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.yaml:1:1": "file,Created,OpenCodeRAG,yaml,language,YAML,repository,name", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.yaml:2:2": "repo, github, OpenCodeRAG, url, yaml, file, C:\\Daten\\Entwicklung\\OpenCodeRAG", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.yaml:3:3": "tagline, local-first, RAG, plugin, semantic, code, search, tree-sitter, chunking, LanceDB", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.yaml:4:11": "description,content-block,local-first,Retrieval-Augmented,Generation,plugin,Astro-aware,chunking,tree-sitter,languages,indexing,file-change,detection,watch-mode,re-indexing,configurable,embeddings,Ollama,OpenAI,CLI,index,query,status,clear,OpenCode,plugin,chunk,retrieval,automatic,suggestions,local-processing,data-leaves,machine", + "C:/Daten/Entwicklung/OpenCodeRAG/postcss.config.js:1:8": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\postcss.config.js,Languages:text,Lines:1-8,Type:@type{import('postcss-load-config').Config},Plugins:{tailwindcss:{},autoprefixer:{}.Keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/build-ui-css.js:81:101": "File,CODE,CSS,JavaScript,Promises,FilesystemAccess,HTTPDownloads,ErrorHandling,PathResolution,URLManipulation,StreamsAPI", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release-patch.js:8:12": "Function, logs-command, conditional-execution, inherit-streams, console-log, dry-run-skip, JavaScript, file-system-operation, script-function, execute-asynchronously, node-js-syntax", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release-patch.js:14:16": "File-release-patchjs,Lines-14-16,JavaScript,function,getLatestTag,git-describe--tags--abbrev0,execSync,string-trim", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release-patch.js:18:28": "gitSync, function-definition, file-path, try-catch, execSync, string-operations, date-formatting, array-map, join-string, condition-check, newline-conversion", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release_minor.ps1:7:15": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\scripts,Release_Minor.ps1,Powershell,L7-L15,Function,Run,$cmd,Write-Host,Invoke-Expression,-not,$dryRun,if-block,throw,Command,failure,succeeded,dry-run,skipped", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release_minor.sh:10:17": "define, function, execute, print, conditional, check, parameter, execute, dry-run, command", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release_minor.sh:19:22": "error_handler, define_function, output_error, standard_output, error_code, capture_message, print_to_stderr, script, minor_release, bash_script, line_19-22", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/roadmap.md:1:100": "Roadmap,markdown,file,CSS,JavaScript,Razor,LaTeX,PDF,DOCX,DOCS,XLSX,embedding,storage,retrieval,OpenCode,plugin,CLI,distribution,configuration,test,LLM,re-ranking,code-graph,context-window,query-rewriting,persistent-session,multimodal,access-control,web-ui", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/roadmap.md:101:102": "Web, UI, roadmap, markdown, functionality, inspection, search, browsing, indexed, development, features, enhancement", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release_patch.sh:10:17": "bash, function, execute, logging, conditional, dry-run, parameters, script, invocation", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release_patch.sh:19:22": "bash, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\scripts\\release_patch.sh, keyword, die, function, error, echo, stdout, stderr, exit, code, script, usage", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/dedup-chunks.ts:23:31": "interface, ChunkInfo, defines, properties, id, filePath, startLine, endLine, content, description, language, TypeScript, file, path, line, definition", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/dedup-chunks.ts:42:47": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\scripts\\dedup-chunks.ts, Language:typescript, Line-start:42, Line-end:47, Function-name:dedupKey, Input-type:ChunkInfo, Return-type:string, Check-language-property-if-condition,c-language-is-image-return-string-combination-filename,line-and-linebounds,content-as-part-of-result", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/dedup-chunks.ts:54:153": "dedup-chunks,typescript,database,LanceDbStore,count,getChunks,map,rebuild,reduce,deleteByFilePath,duplicate,chunk,key,language,metadata,startLine,endLine,filePath,dry-run,console-log,await,dedupKey,reduceDuplicates,totalDuplicates,cleaned,filesToRebuild,groups,filesToRebuild,size,forEach,filePath,deleteByFilePath,duplicates,remove,deduplicate,summary,timestamp,chunks,existing,timestamps,winner,isEmpty,exists,duplicateChunks,chunkInfo,languageLength,find,consoleLog,writeFileSync,trim,reduceDuplicates,extractDuplicates,logDuplicate,filesToRebuild,totalDuplicates,forEachCleanup,updateMetadata,deleteChunks,checkDuplicates", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/dedup-chunks.ts:154:183": "typescript, file, path, endLine, language, chunks, store, addChunks, cleaned, winners, filePath, count, totalAfter, dbPath, loadManifest, saveManifest, filesToRebuild, manifestResult, status, ok, chunkCount, close, console.log", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/dedup-chunks.ts:185:188": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\scripts\\dedup-chunks.ts, Language:typescript, Line-start:185, Line-end:188, Keyword:(err) => {console.error(\"Error:\", err); process.exit(1);}", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release-patch.ps1:7:15": "Function, Run, PowerShell, cmd, Write-Host, dryRun, Invoke-Expression, LASTEXITCODE, throw, dry-run, skipped", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/bash.ts:1:21": "File,Created,Language,text,Lines,1-21,Import,Class,extends,Node,Set,Export,Singleton,Instance,Constructor", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/c.ts:1:27": "import, TreeSitterChunker, class, CChunker, extends, language, fileExtensions, grammarName, nodeTypes, Set, function_definition, struct_specifier, enum_specifier, union_specifier, type_definition, preproc_def, singleton, instance, export, constructor", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/csharp.ts:1:26": "import, fileoverview, TreeSitterChunker, class, CSharpChunker, language, fileExtensions, grammarName, nodeTypes, method_declaration, interface_declaration, struct_declaration, record_declaration, enum_declaration, singleton, default, instance", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/css.ts:1:25": "file,CSS,chunker,TreeSitter,Treesitter,chunker,class,import,language,nodeTypes,set,fileExtensions,instance,css,grammarName,at_rule,keyframes_statement,media_statement,rule_set,Singleton,static,export,extends,keywordDSL", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/cpp.ts:1:25": "fileoverview,CppChunker,TreeSitterChunker,fileExtensions,language,nodeTypes,grammarName,struct_specifier,enum_specifier,union_specifier,CppChunker,class,C++,cpp,Set,instance,singleton", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/doc.ts:18:23": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\chunker\\doc.ts,Language,typescript,Lines,18-23,async,function,extractDocText,promise,string,await,import,default,new,WordExtractor,extract,getBody,Buffer,extractor", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/doc.ts:40:109": "async, chunk, filePath, content, Promise, Chunk[], split, paragraphs, filter, trim, PARAGRAPH_SPLIT, uuid, MAX_CHUNK_CHARS, MIN_GROUP_CHARS, paragraphIndex, currentGroup, currentSize, flush, paragraphs, push, language, doc, length, continue, if, else, elseif", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/dockerfile.ts:1:40": "class,DockerfileChunker,extends,TreeSitterChunker,language,fileExtensions,nodeTypes,set,grammarName,import,dockerfile,containerfile,from_instruction,run_instruction,cmd_instruction,entrypoint_instruction,env_instruction,arg_instruction,workdir_instruction,copy_instruction,add_instruction,expose_instruction,volume_instruction,user_instruction,label_instruction,healthcheck_instruction,shell_instruction,stopsignal_instruction,onbuild_instruction,maintainer_instruction,cross_build_instruction,dockerfile,containerfile,Singleton,DockerfileChunker,new,DockerfileChunker,language,fileExtensions,nodeTypes,grammarName,import,from", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/excel.ts:16:32": "async, function, extractExcelText, Buffer, @e965/xlsx, import, workbook, XLSX.read, buffer, type, \"buffer\", const, lines, array, string, push, sheetName, workbook.SheetNames, for-of, if, !sheet, continue, csv, XLSX.utils.sheet_to_csv, sheet, { blankrows: false }, join, \"\\n\\n\"", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/excel.ts:49:108": "async, chunk, filePath, content, sections, split, lineCounter, sectionLines, MAX_CHUNK_CHARS, uuid, rows, batchSize, batchStart, rowLine, batches, chunks, metadata, excel, language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/docx.ts:18:22": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\chunker\\docx.ts,Language,typeScript,Lines,18-22,async,function,extractDocxText,promise,string,import,mammoth,extractRawText,buffer,value", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/docx.ts:39:108": "async, chunk, filePath, content, paragraphs, PARAGRAPH_SPLIT, filter, trim, string, Promise, Chunk[], uuid, MAX_CHUNK_CHARS, MIN_GROUP_CHARS, flush, paragraphIndex, currentGroup, currentSize, para, nextParaStillSmall, paragraphs, JOIN, split, length, continue, push, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/go.ts:1:22": "fileoverview, tree-sitter, chunker, Go, source-files, language, text, fileExtensions, set, function_declaration, method_declaration, GoChunker, singleton, default, instance", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/fallback.ts:15:17": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\chunker\\fallback.ts,Lines:15-17,Language:typescript,Constructor,param,maxLines=DEFAULT_MAX_LINES,DefaultParameterValue=10", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/fallback.ts:19:43": "async, chunk, filePath, string, content, Promise, Chunk[], split, lines, maxLines, Math, min, uuid, metadata, filePath, startLine, endLine, language, push, length, continue", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:12:23": "resolveMsWasmDir, function, PROJECT_ROOT, existsSync, resolve, localDir, node_modules, @vscode, tree-sitter-wasm, wasm, createRequire, import_meta_url, dirname, pkgJson, catch, try, throw, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:48:54": "typescript,function,resolveWasmPath,language,string,MS_LANGUAGES,has,replace,g,replace,MStreesitter,wasmDir,selfWasmDir,SELF", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:65:73": "async, function, initParser, Promise, void, if, initialized, return, initPromise, then, initialized, true, null, Parser, init, then, return, Promise, null", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:87:97": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\chunker\\grammar.ts,Languages,typescript,async,await,Promise,loadLanguage,function,cache,grammarCache,get,set,initParser,resolveWasmPath,readFileSync,language,load,WASM,buffer,await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:110:123": "async,set,language,load,cacheKey,grammarCache,get,set,resolve,readFileSync,await,Language,load,wasmPath,buffer,initParser", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:131:149": "interface,AstNode,text,startLine,endLine,startIndex,endIndex,type,leadingDoc,docComment,docString,preceedingComments,treeSitter,grammar,typescript,lineOffset,characterOffset,sourceText", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:159:194": "typescript,function,cleanCommentText,map,replace,startsWith,replace,truncation,prefix,test,comment,text,line,filter,join,regex,splits,string,glyphs,trims,removes,comments,protection,trimLeft,splitLines,removePrefixes,regexMatches", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:196:221": "typescript,function,extractLeadingComments,Node,source,COMMENT_NODE_TYPES,cleanCommentText,sibling,startIndex,endIndex,expression_statement,namedChildren,type,string,return,concat,join,comma-separated", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:223:238": "typescript,function_definition,class_definition,block,expression_statement,string,cleanCommentText,startIndex,endIndex,extractDocstringFromBody,node,type,find,children,undefined,boolean,startIndex,endIndex,slice,removeComments,source,getNodeStartEndIndices,normalizeDocstrings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/grammar.ts:258:295": "function,walkTree,node,nodeTypes,source,maxDepth,depth,AstNode,results,leadingComments,extractLeadingComments,bodyDocstring,extractDocstringFromBody,join,results,push,text,startLine,endLine,startIndex,endIndex,type,leadingDoc,length,undefined,children,walkTree", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/html.ts:1:22": "fileoverview, TreeSitterChunker, HTML, chunker, script_element, style_element, fileExtensions, language, grammarName, nodeTypes, Singleton, import, export, class, extends, set, static, constructor, HTML", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/javascript.ts:1:24": "fileoverview, TreeSitterChunker, JavaScriptChunker, language, fileExtensions, grammarName, nodeTypes, function_declaration, method_definition, arrow_function, singleton, default, JavaScript, chunker", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/java.ts:1:23": "fileoverview, TreeSitterChunker, import, class, JavaChunker, extends, language, fileExtensions, grammarName, nodeTypes, set, method_declaration, interface_declaration, enum_declaration, singleton, export, default, constructor", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/ini.ts:1:21": "file, overview, INI, chunker, TreeSitter, configuration, language, fileExtensions, sectionHeaders, class, extends, tree-sitter, Singleton, instantiation, grammarName, nodeTypes, ini, text, js", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/json.ts:1:21": "file,json,chunker,tree-sitter,json,language,set,node_types,file_extensions,grammar_name,class,extends,instance,singleton,keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/kotlin.ts:1:24": "fileoverview, tree-sitter, chunker, Kotlin, source-files, language, syntax-analysis, function-declaration, object-declaration, property-declaration, singleton, class-definition, grammar-name, node-types, import, set, fileExtensions, export, kotlin", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/loader.ts:19:43": "async,function,loadSingleChunker,moduleUrl,pathToFileURL,resolved,pathResolve,import,registerChunker,chunk,extensions,consoleWarn,Error,getOwnPropertySymbols,modules,try,catch,await,typescript,typescript,configDir,entry,filePath,moduleUrl,configDir,entry", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/loader.ts:56:70": "async, function, loadChunkersFromConfig, RagConfig, string, imageDescription, enabled, ImageChunker, SUPPORTED_IMAGE_EXTENSIONS, registerChunker, Promise, void, chunkers, configDir, entry, loadSingleChunker, extends, length, of, await, return, if", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/markdown.ts:1:19": "file, overview, TreeSitterChunker, import, MarkdownChunker, class, extends, language, fileExtensions, grammarName, nodeTypes, set, section, export, default, singleton, instance, MarkdownChunker, Markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/powershell.ts:1:21": "fileoverview, tree-sitter, PowerShell, chunker, language, text, fileExtensions, syntax, nodeTypes, function_statement, Singleton, class, extends, import, export", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/php.ts:1:22": "fileoverview, TreeSitterChunker, PHP, chunker, language, fileExtensions, grammarName, nodeTypes, function_definition, method_declaration, Set, singleton, import, export, class, default, instance, PHP, source, extensions, declarations, parser, syntax, tree, extension", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/python.ts:1:22": "fileoverview, tree-sitter, chunker, Python, source-files, .py, language, set, function_definition, decorated_definition, singleton, class, extends, import, grammarName, nodeTypes, fileExtensions, language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/razor.ts:13:19": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\chunker\\razor.ts,Language,typeScript,Lines,13-19,Function,countNewlines,content,string,end,number,Loop,i,content[i],Type,String,Equality,Return,Count", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/razor.ts:28:50": "lines 28-50, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/razor.ts:67:122": "typescript,async,function,if,return,content,metadata,start,end,uuid,map,slice,truncating,lines,findBlocks,for,regions,assign,trim,countNewlines,codeBlocks", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/rust.ts:1:27": "fileoverview, tree-sitter, Rust, chunker, functions, structs, enums, traits, impls, types, language, fileExtensions, grammarName, nodeTypes, set, singleton, export, class, RustChunker, basejs, RustChunker, instance, new, rust", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/sln.ts:27:69": "typescript,function,chunk,async,await,content,split,trims,lines,test,project,line,endProjectLine,globalline,makeChunk,filePath,return,Promise,Array,isEmpty,trimLength,linesLoop,chunkStart,chunkEnd,section,boolean,assign,if,else", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/sln.ts:71:88": "private, makeChunk, lines, slice, join, string, content, id, uuid, metadata, filePath, startLine, endLine, language, sln", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/sql.ts:1:21": "fileoverview, TreeSitterChunker, SQL, chunker, fileExtensions, language, grammarName, nodeTypes, statement, Set, static, default, singleton, export", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/ssl.ts:44:134": "typescript,class,chunker,procedure,endType,startLine,uuid,BLOCK_START,BLOCK_END,line,flushTopLevel,followed,findProcedureStartLine,trim,slice,split,join,topLevelStart,keyword,endsWith,toUpperCase,match,indexOf,replace,remove,statements,keywords,metadata,language,PROCEDURE,class,lines", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/ssl.ts:145:165": "findProcedureStartLine, lines, fromIndex, filePath, depth, trim, match, BLOCK_START, BLOCK_END, keyword, PROCEDURE, i, line, uppercase, backwardTraversal", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release-minor.js:24:28": "Function, log, execute, command, console-log, dry-run, inherits, standard-output, bypass", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release-minor.js:35:37": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\scripts\\release-minor.js, Language:javascript, Lines:35-37, Function:getLatestTag, Returns:strFromGitDescribe, Arguments:[git describe, --tags, --abbrev=0]", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/release-minor.js:45:55": "function,getChangelog,prevTag,execSync,git_log,--oneline,prevTag..HEAD,str,toString,trim,slice,date,new Date,isToISOString,split,join,line,bullets,return,String,List", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/swift.ts:1:24": "import, fileoverview, TreeSitterChunker, SwiftChunker, language, fileExtensions, grammarName, nodeTypes, function_declaration, enum_declaration, protocol_declaration, variable_declaration, singleton, instance, SwiftChunker", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/tex.ts:24:118": "uuid, SECTION_REGEX, inCommentBlock, currentName, currentCommand, line, match, uuid, sections, push, i, lines, startLine, endLine, metadata, filePath, content, language, lastIndex, slice, continue, indexOf, join, length, split, trim, exec, match, regex", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/toml.ts:1:23": "file,TOML,chunker,tree-sitter,language,toml,config,fileExtensions,grammarName,nodeTypes,set,keyword,static,instance,export,class,extends,snippet,comment", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/typescript.ts:1:26": "fileoverview, TreeSitterChunker, TypeScriptChunker, language, fileExtensions, grammarName, nodeTypes, function_declaration, method_definition, arrow_function, interface_declaration, type_alias_declaration, singleton, TypeScriptTSX, chunking, syntaxhighlighting, tree-sitter, TypeScriptLang, TSSyntax", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/yaml.ts:1:22": "fileoverview, tree-sitter, YAML, chunker, basejs, language, fileExtensions, grammarName, nodeTypes, set, singleton, YAML, .yaml, .yml, block_mapping_pair, block_sequence_item", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/clear.ts:20:36": "async, confirmPrompt, function, readline, createInterface, process.stdin, process.stdout, Promise, question, trim, lowerCase, return, true, false, undefined, finally, close", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/clear.ts:45:90": "File,ClearCommand,CliOptions,processCwd,pathResolve,resolveCliContext,await,confirmPrompt,fsUnlink,manifestPathFor,cleanupContext,logCliInfo,logCliError,processExit,Error,Catch", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/describe-image.ts:23:83": "File,Cli,Command,Typescript,Image,Describe,Description,Vision,Model,Config,Path,Ext,MimeType,Log,Error,Context,Resolving,Cleanup", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/dump.ts:21:65": "registerDumpCommand, program, description, dump, all, indexed, chunks, options, configPath, offset, limit, asyncAction, tryCatch, cwd, process, resolveCliContext, logFilePath, store, count, parseInt, chunks, getChunks, pathResolve, total, logInfo, file, lineRange, language, langLabel, contextCleanup, Error, message, exitCode1", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/eval.ts:22:61": "typescript,function,registerEvalSessionsCommand,program,command,description,options,async,await,resolveCliContext,path.resolve,cwd,.opencode,opencode-rag.log,assign,listSessions,import,eval/storage.js,console,log,warn,error,process,exit,strings,padStart,padEnd,keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/eval.ts:71:134": "registerEvalAnalyzeCommand, program, command, analyzeTokenUsage, import, path, resolveCliContext, cwd, .opencode, logFilePath, storePath, console, warn, heading, value, num, success, cliOptions, tokens, inputTokens, outputTokens, reasoningTokens, cacheRead, cost, ragContextTokens, systemGuidanceTokens, readToolCalls, ragToolCalls, estimates, tokensWithRAG, tokensWithoutRAG, netSavings, percentSavings, breakdowns, inputTokens, ragContextTokens, readToolCalls, ragToolCalls, score, exit", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/eval.ts:144:174": "typescript, function, registerEvalCompareCommand, program, command, description, sessionA, sessionB, config, path, resolveCliContext, import, analyzeTokenUsage, compareTokenAnalyses, formatTokenReport, cwd, logFilePath, opencode, opencode-rag-log, storePath, tokenAnalysisJs, queryCount, consoleLog, warn, error, exit", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init.ts:42:141": "lines 42-141, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init.ts:142:241": "lines 142-241, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init.ts:242:267": "typescript,if statement,console.log,error,message,success,dim,exists,heading,installPromise,try,capture,process.exitCode,restart,destroyAllPooledConnections,catch,finally,init,failure,workspace,index,installation,skip-install,OpenCode,junction,config,network,cache,log,command,line,provider,errors,run,code", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/mcp.ts:21:40": "registerMcpCommand, program, command, description, option, async, action, runMcpServer, await, configPath, cwd, try, catch, Error, message, logFilePath, require, node:path, resolve, opencode-rag.log, process.exit, 1", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/show.ts:22:59": "registerShowCommand, program, command, show, file, description, chunks, resolveCliContext, store, getChunksByFilePath, path, cwd, logFilePath, ctx, await, cleanupContext, logCliInfo, c, warn, num, label, value, lang, dim, desc, process_exit, Error, message", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/uuid.ts:5:11": "uuid, TypeScript, function, string, replace, /[xy]/g, g, Math.random, toString, 16, x, y, 4xxx, xxxxx, replace, 8, 0x3, 0x8", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/ui.ts:22:82": "function, registerUiCommand, program, description, command, start, web, ui, browse, vector, database, options, CliOptions, resolveCliContext, path, resolve, import, server, await, parseInt, logFilePath, c, heading, label, value, dim, process, platform, win32, child_process, spawn, console, error, exit, SIGINT, SIGTERM", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:28:28": "Function, returns, TypeScript, bold, cyan, string", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:30:30": "Function, takes-string, returns-formatted-string, dim, PC-module", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:32:32": "Function, returns,dim,typescript,formatted,output,s,argument", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:34:34": "Function, TypeScript, Returns, String, GreenStyleFormatter, InlineExpression, Line34", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:36:36": "Function, TypeScript, returns, colored, green, string, or, number, if, type, s", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:38:38": "Function, TypeScript, Returns, String, Formatting, Colorize, s, pc, yellow", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:40:40": "Function, TypeScript, Returns, String, Return, CyanForegroundColor, UnaryOperator, Parentheses", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:42:42": "Function, returns, string, colorize, magenta, TypeScript, line, 42", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:44:44": "Function, TypeScript, String, Formatting, Dim, pc, Custom, Code, Returns, Arrow, Parentheses", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:46:46": "Function, TypeScript, Returns, String, GreenFormatter, SyntaxHighlighting, Line46", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:48:48": "Function, Returns, String, TypeScript, Styled, Yellow, Callback, Formatting", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:50:50": "Function, TypeScript, String, Return, Conditional, Formatting, Color, Red, Parentheses", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:52:52": "Function, TakesString, ReturnsFunc, GreenText, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:54:54": "Function, returns, string, conditional, appliesColor, pc.yellow", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:56:56": "Function, takesString, returnsFunc, greenStyleDecorator, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:58:58": "Function, accepts-string, returns-function, pc-yellow, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:60:60": "Function, takesString, returnsDimmed, TypeScript, line60, arrowFunction, stringType, loggingFormat, dimMethod", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:73:81": "logCliError, filePath, scope, message, error, console, error, debugLog, appendDebugLog, TypeScript, function, line73-81", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:90:97": "typescript,function,logCliInfo,logFilePath,message,_scope,console.log,appendDebugLog,missing,90-97", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:110:122": "async, function, resolveCliContext, CliOptions, logFilePath, Partial, BootstrapOptions, Promise, RagContext, resolveRagContext, configPath, logCliInfo, c_label, c_file, logConfigDetails", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:130:134": "logConfigDetails, logCliInfo, RagConfig, embeddingProvider, embeddingModel, vectorStorePath, c.label, c.value, file", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:141:144": "File:C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\cli\\format.ts,Language:typescript,Lines:141-144,Function:async,cleanupContext,accepts,RagContext,param,await,ctx.store.close,promise,void,await,ctx.store.close(),destroyAllPooledConnections", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:154:157": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\cli\\format.ts,Language,typeScript,Lines,154-157,function,formatTimestamp,number,string,undefined,return,Date,localeString", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:165:177": "typescript,functionality,indexing-stats,logging,files,new-files,modified-files,unchanged-files,deleted-files,removed-files,empty-skipped-small,description-failed,total-chunks,logCliInfo,c.color,label", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:185:191": "function, formatDuration, milliseconds, toFixed, string, seconds, minutes, modulus, division, multiplication, return, time", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/format.ts:199:215": "typescript, function, dedupeResults, SearchResult[], results, Set, seen, array, join, push, metadata, filePath, startLine, endLine, content, key, chunk, contains, add, filterDuplicates", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/types.ts:7:24": "interface,CliOptions,options,config,path,force,true,watch,bool,boolean,topK,string,offset,string,limit,string,explain,bool,yes,bool,query,command,pagination,dump,destructive,confirm,prompts,score,hybrid,results,show,breakdown,experimental", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/types.ts:27:34": "interface, InitOptions, overwrite, existing, files, force, boolean, skipInstallation, skipInstall, false, skipHealthCheck, boolean, true, undefined, false", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/types.ts:37:46": "interface,PkgMetadata,type,name,string,version,semver,devDependencies,peerDependencies,Record,dependencies,resolve,typescript,37-46", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli.ts:1:10": "file, overview, backwards-compatibility, shim, re-export, CLI, runner, compatibility, auto-launch, detect, commands, init-helpers, cleanup, helper, stale, global, plugin, registrations", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/docx.ts:15:23": "async, filePath, buffer, import, asyncImport, docxjs, extractDocxText, Promise, ExtractResult, try, catch, content, errorMessage, errors, fileNotFound, parseFailed", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/excel.ts:15:23": "async,function,extract,filePath,string,buffer,Promises,ExtractResult,await,import,module,file,message,return,error,Error,class,try,catch,await,extractExcelText,ok,content,async,function,async,function,comma", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/image.ts:19:25": "file-path,image-file,typescript,function,is-image-file,string,toLowerCase,loop,SUPPORTED_IMAGE_EXTENSIONS,endsWith,boolean", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/image.ts:27:29": "Function,is,boolean,functionality,determines,BMP,file,typeScript,endsWith,lowercase,filePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/image.ts:31:79": "decodeBmp, Buffer, BMP, signature, readUInt32LE, readInt32LE, writeUInt16LE, pixelOffset, pixelData, rowSize, topDown, absHeight, bufferRead, bufferWrite, forLoop, ifStatement, throwError", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/image.ts:85:120": "typescript,async,function,resizeImage,buffer,imageFile,isBmpFile,decodeBmp,sharp,pixels,width,height,channels,resize,metadata,toBuffer,jpeg,quality,maxDimension,inside,enlargement,catch,return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/image.ts:126:143": "async,function,extract,filePath,string,buffer,type,Buffer,imageVisionProvider,ImageVisionProvider,prompt,string,resizeImage,mimeType,content,visionProvider,describeImage,b64,mimeType,prompt,error,message,path,extname,getMimeType,toString,Promise,ExtractResult,try,catch", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/pdf.ts:15:23": "async, function, filePath, string, buffer, import, await, extractPdfText, promise, ExtractResult, try, catch, errors, message, Buffer, file, typescript, lines, 15-23", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/types.ts:6:10": "interface, ExtractResult, content, boolean, ok, error, undefined, keyword, TypeScript, file, development, source, code", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/bootstrap.ts:22:33": "interface, BootstrapOptions, cwd, configPath, requireDescriptionProvider, skipProbe, skipKeywordIndex, boolean, interface, typescript, line-22, line-33", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/bootstrap.ts:36:53": "interface,RagContext,config,EmbeddingProvider,vectorStore,storePath,IKeywordIndex,DescriptionProvider,dimension,logFilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/bootstrap.ts:56:66": "async, function, probeDimension, EmbeddingProvider, embed, Promise, try, catch, length, typeof, array, number, fallback, 384, dimension-probe, query", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/bootstrap.ts:69:76": "async, loadKeywordIndex, storePath, Promise, IKeywordIndex, KeywordIndex, load, catch, new, KeywordIndex, storePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/bootstrap.ts:79:129": "async, function, resolveRagContext, BootstrapOptions, opts, workDir, path.resolve, configPath, findConfigFile, DEFAULT_CONFIG, loadConfig, cfg, createEmbedder, probeDimension, createVectorStore, KeywordIndex, descriptionConfig, descriptionProvider, dimension, storePath, keywordIndex, logFilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/list.ts:21:54": "file,list-command,typescript,registerCommand,program,multiple-lines,description,options,command-line-arguments,CWD,path-resolution,indexed-files,chunks,count,retrieve-store,action,async-await,cleanup-context,error-handling,message-processing,log-file,console-log,colorize-info,colorize-error,process-cwd,clean-up-context,exit-program", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/helpers.ts:21:23": "File:C%3A\\Daten\\Entwicklung\\OpenCodeRAG\\src\\cli\\helpers.ts,Language:typescript,Lines:21-23,Function:getPackageRoot,Returns:string,Resolves:path,path.dirname,fileURLToPath,import.meta.url,../..", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/helpers.ts:31:43": "typescript,function,getPackageMetadata,getPackageRoot,path,join,readFileSync,JSON.parse,Error,new,error,message,packageJsonPath,utf-8,catch,throw,packageJsonPath,package,json,invalid,json,resolve,conflict,marker,git,merge,unresolved,manual", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/helpers.ts:54:62": "typescript,function,getStringRecord,unknown,type,is,Object.fromEntries,Object.entries,Array.isArray,typeof,string,filter,entries,object,property,isEmpty", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/helpers.ts:70:80": "readJsonFile, filePath, existsSync, JSON.parse, readFileSync, utf8, undefined, tryCatchErrorHandling, FileExistsCheck, throwsException, errorMassageContainFilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/helpers.ts:88:90": "typescript,function,writeJsonFile,filePath,value,Record,stringify,jsonStringify,writeFileSync,file,utf8,indentation,2,recordstring,null,n,e,\\,lisntríc", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/helpers.ts:98:100": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\cli\\helpers.ts, Language:typescript, Lines:98-100, Function:toPosixPath,input:string,output:string,type,string,split,join,/", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/doc-progress.ts:10:15": "interface, DocProgress, documented, file, paths, lastUpdated, timestamp, progress, update", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/doc-progress.ts:19:21": "File:C_\\Daten_Entwicklung_OpenCodeRAG_src_core_doc-progress_ts,Language:typescript,Lines:19-21,function,progressPath,return,join,storePath,PROGRESS_FILE", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/doc-progress.ts:24:33": "function, loadDocProgress, storePath, returns, DocProgress, progressPath, filePath, existsSync, readFileSync, \"utf-8\", raw, JSON.parse, error, throw, {}, [], 0, catch, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/doc-progress.ts:36:45": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core,doc-progress.ts,Lines,36-45,typeScript,function,saveDocProgress,storePath,progress,string,DocProgress,void,try,catch,existsSync,dirname,writeFileSync,JSON.stringify,null,2,utf-8,recursive,true,existsSync,dirname,mkdirSync", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/doc-progress.ts:48:55": "typescript,function,markFileDocumented,assign,includes,push,saveDocProgress,path,store,Date,now,filePath,file,documented,progress,lastUpdated,loadDocProgress,includes,removeDuplicates,forEach,sync,timestamp,update,metadata", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/doc-progress.ts:58:75": "typescript,function,markSubdirectoryDocumented,storePath,subdir,allFilePaths,normalize,replaced,progress,loadDocProgress,documented,filePath,contains,changed,saveDocProgress,lastUpdated,date,now,includes,splice,indexOf,replace,forEach", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/fileLogger.ts:10:10": "type, LogSeverity, defined, severity, constants, TypeScript, file, source, lines, 10-10", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/fileLogger.ts:26:35": "interface, DebugLogEntry, module, component, produces, entry, logMessage, text, optional, errorObject, serialize, log, severityLevel, defaults, info", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/fileLogger.ts:38:52": "typescript, function, formatError, checks, Error, stack, message, type, string, throws, JSON.stringify, String, catch, returns, error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/fileLogger.ts:55:79": "mkdirSync, typescript, appendFileSync, LEVEL_RANK, SEVERITY_RANK, new Date,toISOString, formatError, path.dirname, recursive, \"\\n\", \"\\n\\n\", entry.error, logFilePath, DEBUGLogEntry, ERROR, MessageType", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/ruby.ts:1:22": "fileoverview, tree-sitter, chunker, Ruby, language, fileExtensions, grammarName, nodeTypes, method, singleton_method, class, extends, export, default, instance", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/provider-defaults.ts:7:16": "interface, ProviderDefaults, defaultBaseUrl, apiKeyEnvVar, supportsEmbedding, supportsChat, environmentVariable, APIKey, endpointSupports", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/provider-defaults.ts:95:97": "getProviderDefault, function, TypeScript, file-path, C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core\\provider-defaults.ts, provider, returns, ProviderDefaults, undefined, object-property-access, map", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/provider-defaults.ts:100:105": "isOpenAiCompatible, checksProviderCompatibility, ternaryOperator, conditionalStatements, stringComparison, booleanReturn, multipleConditions, logicalOperators, functionPrototypeTS, isOpenAICompatibleFunction", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/rag-injection-flag.ts:10:10": "type, RagInjectionType, enum, TypeScript, file, C_, Daten, Entwicklung, OpenCodeRAG, src, core, injection-flag", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/rag-injection-flag.ts:15:17": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core,CSS,function,setPendingRagInjection,type,storePath,RagInjectionType,writeFileSync,join,FLAG_FILE,utf-8,typescript,literals", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/rag-injection-flag.ts:20:28": "readFileSync, existsSync, join, storePath, flagPath, FLAG_FILE, readFileSync, utf-8, RagInjectionType, undefined, try, catch", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/rag-injection-flag.ts:31:41": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core\\rag-injection-flag.ts,Lines,31-41,typescript,function,consumePendingRagInjection,storePath,RagInjectionType,undefined,existsSync,join,FLAG_FILE,readFileSync,unlinkSync", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/resolve-api-key.ts:12:23": "function,resolves,apiKey,imports,cfg,embeds,provider,descriptions,section,imageDescriptions,worktree,configuration,checks,exists,properties,executes,functions", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/resolve-api-key.ts:25:27": "isPlaceholder, checks, strings, equals, returns, simple, logic, function", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/resolve-api-key.ts:29:56": "resolveForSection, function, provider, apiKey, section, placeholder, defaults, getProviderDefault, apiKeyEnvVar, processEnv, envKey, readOpenCodeProviderKey, worktree, createEmbedder, missingKey, resolveAPIKey, TypeScript, file, src\\core, resolve-api-key-ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/resolve-api-key.ts:58:60": "stripJsoncComments,replacement,text,remove,comments,globally,regex,replace,API,key,resolve,typescript,function,58-60", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/resolve-api-key.ts:62:90": "path,typeScript,function,readFileSync,existsSync,json.parse,stripJsoncComments,providerId,worktree,homeDir,config,provider,options,apiKey,try,catch,unknown,record,pathjoin,concat,configurations,key,locations,process.env", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/runtime-overrides.ts:12:54": "interface, overrides, retrieval, topK, minScore, hybridSearch, enabled, keywordWeight, openCode, autoIndex, debounceMs, watcher, autoInject, minScore, maxChunks, contentType, embedding, provider, model, baseUrl, description, enabled, provider, model, baseUrl, tui, fileListKeybinding, chunksKeybinding", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/runtime-overrides.ts:57:65": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core\\runtime-overrides.ts,Lines,57-65,Typescript,function,loadRuntimeOverrides,storePath,string,join,overridePath,string,existsSync,overridePath,JSON.parse,readFileSync,utf-8,as,RuntimeOverrides,catch,{}", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/runtime-overrides.ts:68:93": "File,Csharp,Daten,Entwicklung,OpenCodeRAG,src\\core,runtime-overrides,ts,typescript,function,storePath,path,value,saveRuntimeOverride,join,loadRuntimeOverrides,storePath,overridePath,existsSync,mkdirSync,writeFileSync,json-stringify,null,recursive,ignore,catch,error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/runtime-overrides.ts:96:173": "lines 96-173, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/describer.ts:10:13": "interface, ChatMessage, role, system, user, assistant, content, defined, type, TypeScript, file, C_Daten_Entwicklung_OpenCodeRAG_src_describer_describer_ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/describer.ts:15:18": "interface, ChatResponse, message, thinking, choices, array, object, properties, typescript, definition, content", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/describer.ts:35:37": "constructor, receives-config, sets-field", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/describer.ts:40:47": "async,generateDescription,Chunk,message,messages,systemPrompt,buildUserMessage,config,maxContentChars,chatRequest,timeoutMs,await,Promise,string,role,content,system,Prompt,user,setTimeout,ms,chars,request,return,chunk,config,tokens,asyncAwait,typescript,lines40-47", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/describer.ts:50:81": "async,map,limit,Promise,all,buildUserMessage,generateDescription,set,log,debug,info,warn,error,message,total,completed,describe,chunks,description,result,logger,config,concurrency,stream,process,stderr,stdout,Promise,await,toString,assert,catch,try,finally,asyncErrorHandling", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/describer.ts:92:139": "typescript,private,async,function,chatRequest,promises,string,JSON,body,messages,url,isOllama,baseUrl,config,replace,timeoutMilliseconds,retryMax,retryBaseDelayMs,attempt,for,while,sleep,error,throw,RETRYABLE_STATUSES,extractResponseText,postJson,proxy,await,headers,Authorization,apiKey,APIKey,keys,proxies,descriptions,models,completions,timestamps,statuses,json,text,unknown,error,describer,OpenCodeRAG,development,files,scripts,typescript,repository,components,requests,requests,services,apis,configurations,connections,errorHandling", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/describer.ts:153:169": "extractResponseText, isOllama, ChatResponse, json.message.content, typeof, string, trim, choices, message, content, throwError, JSON.stringify, empty, response, Error, return, function, TypeScript, lines153-169", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/factory.ts:20:38": "createDescriptionProvider, DescriptionConfig, config, AnthropropicDescriptionProvider, GeminiDescriptionProvider, LlmDescriptionProvider, apiKey, error, throws", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/gemini.ts:10:13": "File:C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\describer\\gemini.ts, Language:typescript, LineStart:10, LineEnd:13, InterfaceName:GeminiContent, PropertiesIncludingOptionalRole:string, PartsProperty:ArrayContainingObjectsWithTextKey", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/gemini.ts:15:21": "GeminiResponse,interface,candidates,candidates,Array,candidates,contents,content,parts,part,text,undefined,properties,definition", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/gemini.ts:33:35": "class-constructor, typescript, file-path, gemini-ts, config-parameter, initialization, keyword-detection", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/gemini.ts:37:46": "typescript, async, generateDescription, chunk, GeminiContent, role, user, parts, text, buildUserMessage, config, maxContentChars, chatRequest, timeoutMs, Promise, string, await, lines37-46", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/gemini.ts:48:80": "typescript,async-await,map,set,Promise,all,pLimit,buildUserMessage,gatherChunks,generateDescription,log,error,logger,delayedExecution,chunks,description,concurrentTasks,totalCompleted,progressUpdate,debug,info,warning,generateBatchDescriptions", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/gemini.ts:82:139": "typescript,async-await,postJson,sleep,json,RETRYABLE_STATUSES,forEach,retryMax,retryBaseDelayMs,sleep,error,new,throw,if,for,await,indexOf,trim,replace,has,config,baseUrl,model,apiKey,systemPrompt,content,parts,attempt,url,contents,timeoutMs,JSON,config,undefined,Error,json,ok,status,parts,text,RETRYABLE_STATUSES,has", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/shared.ts:16:38": "buildUserMessage, Chunk, metadata, filePath, language, startLine, endLine, maxContentChars, content, truncate, stringJoin, concatenation, arrayPush, templateLiteral, ```markup", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/shared.ts:41:43": "File: shared.ts, Language: TypeScript, Lines: 41-43, Keyword: Function, Sleep, Returns, Promise, Number, Timeout, Resolve", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/cohere.ts:26:32": "constructor,baseUrl,replace,timeoutMs,model,apiKey,proxy,undefined,30000,milliseconds,proxyConfig,objectProperty,propertyAssignment,lines26-32", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/cohere.ts:34:63": "async, embed, texts, purpose, Promise, number[][], text, function, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\embedder\\cohere.ts, TypeScript, lines34-63, postJson, baseUrl, model, inputType, Authorization, apiKey, timeoutMs, proxy, response.ok, response.text, response.json, embeddings, json, unexpected, Error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/factory.ts:23:46": "function, createEmbedder, config, RagConfig, provider, baseUrl, model, apiKey, proxy, timeoutMs, undefined, effectiveTimeoutMs, OllamaProvider, CohereProvider, OpenAIProvider, isOpenAiCompatible, throw, Error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/factory.ts:62:101": "async, embedBatch, texts, batchSize, purpose, concurrency, batches, EmbeddingProvider, Promise, pLimit, sort, index, embeddings, slice, map, await, Promise.all, limit, push, of, [...], ..., async", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/ollama.ts:30:37": "constructor,baseUrl,replace,/,model,apiKey,undefined,type,number=30000,proxy,ProxyConfig,logLevel,string,setTimeoutMilliseconds,getOrDefaultValue,replaceAllBlankEndsWithSlash,setModel,checkTypes,validateArguments", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/ollama.ts:39:41": "File:C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\embedder\\ollama\\.ts, LineNumbers:39-41, Language:typescript, Function:getLogFilePath,private, Return,type,string,path.resolve,process.cwd,.opencode,log", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/ollama.ts:43:49": "debug,private,message,error,appendDebugLog,getLogFilePath,scope,message,error,logLevel,unknown,scope", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/ollama.ts:51:97": "async, embed, texts, string[], _purpose, undefined, \"query\", \"document\", Promise, number[][], headers, object, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\embedder\\ollama.ts, typescript, lines, 51-97, try, catch, postJson, `${this.baseUrl}/embed`, model, input, response.ok, response.text, response.json, json.embedding, Array.isArray, error.name, Error, timeoutMs, proxy, setTimeout, clearTimeout, AbortError", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/openai.ts:12:18": "typescript,function,inferProviderName,baseUrl,toLowerCase,includes,host,nvidia,integrate,api,nvidia,com,return,nvidia,openai,lines,12-18", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/openai.ts:39:46": "constructor,baseUrl,replace,timeoutMs,setProperty,model,apiKey,proxy,undefined,inferProviderName", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/openai.ts:53:58": "File:C\\Dados\\Desenvolvimento\\OpenCodeRAG\\src\\embedder\\openai.ts,Language:typescript,Lines:53-58,private,toInputType,purpose,string,provider,nvidia,if,return,document,query,equals,returns", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/openai.ts:60:89": "async, embed, texts, purpose, string[], Promise, number[][], body, model, this.model, input, texts, input_type, toInputType, this.toInputType, purpose, body.input_type, postJson, baseUrl, `${this.baseUrl}/embeddings`, response, ok, response.status, await, response.text, json.data, item.embedding, JSON.stringify, unexpected, throw, Error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/index.ts:1:39": "file, overview, public, API, barrel, exports, evaluation, framework, session, logging, token, counting, analysis, types, export, SessionEvent, SessionSummary, ComparisonResult, TokenUsage, RAG_TOOL_NAMES, isRagTool, storage, appendSessionEvent, readSessionEvents, listSessionIDs, listSessions, getSession, deleteSession, computeSummary, compareSessions, createSessionLogger, SessionLogger, tokenAnalysis, analyzeTokenUsage, compareTokenAnalyses, formatTokenReport, estimateContextTokens, projectTokenSavings, countTokens, countTokensBatch, sumTokens, estimateContextTokensFormatted, tokenizerMethod", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/session-logger.ts:7:10": "interface, EventLike, type, properties, record, string, TypeScript, file, development, OpenCodeRAG, src, eval, session-logger, lines, 7-10", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/session-logger.ts:12:24": "interface, MessageInfo, id, sessionID, role, modelID, providerID, tokens, cost, finish, time, error, name, created, completed, title, name, MessageType, ErrorType, TokenUsage", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/session-logger.ts:26:40": "interface, PartInfo, id, sessionID, messageID, type, tool, state_status, state_input, state_time_start, state_time_end, tokens, cost, reason", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/session-logger.ts:43:52": "interface, SessionLogger, onEvent, EventLike, onRagContext, sessionID, messageID, undefined, context, chunkCount, uniqueFiles, contextTokens, topScore, retrievalTimeMs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/session-logger.ts:58:157": "function, createSessionLogger, storePath, SessionLogger, onEvent, EventLike, message.updated, SessionEvent, props.info, MessageInfo, role, properties, type, case, sessionID, id, title, ts, event, message, assistant, modelID, providerID, cost, finish, timeCreated, timeCompleted, errorName, appendSessionEvent, PartInfo, part.type, step-finish, toolStatus, state, time, start, end, duration, session.status, type", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/session-logger.ts:158:183": "catch, session-event, date-now, store-path, unique-files, retrieval-time-ms, chunk-count, context-tokens, top-score, rag-injected, append-session-event, rag-context, event-logging, plugin-breakage, context-parameters, retry, message-id", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:12:14": "getFileDirectory, TypeScript, line12-14, function, getEvalDir, returns, path.join, storePath, EVAL_DIR, strings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:16:18": "getFilesystemPath, join, sessionID, storePath, TypeScript, path, function, directory, evaluation", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:21:23": "File-validation, src-storage, TypeScript-function, sessionID-validation, regex-test, SafeIdRegex, line-21, line-22, line-23", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:26:35": "typescript,functionality,session,event,store,path,append,file,sync,mkdirs,catch,message,json,stringify,cleanup,recursion,jsonify,exception,security", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:38:47": "readSessionEvents,storePath,sessionID,getSessionPath,readFileSync,utf8,content.split,lines.filter,JSON.parse,SessionEvent,catch,return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:50:61": "typescript,function,listSessionIDs,getEvalDir,existsSync,readdirSync,map,files,endsWith,remove,catch,return,strings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:64:73": "typescript,function,deleteSession,storePath,string,sessionID,try,catch,existsSync,unlinkSync,filePath,errorIgnore,ignore,errors,catchException,paths,getSessionPath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:76:162": "computeSummary,SessionEvent,event,messageCount,totalTokens,totalCost,totalSteps,modelID,toolCallCounts,ragContextCount,responseTimes,ragToolCalls,ragContextTokens,models,sessionTitle,avgResponseTimeMs,Set,reduce,isRagTool,ts,ev,role,event", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:165:178": "function,listSessions,storePath,string,SessionSummary[],listSessionIDs,readSessionEvents,computeSummary,summaries,sessions,event,lastEventAt,sort,ascending", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:181:185": "getFileLocation, getSessionFunction, storePathParameter, sessionIDParameter, readSessionEventsCall, SessionEventArrayReturn, computeSummaryCall, SessionSummaryObjectReturn, nullReturnIfEmptyEvents, eventListLengthCheck", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/storage.ts:188:216": "function, compareSessions, storePath, getSession, sessionA, sessionB, summary, totalTokens, inputTokens, outputTokens, reasoningTokens, cacheRead, cacheWrite, cost, messageCount, totalSteps, ragContextCount, ragToolCalls, ragContextTokens, avgResponseTimeMs, delta", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-counter.ts:17:19": "type,TiktokenEncoder,interface,typeScript,encode,funtion,allowedSpecial,disallowedSpecial,numberArray", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-counter.ts:26:38": "typescript,function,getEncoder,if-statement,null-check,cachedEncoder,assign,require,module,try-catch,TiktokenEncoder,loadFailed,error-handling,cache,encoding", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-counter.ts:40:42": "Function, calculates, text-length, divides, ceiling, returns, fallbackEstimate, characters, complexity", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-counter.ts:50:63": "function,countTokens,text,if,length,equals,0,getEncoder,try,catch,fallbackEstimate,heuristic,encode,return,encodingsFailed,fallThrough,textLength", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-counter.ts:69:71": "File:C_\\Daten_Entwicklung_OpenCodeRAG_src_eval_token-counter-ts,Language:typescript,Line:69-71,Keywords:function,countTokensBatch,map,strings,number_array", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-counter.ts:76:82": "File:C\\Dados\\Desenvolvimento\\OpenCodeRAG\\src\\eval\\token-counter.ts, Language:typescript, Lines:76-82, Keywords:function,sumTokens,texts,total,countTokens", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-counter.ts:92:114": "countTokens, chunks, content, description, file, path, line, range, language, score, backticks, newlines, header, metadata, separators, Auto-retrieved, code, context", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-counter.ts:119:121": "function, returns, tokenizerMethod, ternary, checks, encoder, exists, return, \"tiktoken\", \"heuristic\", typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\token-counter.ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-analysis.ts:27:41": "interface, PerQueryBreakdown, messageID, inputTokens, outputTokens, reasoningTokens, cacheRead, cacheWrite, cost, ragContextTokens, ragChunkCount, ragTopScore, readToolCalls, ragToolCalls, responseTimeMs, TypeScript, properties", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-analysis.ts:44:69": "interface, TokenAnalysis, sessionID, queryCount, breakdowns, PerQueryBreakdown, totals, inputTokens, outputTokens, reasoningTokens, cacheRead, cacheWrite, cost, ragContextTokens, readToolCalls, ragToolCalls, systemGuidanceTokens, avgResponseTimeMs, totalToolTimeMs, models, estimates, tokensWithoutRAG, tokensWithRAG, netSavings, percentSavings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-analysis.ts:83:182": "messageEvents,ragContextByMessage,toolCallsByMessage,messageID,ev,event,mid,msgEvents,msgEvent,totalReadToolCalls,totalRagToolCalls,totalRagContextTokens,totalCost,SYS_GUIDANCE_TOKENS,System_guidance,Tokens,input,output,reasoning,cacheRead,cacheWrite,readToolCalls,ragToolCalls,avgResponseTimeMs,responseTimes,modelSet", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-analysis.ts:183:218": "File,C#\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\token-analysis.ts,TypeScript,LineRange183-218,EstimateTokensWithoutRAG,CalculateExtraReads,CalculateExtraSearchTokens,netSavings,percentSavings,returnSessionData", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-analysis.ts:223:307": "compareTokenAnalyses,ragOn,ragOff,delta,percentChange,verdict,inputTokens,outputTokens,reasoningTokens,cacheRead,cost,RagContextTokens,readToolCalls,ragToolCalls,responseTimeMs,pct,Verdict,tokenUsage,reduction,additionalCalls,avgOffTime", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-analysis.ts:312:378": "token-analysis, TypeScript, function, formatTokenReport, tokenUsageComparison, summaryTable, rowFunction, inputTokens, outputTokens, reasoningTokens, cacheRead, cost, ragContextTokens, systemGuidanceTokens, readToolCalls, ragToolCalls, avgResponseTimeMs, queryCount, models, verdict, breakdowns, perQueryBreakdown", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-analysis.ts:384:386": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\token-analysis.ts,Language,TypeScript,Lines,384-386,Function,estimateContextTokens,text,number,return,countTokens,text", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/token-analysis.ts:397:420": "function, projectTokenSavings, params, avgChunkSize, avgChunksPerQuery, avgReadsPerQueryWithoutRAG, avgReadsPerQueryWithRAG, queryCount, ragOverheadTokens, savedReadTokens, netSavings, isPositive, Math, ceil, max, 0, AVG_READ_TOOL_TOKENS, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/types.ts:12:20": "interface, TokenUsage, has, properties, input, output, reasoning, cache, read, write", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/types.ts:23:65": "interface, SessionEvent, ts, event, message, tool, rag_context, step, session_created, session_status, role, modelID, providerID, tokens, cost, finish, timeCreated, timeCompleted, errorName, toolTimeStart, toolTimeEnd, toolDurationMs, ragInjected, ragChunkCount, ragUniqueFiles, ragContextTokens, ragTopScore, ragRetrievalTimeMs, stepTokens, stepCost, stepReason, sessionTitle, sessionStatus", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/types.ts:68:93": "interface, SessionSummary, messageCount, totalTokens, totalCost, ragContextCount, ragToolCalls, toolCallCounts, avgResponseTimeMs, models", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/types.ts:96:114": "interface, ComparisonResult, SessionSummary, delta, totalTokens, inputTokens, outputTokens, reasoningTokens, cacheRead, cacheWrite, cost, messageCount, totalSteps, ragContextCount, ragToolCalls, ragContextTokens, avgResponseTimeMs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/types.ts:125:127": "File:C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\types.ts,Lines:125-127,Language:Typescript,Function:isRagTool,params:string,Returns:boolean,Logic:ChecksiftoolnameisinRAG_TOOL_NAMESset", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/description-stage.ts:7:10": "interface, DescriptionResult, map, string, array, object, properties, chunkId, error, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/description-stage.ts:12:15": "interface, Logger, has, three, methods, warn, debug, message, strings, TypeScript, file, located, on, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\indexer, lines, 12-15", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/description-stage.ts:32:119": "generateDescriptions,Chunks,filter,maxContentChars,buildFallbackDescription,descriptionProvider,logger,failures,Map,set,chunk,description,contentType,metadata,content,globally,received,Error,message,debug,info,warning,individual,description,contentType,image,LLM", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/description-stage.ts:128:130": "build, fallback, description, function, lines, metadata, chunk, language, startLine, endLine", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/git-diff.ts:7:11": "interface,GitDiffResult,changedFiles,deletedFiles,currentCommit,typescript,file,path,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\indexer\\git-diff.ts,lines,7-11", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/git-diff.ts:19:30": "typescript,function,getRepoRoot,git-rev-parse--show-toplevel,execute-sync,cwd,encoding,utf8,stdio,ignore,pipe,timeout,milliseconds,error,null,truncat.trim", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/git-diff.ts:38:49": "typescript, function, getCurrentCommit, git-rev-parse, HEAD, execSync, string, cwd, encoding, utf8, timeout, 5000, ignoreStdio, trim, try, catch, error, keywordvoid", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/git-diff.ts:58:83": "typescript,function,getChangedFilesSince,git,diff,name-only,diff-filter,CWD,currentCommit,execSync,try-catch,execution,error handling", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/git-diff.ts:91:101": "git-diff,getUntrackedFiles,function,cwd,execSync,git-ls-files,list,others,exclude-standard,catch,try,raw,encoding,utf-8,stdio,timeout,line,split,console-log,ignore,pipe,ignore,return,files,exist,isEmpty,strings,errors,paths", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/git-diff.ts:104:111": "interface, WorkingTreeChanges, modified, renamed, tracked, files, changedFiles, deleted, files, deletedFiles, untracked, files, untrackedFiles, relative, repository, root, ignored, gitignore", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/git-diff.ts:121:146": "git-diff, getWorkingTreeChanges, execSync, workingDirectory, modifiedFiles, deletedFiles, untrackedFiles, git-diff, execCommand, fileComparison, errorHandling, stringSplit, fileTrimming, ignoreStreams, diffIndex, nameOnly, excludeStandard, filterD, filesOthers, standardExclude", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/metadata.ts:51:64": "classifyContentType,typescript,function,classifyContentType,relPath,lower,split,basename,startsWith,test,regular-expression,includes,some,pattern,matches,return,documentation,configuration,source,build,example", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/metadata.ts:66:77": "function, extractDocumentTitle, content, filePath, path, extname, match, regex, string, trim, slice, replace, upperCase, keyword, basename, camelCase, capitalize, titleLength, 80", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/metadata.ts:88:105": "function, buildFileMetadataHeader, filePath, cwd, content, path, extname, relPath, FILE_TYPE_LABELS, lowerCaseExt, relativePath, fileType, pop, dirParts, splice, topDir, classifyContentType, extractDocumentTitle, title, parts, join, string, contentLengthGreaterThanZero", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/watch.ts:9:18": "interface,WatchPassScheduler,notifyChange,changedPaths,void,waitForIdle,promise,async,cancel,close,scheduler,pending,pass,futures", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/watch.ts:34:122": "function, createWatchPassScheduler, TypeScript, runPass, onError, debounceMs, NodeJS.Timeout, Set, execute, await, notifyChange, waitForIdle, close, Promise, closed, running, rerunRequested, fullPassRequested, pendingPaths, changedPaths, timer, waiters, clearTimeout, clearTimeout", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/watch.ts:135:153": "typescript,functionality,creates,watchIgnore,process,files,path,resolution,isIncluded,excludes,directory,configurations,relativePaths,filesystem,logic,sets,checks,paths,manifestPathFor,resolve,relative,indexOf,segments,has,startsWith,endsWith,boolean,returns,typesafe,utilties,dependencies", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/stats.ts:5:38": "interface, IndexRunStats, totalFiles, newFiles, modifiedFiles, unchangedFiles, deletedFiles, removedFiles, skippedEmptyFiles, skippedSmallFiles, totalChunks, finalCount, manifestStatus, rebuildPerformed, batchesFlushed, extractionFailures, extractionErrors, descriptionFailedFiles", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/stats.ts:41:58": "interface, IndexStatusSummary, manifestStatus, missing, corrupt, manifestEntries, upToDateFiles, pendingFiles, lastIndexedAt, rebuildRequired, storeChunkCount, manifestExpectedChunks", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/stats.ts:68:90": "function, createIndexStats, totalFiles, manifestStatus, IndexRunStats, newFiles, modifiedFiles, unchangedFiles, deletedFiles, removedFiles, skippedEmptyFiles, skippedSmallFiles, totalChunks, finalCount, rebuildPerformed, batchesFlushed, extractionFailures, extractionErrors, descriptionFailedFiles", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/cli.ts:10:29": "async, function, runMcpServer, options, ?, configPath, string, cwd, ?, createMcpServer, instance, await, closed, true, await, instance, close, process, exit, SIGINT, SIGTERM, process.on, new, Promise, void, await, shutdown, await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer.ts:24:28": "interface, Logger, has-methods, info, warning, message, accepts-string, defines-void-return, interface-definition", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer.ts:39:45": "scanWorkspace, cwd, config, RagConfig, logger, Logger, Promise, WorkspaceFile, scanWorkspaceFiles, async, lines39-45", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-query.ts:12:21": "interface, QueryBuilderOptions, user, explicit, query, reason, reading, filePath, normalize, absolute, file, path, startLine, endLine, optional, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-query.ts:32:61": "function, buildReadQuery, options, QueryBuilderOptions, string[], parts, push, trim, file, filePath, startLine, endLine, undefined, join, \"\\n\"", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-fallback.ts:10:17": "function,retrievalErrorMessage,returns,string,concatenation,newline,lines,10-17,typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-fallback.ts:22:41": "function,getNoResultsMessage,behavior,error,throw,new,Error,string,switch,case,error,message,filePath,return,if,return,isEmpty,undefined,containsFileNotFoundException,filePath,containsHintMessage,containsDefaultMessage", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tool-args.ts:10:23": "interface, RawReadArgs, interface-type, file-path, path, absolutePath, offset, limit, startLine, endLine, query, reason", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tool-args.ts:28:33": "interface, NormalizedReadArgs, normalizedreadargs, filePath, startLine, endLine, query, TypeScript, file, path, line, argument, keyword, definition", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tool-args.ts:50:85": "function, normalizeReadArgs, RawReadArgs, NormalizedReadArgs, filePath, args, undefined, startLine, args, offset, limit, endLine, args, query, error, Error, throw, >=1, <=1, >=, <, ≥, ≤", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tool-args.ts:98:119": "typescript, function, resolveWorkspacePath, string, inputPath, worktree, absolute, resolved, normalize, startsWith, error, throw, read, path, workspace, forwardSlashes, contains, separator, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tool-args.ts:124:126": "File:C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\opencode\\tool-args.ts,Language:typescript,Lines:124-126,Function:toForwardSlash,param:p:string,Returns:a,string,replaces:/ with/\\,using/global modifier", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:10:21": "interface, FormatReadOutputOptions, filePath, retrievalQuery, results, SearchResult[], maxChunks, maxChars", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:31:62": "function, formatReadOutput, options, filePath, retrievalQuery, results, maxChunks, maxChars, header, buildContextHeader, slice, limited, i, r, formatChunk, length, condition, if, continue, length, concatenate, break, truncationNotice, append, less, equal, add, line, specific, query, contextHeader, contextHeader", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:67:82": "interface, FormatHybridReadOutputOptions, filePath, fileContent, startLine, endLine, ragChunks, SearchResult, relatedFiles, RelatedFileEntry, maxChars", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:93:154": "formatHybridReadOutput,typescript,language,detection,splitting,concatenating,output,truncation,sectioning,chunking,related,file,maxChars,context,lines,guessLanguage,forEach,join,return,optionParsing", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:156:177": "buildContextHeader,filePath,retrievalQuery,totalResults,maxChunks,join,parts,split,includes,substring,return,string,concat,padding,context,lines,files,tokens,code,typescript,functions", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:179:198": "function, formatChunk, number, SearchResult, metadata, chunk, language, startLine, endLine, score,toFixed, lines, push, join, \"\\n\", language, \"```\", \"```\", endsWith", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:201:204": "interface, RelatedFileEntry, object, properties, filePath, string, score, number, TypeScript, codeSnippet, lineRange201-204", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:209:222": "interface, FormatFileFallbackOptions, absolute, filePath, raw, content, startLine, 1-indexed, endLine, 1-indexed, reason, maxChars, optional", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:229:246": "file-path,content,startLine,endLine,maxChars,guessLanguage,lang,codeBlock,output,truncated,lines,sliceStart,sliceEnd,sliced,formatFileFallback,options,split,undefined,newlines,concat,replace,ltrim,ltrimRight,truncate,return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:248:259": "typescript,jsx,map,extension,return,type,guessLanguage,filePath,contains,getOrDefault,language,detect,file_extension,toLowerCase,record,keywordDSL,typescriptJSX,CSS,scss,SQL,TOML,JSON,YAML,PYthon,Ruby,Golang,Rust,Java,Kotlin,Swift,C,CPP,Shell,PHP,Md,XML,Html,Css", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/read-format.ts:267:275": "formatRelatedFiles,entries,map,line,index,toFixed,string,join,return,filePath,score,formattedLines,concatenate,labeledLines,displayedAsList,comma-separated,files,read,relevance,optimizedFunction", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui/sidebar.tsx:7:9": "function,SidebarContent,props,{session_id,theme},TuiTheme,return,string,jsxElement,OpenCodeRAG,Hello,World,typescript,7-9", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:22:32": "getFileVersion, versionFunction, importMetaUrlToPath, dirname, packageJson, JSONParse, readFileSync, joinPaths, tryCatchBlock, undefinedCheck, stringReturn, verisonAssignment, escapeComments", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:35:42": "type, WatcherState, boolean, running, lastRunAt, number, undefined, disabled, timestamp, status,file, notStarted, watcher, index, pass, started, code, TypeScript, lines, 35-42", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:45:58": "type,RagStatus,interface,chunkCount,number,provider,string,model,string,lastIndexedAt,numberOrUndefined,timestamp,undefined,indexed,bool,watcher,state,boolean,fileWatcher,WatchingState", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:71:83": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\tui.ts, Language:typescript, Lines:71-83, Function:loadWatcherStatus, Parameters:(storePath:string), Returns:(WatcherState), Logic:CheckForFileExists, ParseJSONFromFilePath, ConvertBooleanStringToBoolean, HandleParsingErrors", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:89:128": "loadRagStatus, worktree, RagStatus, DEFAULT_STATUS, JSON.parse, readFileSync, existsSync, resolve, manifest.json, files, chunkCount, lastIndexedAt, loadWatcherStatus", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:134:145": "function, formatRelativeTime, timestamp, undefined, Date.now, diff, seconds, Math, floor, minutes, hours, days, less, than, string, just, never, m, h, d, ago", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:150:155": "function, accepts, string, returns, formatted, keybinding, splits, concatenates, uppercase, joins, characters", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:158:158": "type, child, JSX.Element, string, number, null, undefined, boolean, type-definition, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:166:180": "typescript, function, element, tag, props, record, string, unknown, object, entries, props, key, value, setProp, createElement, JSX, children, array, null, undefined, false, insert, keyword, continue, return, node, jsxelement", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:183:185": "Function,text,props,record,string,unknown,children,array,element,typeScript,jsx,jscreateElement,literal,properties,return,value,parameters", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:188:190": "Function, accepts, record, string, unknown, children, array, JSXElement, element, props, equals, returns", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:196:260": "renderSidebar,theme,textMuted,statusLine,timeLine,status,status.indexed,formatRelativeTime,watcherLine,watchesDisabled,watchesRunning,watchesIdle,fileListKey,chunksKey,box,text,tokenStats,formatKeybinding,fg,toLocaleString,jsx,querySelector,querySelectorAll,classListAdd,classListRemove", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:265:271": "typescript,function,getConfigPath,worktree,string,undefined,join,existsSync,paths,json,sync,directory,files,search,configuration,path,locations,variables,filesystem,logic,checks", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:274:280": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\tui.ts, Language:typescript, Lines:274-280, Function:readJsonFile, ReturnType:T|undefined, ParameterType:T=Record, ReadsFilePath:string, UsesJSON.parse, ReadsFileWith:fs.readFileSync, UTF8Encoding,\"try...catch\", Returns:T|undefined, Throws:Error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:283:294": "type, SettingEntry, dot-delimited, config, path, human-readable, label, setting, type, boolean, number, string, currentValue, selectable, options, merged, runtime, overrides, file, config, optional, title, value, description, category, used, model, picker", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:297:306": "type, SettingCategory, unique, identifier, humanreadable, category, name, description, settingentry, array", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:313:333": "File,CSS,ts,typescript,Lines,313-333,function,buildModelOptions,providers,Provider,options,objectEntries,Object,sort,localeCompare,keywords,category,title,value,description,provider,entry,entries,forEach,readOnly,entries,entry,globales,comparisons,sorts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:336:341": "typescript, function, providerIdToRagProvider, receives, string, returns, string, checks, equals, ollama, assigns, openai, uses, PROVIDER_DEFAULTS, indexlookup", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:347:355": "typescript, function, resolveProviderBaseUrl, Provider, options, baseURL, replace, id, ollama, defaultBaseUrl, PROVIDER_DEFAULTS, api, string, concatenation, returns, baseURL", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:361:376": "typescript,function,saveConfigValue,try-catch,json,parse,writeFileSync,readFileSync,path,array,unknown,object,target,dictionary,configuration,configPath,JSON,stringify,properties,value,assign,property,get,set,loop,deep,structure,complex,data,keys,update,replace,recursive,exception,elevate,to,validate,check", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:384:420": "typescript,function,saveModelSelection,params,storePath,configPath,selectionValue,path,providers,undefined,sanitizePath,split,providerId,modelId,find,getBaseUrl,baseUrl,assign,saveRuntimeOverride,saveConfigValue,apiKey,options,forEach,assign,section", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:427:526": "lines 427-526, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:527:602": "typescript, configuration, entries, modelOptions, displayModel, boolean, number, keybindings, string, fileListKeybinding, chunksKeybinding, tuiCfg, tuiRo, embedding, description, documentationMode", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:608:707": "typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\tui.ts, settingsDialog, API, worktree, configPath, readJsonFile, cfgRaw, vectorStore, storeRelPath, resolve, toast, UI, dialog, replace, clear, DialogSelect, DialogPrompt, props, TuiState, path, provider, getSettings, currentOverrides, categories, settingCategories, loadRuntimeOverrides, saveRuntimeOverride, modelPicker, saveConfigValue", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:708:807": "lines 708-807, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:808:819": "showCategoryMenu, showSettingMenu, menu, restartOpenCode, changeEmbedding, reindexRequired, messageToast, categorySelection, settingScreen, OpenCodeRestart, tuiFile, TypeScript, fileLocation, line808-819", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:830:929": "typescript,async,function,refreshStatus,loadRagStatus,resolved,wildcard,slot,register,order,date,now,lastRefresh,renderSidebar,getTokenStats,api,slots,theme,path,resolve,version,configPath,cache,vstore,storeRelPath,flagConfigPath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/tui.ts:930:999": "typescript, register, keybinding, layer, command, run, try, catch, filelist, chunks, priority, setPendingRagInjection, setTimeout, api, openSettingsDialog, ui, state, tuiConfig, flagStorePath, keymap, submit, prompt, bindings, keyboard, OpenCode", + "C:/Daten/Entwicklung/OpenCodeRAG/src/types/opencode-plugin.d.ts:12:19": "TypeScript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\types\\opencode-plugin.d.ts, line, 12-19, PluginInput, type, client, createOpencodeClient, ReturnType, project, string, directory, worktree, URL, serverUrl, unknown, properties", + "C:/Daten/Entwicklung/OpenCodeRAG/src/types/opencode-plugin.d.ts:22:22": "TypeScript,type,interface,options,plugin,definition,object,properties,record,namespace,schema,values,dictionary,keys,variables", + "C:/Daten/Entwicklung/OpenCodeRAG/src/types/opencode-plugin.d.ts:25:53": "interface,Hooks,event,config,tool,message,params,executeBefore,executeAfter,experimental,transform,system,model,sessionID,messageID,parts,Message,Part,temperature,topP,maxOutputTokens,options,providerID,modelID,source,info,options", + "C:/Daten/Entwicklung/OpenCodeRAG/src/types/opencode-plugin.d.ts:56:56": "TypeScript,type,plugin,definition,input,output,interface,promise,hooks,function,code,line,56", + "C:/Daten/Entwicklung/OpenCodeRAG/src/watcher.ts:21:24": "interface, BackgroundIndexer, stop, watcher, cancel, pending, index, passes, cleanup, status, files, Promise, void", + "C:/Daten/Entwicklung/OpenCodeRAG/src/watcher.ts:27:46": "interface, CreateBackgroundIndexerOptions, workspace, root, directory, watch, changes, absolute, path, vector, store, directory, cwd, storePath, RagConfig, VectorStore, EmbeddingProvider, logFilePath, logLevel, keywordIndex, descriptionProvider, DescriptionProvider", + "C:/Daten/Entwicklung/OpenCodeRAG/src/watcher.ts:49:54": "type, watcherstatus, boolean, running, lastrunat, timestamp, undefined, type-definition, object, index-pass, completed-run", + "C:/Daten/Entwicklung/OpenCodeRAG/src/watcher.ts:57:67": "typescript,function,writeWatcherStatus,storePath,status,WatcherStatus,JSON,stringify,try-catch,writeFileSync,path,json,file,errors,ignore", + "C:/Daten/Entwicklung/OpenCodeRAG/src/watcher.ts:78:177": "createBackgroundIndexer, watcher, TypeScript, BackgroundIndexer, createWatchIgnore, setInterval, appendDebugLog, isCorruptionError, runPass, watchPassScheduler, chokidar, autoIndexCfg, scheduler, watcherBackend, periodicTimer, close", + "C:/Daten/Entwicklung/OpenCodeRAG/src/watcher.ts:178:189": "typescript, await, watcher.close, existsSync, unlinkSync, statusPath, storePath, watchr-status.json, path.join, deleteFile, appendDebugLog, logFilePath, autoIndex, scope, message, background, shutdown", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/factory.ts:22:38": "createVectorStore, RagConfig, storePath, dimension, LanceDbStore, InMemoryVectorStore, unknown, throws, provider, keyword, typeScript, function, conditionals, string, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:23:26": "interface, ApiResponse, has, status, number, body, unknown", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:29:35": "split,url,searchParams,new,keyword,functions,typescript,params=url,regex,path,extract,query,pattern,logic,urlparse,details,functionality", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:38:46": "typescript,function,sendJson,res,response,writeHead,end,JSON,stringify,status,Content-Type,Access-Control-Allow-Origin,Access-Control-Allow-Methods,Access-Control-Allow-Headers,json,body", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:64:162": "lines 64-162, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:165:186": "async, function, handleStats, LanceDbStore, Promise, ApiResponse, count, listFiles, Map, entries, sort, language, chunkCount, length, sortLexicographically, object, property, entriesToArray, map", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:189:192": "async,function,handleFiles,imports,LanceDbStore,listFiles,body,status,returns,apiResponse,await,files", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:199:227": "async,function,handleChunks,store,LanceDbStore,params,urlSearchParams,int,parseInt,Promise,ApiResponse,await,getChunks,filter,slice,status,200,body,{},chunks,total,offset,limit,langFilter,fileFilter,startsWith,filePath,if,else,console,keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:230:242": "async, function, handleChunkById, LanceDbStore, store, getChunks, chunks, find, id, equals, return, Promise, ApiResponse, status, 404, error, 200, body, found, not_found", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:245:275": "async, function, handleSearch, KeywordIndex, params, URLSearchParams, Promise, ApiResponse, query, keywordIndex, search, topK, parseInt, trim, status, body, results, chunk, id, filePath, startLine, endLine, language, content, description, score, Math, round", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:278:295": "async,function,handleCompare,params,getChunks,idsParam,filters,filter,chunks,status,body,includes,return,Promise,ApiResponse,split,store,lanceDbStore,urlschemeparams,isEmpty,assertions,idsLength,0,100000,await,APIresponse,error,message,idsIncludes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:300:306": "typescript,functionality,resolves,file,path,cwd,normalize,starts,with,check,exists,module,resolvePathModule,replace,slash,return,null,filePath,assertion", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:311:314": "async,function,handleEvalSessions,await,sessions,listSessions,storePath,Promise,return,status,200,body,sessions,apiResponse", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:317:326": "validateSessionID, getSession, storePath, id, Promise, ApiResponse, status, 400, 404, sessionID, sessionNotFound, sessionFound, returnApiResponse", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:329:335": "async,function,handleEvalDeleteSession,validateSessionID,deleteSession,storePath,id,Promises,ApiResponse,status,200,body,deleted,true,400,error,Invalid", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:338:356": "async,function,handleEvalCompare,storePath,params,Promise,ApiResponse,status,body,error,validateSessionID,compareSessions,idA,idB,if,else,400,404,200,getUrlSearchParams,get,isValidSessionID,return,await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:367:377": "async, function, handleEvalAnalysis, validateSessionID, getSession, storePath, id, analyzeTokenUsage, ApiResponse, Promise, status, body, 400, error, 404, session, found, sessionID, tokenUsageId", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:385:407": "async, function, handleEvalTokenCompare, storePath, params, URLSearchParams, Promise, ApiResponse, get, validateSessionID, getSession, analyzeTokenUsage, compareTokenAnalyses, 400, 404, status, body, error, sessionID, tokenUsage, comparison", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:416:440": "function, handleEvalProjectSavings, unknown, object, typeof, if, !, undefined, body, as, record, string, number, typeof, b, avgChunkSize, Number, b.avgChunkSize, Number, b.avgChunksPerQuery, Number, b.avgReadsPerQueryWithoutRAG, Number, b.avgReadsPerQueryWithRAG, queryCount, isNumber, some, projection, projectTokenSavings, function, arguments", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/api.ts:443:455": "async, function, readBody, IncomingMessage, req, Promise, chunks, Buffer, push, await, for...of, typeof, string, Buffer.from, concat, toString, utf8, JSON, parse, raw, catch, keyword,different, type, unknown, return, object, empty, asynchronous", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/static.ts:18:25": "function,getStaticHtml,cachedHtml,__dirname,fileURLToPath,import-meta-url,dirname,join,readFileSync,\"utf-8\",cachedHtml,htmlPath,indexHTML,staticHTMLFile,filePath,StringType,TakesNoParameters,returnsString", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:1:5": "CSS, file-location-C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\github-dark.css, line-1-5, pre, code, .hljs, display-block, overflow-x-auto, padding-em", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:6:8": "padding, code, hljs, style, css, GitHubDark, properties, specified", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:19:22": "color, background, hljs, css, properties, code, darktheme, github, language, syntaxhighlighting", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:23:32": "css, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\github-dark.css, lines, 23-32, keywords: highlight, doctag, keyword, meta, template, tag, variable, type, variable, language.", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:33:39": "class_, color, css, dark, entity, function_, inherited__, highlight, inherited__, inherit, lines, name, syntax, title, underline", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:40:52": "css, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\github-dark.css, lines, 40-52, keywords: highlight, attributes, literals, metadata, numbers, operators, variables, selectors.", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:53:58": "color, hljs-string, hljs-meta, hljs-regexp, string, keywords, keyword2, keyword3, keyword4, keyword5, keyword6, keyword7, keyword8, keyword9, keyword10", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:59:63": "color, defined, keywords, lines, language, syntax, variables, css, code, keyword, highlights, theme", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:64:69": "color, comment, code, formula, hljs, syntax, comment, css, language, highlight, keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:70:76": "color, keywords, hljs-name, hljs-quote, hljs-selector-pseudo, hljs-selector-tag, prettylights-syntax-entity-tag, css, lines-70-76, language-css", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:77:80": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\github-dark.css, Language:css, Line-start:77, Line-end:80, Keyword:Set;color, For;hljs-subst, Definition;prettylights-syntax-storage-modifier-import, Property;color, Value:#c9d1d9", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:81:85": "color, font-weight, hljs-section, italicized, language-css, lines-81-85, markdown, open-code, style-coding, weight,bold", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:86:89": "color, css, definition, emoji, font, hljs-bullet, highlight, keywords, language-css, lines-86-89, open-code-rag, style", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:90:94": "color, font-style, hljs-emphasis, italic, language-css, lines-90-94, style-css, keywordcss", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:95:99": "color,bold,font-weight,color-change,strong,css,literal,highlighted,text-style,dark-mode,code-styling,highlighting,github-dark,keywords,properties,selectors,css-properties", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:100:104": "color, background-color, hljs-addition, prettylights-syntax-markup-inserted", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:105:109": "color, deleted, highlight, syntax, style, background, hex, css, code, removed, properties", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/github-dark.css:110:118": "ignore, highlight, style, properties, tags, punctuation, links, escaped, removed, css", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/anthropic.ts:10:13": "interface, AnthropicMessage, interfaceType, defines, messageRole, user, assistant, content, string, typeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/anthropic.ts:15:17": "Interface, AnthropicResponse, contains, content, optional, array, objects, type, text, undefined", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/anthropic.ts:34:36": "Constructor, TypeScript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\describer\\anthropic.ts, properties, configuration, assigns, object", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/anthropic.ts:39:45": "async, generateDescription, Chunk, messages, AnthropicMessage, user, role, role, content, buildUserMessage, config, maxContentChars, chatRequest, timeoutMs, Promise, string, asynchronous, parameters, array, elements, characters, milliseconds, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/anthropic.ts:48:80": "async, describe, chunks, generateBatchDescriptions, logger, Map, Promise, all, concurrency, total, buildUserMessage, config, limit, chunk, completed, log, info, warn, debug, descriptionLogger, descriptive, descriptions, file, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/describer/anthropic.ts:92:149": "private, async, chatRequest, messages, AnthropicMessage[], timeoutMs, Promise, string, baseUrl, config.baseUrl, replace, /+$/, apiKey, config.apiKey, undefined, systemPrompt, config.systemPrompt, body, Record, string, {}, role, user, content, message, array, map, join, retryMax, config.retryMax, 3, retryBaseDelayMs, config.retryBaseDelayMs, 1000, attempt, for, JSON.stringify, response.ok, await, response.json, json.content, AnthropicResponse, text, trim, throw, Error, retryable, RETRYABLE_STATUSES, has, delayMs, await, sleep, unknown, Error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:6:12": "clear,delete,set,Object,isFrozen,freeze,forEach,Error,map,set,object,typeof,Object.getPrototypeOf,constructor", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:12:13": "constructor, void, data, isMatchIgnored, this, equals, undefined, assign, properties", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:16:17": "forEach, function, global, inheritance, keyword, lines16-17, object, prototype, create, spread, forEach, implementation, overwrite, properties, extends, {...}", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:17:17": "highlight,minimized,JavaScript,function,keyword,conditionals,logical,operator,equals,exists", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:18:19": "constructor, this, buffer, classPrefix, walk, e", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:19:20": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\highlight.min.js,Language,javascript,Lines,19-20,addText,e,this.buffer,t,e", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:20:24": "javascript, file-path, highlight-min-js, openNode, conditional-expression, string-replace, prefix-addition, array-methods, scope-splitting, variable-prefix, concatenation-operator, underscore-repeat, return-complex-array", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:26:27": "Object, assign, const, children, array, JavaScript, file, path, codesnippet, keyword, object, properties, extends, implementation, function, initialization", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:27:28": "constructor, this.rootNode, s, this.stack, =[], this.rootNode", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:28:29": "Function, returns, array-length, subtract-one, property, object, bracket-syntax, JavaScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:30:31": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\highlight.min.js, Language:javascript, Lines:30-31, Keywords:function, openNode, e, const, n, s, {scope,e}, this.add, this.stack, push", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:31:32": "Function-name-closeNode, Method-body-if-statement, Array-length-comparison, Pop-method-call, This-keyword-context, Stack-variable-reference", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:32:33": "Function_name, closeAllNodes, Loop, this.closeNode, do_while_loop", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:33:33": "javascript, file-path, C__DatenEntwicklungOpenCodeRAGsrcwebuithighlightminjs, line-range, 33-33, method-def, toJSON, returns, stringify, rootNode, null, space, four", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:36:38": "JavaScript, static, method, collapse, every, string, children, forEach, recursive, recursion, join, callback, JavaScript, collapse, DOM manipulation", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:38:38": "class-constructor, extends, super-call, options-parameter, initialization, lies-between-lines38-38", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:40:41": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\highlight.min.js,Lines,40-41,Language,javascript,__addSublanguage,function,e,n,t,e.root,n,this.add,t,scope", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:41:42": "JavaScript, method,toHTML,returns,string,new,Object,value,highlight,minified,lines,41-42", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:42:43": "finalize, returns, closeAllNodes, boolean", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:43:44": "Function,captureSource,regularExpression,exists,empty,returns,null", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:44:44": "Function,d,regex,search,replace,44", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:50:50": "Function,parsingLength,replaceRegExp,exec,length", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:52:56": "function, map, length, substring, index, joinWith, replace, regex, exec, escape, pattern, escapeRegExp, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:60:66": "javascript, function, parameter, contains, object, begin, end, relevance, regex, keyword, replace, array, filter, closure, scope, string, match, method, contains, push, exclusion, relevance, relevance, contains, scope, replace, contains, push, boolean, conditionals", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:84:85": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\highlight.min.js,Language,javascript,Lines,84-85,function,T,e,n,if,.equals,input,index,-1,ignoreMatch,keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:85:86": "Function,R,keyword,void,undefined,className,set,equal,scope,delete", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:86:89": "javascript,function,D,e,n,beginKeywords,split,keywords,replace,relevance,delete,beforeBegin,keywords,relevance,assign,remove,exists,boolean,condition,regex,begin,match,split,add,empty,initialize,assign,exist,undefined,not,replace,expression,pattern,assign,method,dictionary,filter,keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:89:90": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\highlight.min.js,Language,javascript,Lines,89-90,Function,I,Parameters,e,n,Condition,Array.isArray(e.illegal),Action,m,...e.illegal", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:90:93": "Function,L,matchesForcesBeginEndKeywordRemoval,ChecksIf,e,isDefinedOn,e,UsesMatchMethodToDefineStartAndEnd", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:93:94": "Function,B,keyword,void,zero,replacement,e,n,relevance,set,assignment", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:94:100": "keywords,assign,remove,key,value,object,forEach,delete,replace,start,relevance,contains,delete,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:101:105": "Function, create, null, forEach, Object.assign, keys, Array.isArray, split, map, string,toLowerCase, each, object, keyword, function, spread, assign, filter, keywords, concatenation", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:105:106": "Function,j,includes,toLowerCase,Number,returns,logical,expression,if-not-null,argument,fallback,zero,one", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:106:107": "Function, arrow, executes, logs, error, code, on, invalid, line, 106-107", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:109:111": "function,Z,key,object,index,assign,schema,reducer,value,increment,multi,exists,properties,splice,assignKey,updateObject,reduceValues,checkLength,addModifier,setPropertyModifiers", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:111:124": "function,W,scope,assign,end,assign,begin,assign,beginScope,assign,end,assign,endScope,Z,h,K,G,throw,String,Object,Array,isArray,Object,typeof,==,===,delete,{},if,return,{},{}={},[],{},{},{},,,comma-separated", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:124:171": "javascript,compilation,function,object,regex,pattern,mapping,keyword,matcher,rule,application,console,error,class,constructor,extends,assign,includes,forEach,map,exec,reconstruct,keywords,contains,frozen,Object,variable,assignment,utilization,match,executed,code,knowledge,language,script,definition,highlight,minified", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:171:172": "Function,X,returns,bool,type,function,e,endsWithParent,starts,endsWithParent,exists,keyword,code,literal,boolean,JavaScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:173:173": "class, constructor, HTMLElement, extends, super, HTMLInjectionError, name, parameter, html, initializes, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:174:273": "lines 174-273, javascript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:274:308": "highlight,min,javascript,code,language,File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\highlight.min.js,keywords,eventlisteners,configurable,autodetection,languages,plugins,highlighting,domContentLoaded", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:326:326": "JavaScript,function,recursive,replacement,string,substring,search,pattern,replace,regex,call,argument", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:328:403": "lines 328-403, javascript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/highlight.min.js:404:404": "PatternMatching, RegExp, KeywordSearch, RegexFunction, TestCondition, WordEnd, NonWordStart, MatchKeyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin-entry.ts:1:19": "file, overview, OpenCodeRAG, plugin, entry-point, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\plugin-entry.ts, text, fileoverview, unique, identifier, OpenCode, conforms, module, signature, default, export, id, server, import, ragPlugin, factory, plugin, system, import, discover, plugin, by, importing", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/tailwind-input.css:1:1": "file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\tailwind-input.css,language,CSS,line,1,lineNumber,1,tag,@tailwind,keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/tailwind-input.css:2:2": "File:C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\tailwind-input.css,Lines:2-2,Language:css,Keyword:,@tailwind,components;", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/tailwind-input.css:3:3": "file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\tailwind-input.css,language,css,lines,1-to-3", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/tailwind-input.css:5:7": "file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui\\tailwind-input.css,language,CSS,layers,@layer,base,css-selectors,body,bg-color,background,color,variables", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/tailwind-input.css:9:21": "layer, scrollbar-thin, scrollbar-thumb, chunk-row, selected, file-item, kpi-card, nav-btn-active, background, padding, hljs, css, properties, styles, selectors", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/api.test.ts:4:46": "it,test,Fun,error,assert,import,process,env,CI,skip,getContext,chunks,text,isEmpty,assertEqual,async", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/api.test.ts:48:63": "typescript,it,test,async,await,import,assert,mod,type,function,retrieve,loadConfig,LanceDbStore,index,search,indexWorkspace,get,set,validateConfig,getContext", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/bash.test.ts:5:53": "typescript,it,test,assert,equality,fileExtensions,length,includes,contains,deepStrictEqual,async,await,isEmpty,chunks,content,ids,size,set,unique,assign,keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:9:9": "file, index.html, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\web\\ui, script, src, \"/ui/highlight.min.js\", language, html, line, 9-9", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:10:16": "css, font-family, ui-sans-serif, system-ui, -apple-system, sans-serif, transition-property, opacity, hover, rect, circle, transition-duration, r, svg, keywordanimations, responsive_design_elements", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:62:161": "lines 62-161, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:162:261": "lines 162-261, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:262:361": "lines 262-361, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:362:461": "lines 362-461, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:462:561": "lines 462-561, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:562:661": "file-item,langColor,countFiles,renderDir,state,dirs,obj,state,files,API,filtered,fileFilter,chunkCount,view-files,renderFileTree,data-dir-key,data-file,datalist,eventListener,selectedFile,selectedChunkId,showView,renderChunks,reduce,includes,toLowerCase", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:662:761": "lines 662-761, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:762:861": "lines 762-861, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:862:961": "lines 862-961, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:962:1061": "event, click, addEventListener, forEach, html, javascript, sessionID, selected, API, projection, debounce, sliders, data, JSON, id, value, documentgetElementById, documentaddEventListener, await, params, avgChunkSize, proj-chunk-size, avgChunksPerQuery, proj-chunks-query, avgReadsPerQueryWithoutRAG, proj-reads-without, avgReadsPerQueryWithRAG, proj-reads-with, queryCount, proj-query-count", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:1062:1161": "lines 1062-1161, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:1162:1261": "lines 1162-1261, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:1262:1361": "lines 1262-1361, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:1362:1461": "lines 1362-1461, html", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/ui/index.html:1462:1473": "html, file, line, 1462-1473, eventListener, compare, close, area, innerHTML, empty, catch, error, renderingFailed, textRed_400, comparison, failed, escapeHtml, script, init, renderDashboard", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/c.test.ts:5:92": "typescript,it,test,assert_equal,includes,has,chunker,language,fileExtensions,grammarName,nodeTypes,metadata,contents,chunks,function_definition,struct_specifier,enum_specifier,union_specifier,type_definition,preproc_def,Set,unique_ids,startLine,declarations,arrays", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/cpp.test.ts:5:104": "lines 5-104, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/cpp.test.ts:105:110": "typescript,file,path,assert_ok,find,includes,line_eq,metadata,chunks,test,lines,105-110,assert_equal", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/csharp.test.ts:5:98": "lines 5-98, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/css.test.ts:5:75": "typescript,it,test,assert,cssChunker,language,fileExtensions,grammarName,nodeTypes,chunk,chunks,rule_set,at_rule,media_statement,keyframes_statement,empty,content,parse,return,uniqueIDs,startLine,metadata,async,error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/doc.test.ts:6:65": "typescript,it,test,async,await,new,assert,diffEqual,chunker,doc,paragraphs,chunks,filePath,metadata,startLine,endLine,languages,groups,threshold,uniqueIDs,lines,content,sentences,paragraphs,sets,arrays,files", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/doc.test.ts:67:73": "typescript,it,test,register,chunker,file,assert,exists,extension,language,get,tested", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/excel.test.ts:6:60": "typescript,chunking,ExcelChunker,test,it,E2E,chunks,content,metadata,assertions,language,files,xls,xlsx,sheets,rows,batches,id,sets,properties,extensions,filesystem,excel", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/excel.test.ts:62:74": "typescript,it,test,is,registered,in,factory,for,.xlsx,.xls,extension,chunker,assert,ok,assert,equal,spreadsheet", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/docx.test.ts:6:75": "typescript,it,test,chunker,DocxChunker,async,await,assert,deepEqual,length,equal,includes,repeats,repeat,split,newLine,spaces,sentence,line,chunks,content,metadata,filePath,language,Set,FileExtensions,docx,testData,chunking,paragraphs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/docx.test.ts:77:83": "typescript,it,test,is,registered,factory,extension,docx,getChunker,assert,ok,assertEqual,language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/factory.test.ts:5:81": "typescript,it,test,language,detection,file,cases,assert,equality,chunker,loop,extension,fallback,unknown,application,json,html,css,image,xml,powerShell,kotlin,rust,ruby,swift,scheme,tsx", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/factory.test.ts:83:94": "it,fallsback,line-based,chunking,async,itself,assert,deepStrictEqual,file,empty,typescript,function,test,returns,chunks,lenght,code,testts,emptyts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/factory.test.ts:96:175": "file,test,CSS,typescript,Linux,assert,async,it,language,json,metadata,line,chunk,content,original,split,character-limit,line-number,variable,assign,loop,padStart,repeat,join,forEach,assertEqual,assertTrue,assertFalse,import,return,await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/factory.test.ts:177:194": "typescript,it,test,file,chunking,assert,async,override,languages,includes,chunk,chunks,code,classes,methods,patterns,assertions,fallback,treesitter,language,detection,properties,functions,files,dependencies,testcases,chains,tests", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/fallback.test.ts:5:75": "typescript,it,test,chunker,metadata,startLine,endLine,line,assert,diffEqual,lines,filePath,language,Set,isEmptyLines,uniqueId,maxLines,fallback,chunkedContent,trimmedLines,createChunk,filePath,emptyChunks,languageProperty,codeAssertions,typescriptCode,File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\chunker\\fallback.test.ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/go.test.ts:5:100": "typescript,it,test,language,go,fileExtensions,grammarName,nodeTypes,chunk,chunks,content,assert,diff,test,equality,parsing,function_declaration,method_declaration,type_declaration,empty,whitespace,expected,code,assert.ok,metadata,line,uniqueIDs,startLine", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/dockerfile.test.ts:5:50": "typescript, file, it, dockerfileChunker, language, fileExtensions, grammarName, nodeTypes, instruction, chunk, empty, code, assertions, async, await, array, content, deepStrictEqual, includes, packageJSON, npm, serverJS, FROM, WORKDIR, COPY, RUN, CMD", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/html.test.ts:5:74": "typescript,it,test,function,it,language,is,html,fileExtensions,includes,.html,.htm,grammarName,is,html,nodeTypes,contains,script_element,style_element,chunk,async,empty,array,chunks,length,one,element,content,has,script,has,style,startLine,metadata", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/image.test.ts:4:64": "typescript,it,test,chunking,image,fileExtensions,language,chunking,content,metadata,preserves,recombined,assertions,import,module,imageChunker,extensions,assert,lines,dictionary,variables,keywords,json,code,functions,regex,objects,arrays,imports,descriptions,images,paragraphs,chunks,paths", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/image.test.ts:66:87": "import,module,async,await,assert,typescript,it,before,test,function,assertEqual,mimeType,images,png,jpg,jpeg,gif,webp,svg,tiff", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/image.test.ts:89:177": "typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\chunker\\image.test.ts, test, imports, asynchronous, before, it, assert, createFn, importModule, imageVisionProvider, describeImage, functionComparison, apiKey, URLEndpoints, APIKeys, throwsError", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/ini.test.ts:5:50": "typescript,it,test,iniChunker,language,fileExtensions,grammarName,nodeTypes,chunk,content,chunks,sections,uniqueIDs,assertEqual,assertOk,asyncAwait", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/java.test.ts:5:98": "file,test,java,typescript,it,assert,equal,includes,contains,metadata,line,startLines,chunks,includes,method_declaration,enum_declaration,class_declaration,Set,async,await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/grammar.test.ts:5:14": "interface, MockNode, interface-type, string, number, startIndex, endIndex, number, object, startPosition, row-number, endPosition, row-number, children-array, MockNode, null, previousSibling, namedChildren", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/grammar.test.ts:16:42": "function, makeNode, string, startIndex, endIndex, number, MockNode, filter, type, includes, null, array, object, previousSibling, namedChildren, startRow, endRow, children, MockNode[], type, equals, include, return, position, sibling, iteration, keyword, link", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/grammar.test.ts:44:143": "file,test,node,walkTree,result,set,assert,type,depth,text,line,positions,source,match,find,program,decl,function,return,code,snippet,typescript,tree,walk,match,leaf,identifier,block,class,child,parent,maxDepth,deep,shallow,groot,bound,context,snippet,test,walkTree,result,deep,result,result,assert,result,result,result,result,assert,assert,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result,result", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/grammar.test.ts:144:243": "lines 144-243, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/grammar.test.ts:244:343": "lines 244-343, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/grammar.test.ts:344:394": "typescript,class-docstring,module-level-expression-statement,Rust-triple-slash-doc-comment,walkTree,assert,equal,includes,makeNode,into,indexOf,leadingDoc,Set,walkTree,src,result,assertEqual,docString,expressionStatement,functionDefinition,identifier,quoteText,quoteStart,makeSiblingNodes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/json.test.ts:5:63": "typescript, file, chunker, JSON, test, assertions, includes, length, deepStrictEqual, map, size, metadata", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/kotlin.test.ts:5:48": "typescript,it,test,assert,language,kotlin,fileExtensions,nodeTypes,chunk,fun,function_declaration,object_declaration,property_declaration,class_declaration,interface_declaration,empty,content,parsing,async,unique,ID,Singleton,code,assertions,chunks,includes,deepStrictEqual,equals", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/markdown.test.ts:5:87": "typescript,chunking,test,it,assert,MarkdownChunker,content,metadata,chunks,language,filePath,headings,markdown,languages,extensions,files,testFile,properties,functions,async,arrays,sets,includes,deepStrictEqual,equals,joins,errors,throws,identifiers", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/pdf.test.ts:6:76": "typescript,it,test,chunker,pdf,async,await,assert,deepStrictEqual,Set,fileExtensions,language,metadata,chunking,paragraphs,content,lines,groups,threshold,sentence,properties,ids,unique,tests", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/pdf.test.ts:78:88": "typescript,function,it,test,is,registered,in,factory,pdf,extension,language,assert,equal,chunker,get", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/php.test.ts:5:45": "typescript,it,test,assert,phpChunker,language,fileExtensions,grammarName,nodeTypes,chunk,empty,content,funtion_definition,method_declaration,async,await,code", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/powershell.test.ts:5:45": "typescript,it,test,function_statement,nodeTypes,fileExtensions,assert,includes,length,powershellChunker,grammarName,chunk,diff,deepStrictEqual,empty,content", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/python.test.ts:5:94": "typescript,it,test,language,python,fileExtensions,grammarName,nodeTypes,chunk,parsing,chunks,empty,content,whitespace,functiondefinition,classdefinition,decoratedfunction,uniqueIDs,startLine,metadata,assert,code,assert.ok,assert.equal,assert.deepStrictEqual,async,includes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/razor.test.ts:5:81": "typescript,it,test,language,razor,fileExtensions,chunk,assert,metadata,startLine,endLine,content,code_blocks,unique_ids,razorChunker", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/ruby.test.ts:5:48": "typescript,it,test,function,assert,rubyChunker,fileExtensions,nodeTypes,method,singleton_method,class,module,empty,content,chunks,async,extract,unique,IDs,code,methods,classDefinition,extractMethods,tests,properties,assertEqual,importStatements", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/register.test.ts:7:58": "register,test,chunker,it,testChunker,fileExtensions,chunk,async,_path,content,Promise,Chunk[],assert,equality,language,warnings,console,exists,getChunker,typescript,extension,registered,overwrite,sanitization,warn,typescript_chunker,existing_chunker,registration_warnings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/register.test.ts:60:110": "it,test,typescript,async,itx,warnings,console,import,fs,promises,path,tmpdir,mkdtemp,writeFile,rm,assert,unknown,class", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/rust.test.ts:5:49": "typescript,it,test,rustChunker,language,assert,detection,fileExtensions,nodeTypes,chunk,empty,content,function_item,struct_item,enum_item,trait_item,impl_item,type_item,mod_item,async,identicalIDs,uniqueID", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/sln.test.ts:5:50": "typescript,it,test,assert,language,sln,fileExtensions,chunk,async,project,sections,global,metadata,startLine,chunks,ids,Set,includes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/sql.test.ts:5:44": "typescript,it,test,it,xhr,async,assert,deepStrictEqual,includes,length,has,equals,include,contains,equal,includes,sqlChunker,fileExtensions,grammarName,nodeTypes,statement,chunk,isEmpty,content,createTable,createIndex,select,SELECT,CREATE,SQL", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/swift.test.ts:5:58": "typescript,it,test,swiftChunker,language,fileExtensions,nodeTypes,chunk,assert,async,empty,content,method,protocol,unique,IDs,class,code,chunks,include,includes,parse,tree-sitter,grammar,files,statements,extract,variables", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/tex.test.ts:5:104": "typescript,chunker,test,metadata,chunks,assert,lines,content,sections,files,methods,subsections,latex,starred,ids,paper,environments", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/tex.test.ts:105:124": "typescript,it,test,assert,chunker,latex,chunks,content,fileExtensions,languages,includes,property,return,includes,.tsx,extensions,test.tex,comments,files,sections,join,lines,it,test,tests,keyword,language,properties,hidden,section,after,content,assert.equal", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/ssl.test.ts:5:104": "typescript,chunker,test,it,ssl,assert,equality,fileExtensions,includes,line,startLine,endLine,chunks,content,metadata,promises,async,declarations,class,inherit,procedure,if,endif,classes,comments,extract,split,statements,variables", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/ssl.test.ts:105:134": "typescript,file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\chunker\\ssl.test.ts,assert,equality,chaining,it,function,test,async,await,chunker,code,assertEqual,metadata,filePath,PROCEDURE,ENDPROC,Set,includes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/toml.test.ts:5:54": "typescript,it,test,function,assert,tomlChunker,language,fileExtensions,grammarName,nodeTypes,nodeTypes,chunk,empty,content,chunks,async,dependencies,pairs,uniqueIDs,Set,code,ids,Array,includes,deepStrictEqual,equals,forEach,indexOf,has,table,table_array_element,pair", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/typescript.test.ts:5:104": "lines 5-104, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/typescript.test.ts:105:105": "file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\chunker,tsc,test,typescript,line,105,EOF,statement", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/uuid.test.ts:5:24": "typescript,it,test,it_assertions,uuid,generates,valid,format,matches,pattern,unique,generates,string,length,assert,equals,type,different,size,arrays,forEach,100", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/xml.test.ts:5:57": "it,test,xslts,typescript,assert,xmlChunker,fileExtensions,grammarName,nodeTypes,chunk,empty,content,chunks,csproj,project,startLine,metadata,propertyGroup,element,include,version,references,uniqueIDs,async,metadata,setProperty,parse,openCodeRAG,github,typescript,xslts,validate,assertEqual", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/yaml.test.ts:5:60": "it, language, yaml, fileExtensions, grammarName, nodeTypes, chunk, emptyContent, topLevelMappingPairs, blockSequenceItems, uniqueIDs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/cli.test.ts:10:109": "lines 10-109, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/cli.test.ts:110:199": "typescript,itests,file,CWD,mkdirs,writeFileSync,json,readFileSync,assert,import,symbolic-links,cwd,cli,jsonc,symlink,URL,platform,directory,existsSync,process,promises,asyncawait", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/cli.test.ts:201:232": "before, after, it, describe, tmpdir, mkdirSync, rmSync, process.cwd, import, assert.doesNotReject, assert.rejects, file-path-argument, cli.js, cli.ts, join, Date.now, recursive, force, originalCwd", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/bootstrap.test.ts:9:108": "typescript,itests,bootstrap,test,tmpdir,tmpdirjoin,mkdirsync,rmrsec,assert,equiv,async,fsutils,config,json,provider,model,embedded,embedding,dimension,storePath,store,vectorStore,keywordIndex,context,throws,probes,cwd,resolve", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/bootstrap.test.ts:109:128": "typescript,it,test,create,descriptionProvider,enabled,disabled,resolveRagContext,assert,configPath,json,jsonStringify,writeFileSync,join,tmpDir,async,await,systemPrompt,cwd", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/fileLogger.test.ts:8:54": "typescript,it,test,fileLogger,appendDebugLog,readFileSync,assert.match,rmSync,mkdtempSync,existsSync,log,level,set,scope,message,error,file,open,type,catch,try,fail,match,content,write,replace,logFilePath,tmpdir,recursive,force", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/chunker/javascript.test.ts:5:101": "lines 5-101, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/runtime-overrides.test.ts:14:47": "typescript,it,test,typescript-function,variables,tmpdir,join,Date.now,mkdirs,recursive,unlinkSync,try-catch,assert,deepStrictEqual,JSON.stringify,writeFileSync,utf-8,json,parsing,corrupt,file,retrieval,topK,object,empty", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/runtime-overrides.test.ts:49:148": "typescript,it,test,files,write,content,assertions,merge,override,tmpdir,json,file,tmpdir,recursive,ignore,remove,includes,contains,save,load,path,key,value,assertEqual,boolean,number,string,enabled,model,provider,baseUrl,autoIndex,debounceMs,enabled,openai,nomic-embed-text,openai,test,11434,8080,localhost,small,enabled,disabled,json,file,tmpdir,recursive,ignore,remove,includes,contains,assertOk,assertEqual,assertMatch,assertEqual,openCode,RAG,runtimeOverrides", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/runtime-overrides.test.ts:149:149": "File:C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\core\\runtime-overrides.test.ts, Language:typescript, Line:149-Length:149", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/runtime-overrides.test.ts:151:250": "typescript,assert,deepStrictEqual,it,label,overrides,provider,model,baseUrl,enabled,watcher,keywordWeight,autoIndex,description,ragConfig,applyRuntimeOverrides,DEFAULT_CONFIG,assertEqual,custom.api.com,v1,git,openai,gpt-4o-mini,https://api.openai.com/v1", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/runtime-overrides.test.ts:251:307": "typescript,itests,file,path,CreatedWithPostEditor,test,functionality,assertion,applyRuntimeOverrides,label,overrides,config,object,properties,retrieval,openCode,description,undefined,debounceMs,disabled,topK,minScore", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/context-optimizer.ts:8:19": "interface, ContextOptimizationConfig, enabled, maxPerFile, mergeAdjacent, adjacentGapThreshold, similarityThreshold, jaccard, typescript, configuration, optimization, file, chunks, line, gap, threshold, context, optimization", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/context-optimizer.ts:22:27": "interface, ContextOptimizationOptions, target, number, topK, optimization, configuration, config, ContextOptimizationConfig", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/context-optimizer.ts:49:51": "function,toOptimized,searchResult,optimizedSearchResult,returns,includes,chunk,score,explanation", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/context-optimizer.ts:56:66": "typescript,function,jaccardSimilarity,strings,tokens,set,intersection,size,union,calculate,divide,probability", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/context-optimizer.ts:75:124": "function, mergeAdjacentChunks, results, SearchResult[], gapThreshold, OptimizedSearchResult[], sort, metadata, startLine, sorted, optimized, toOptimized, chunks, content, description, metadata, endLine, sourceIds, mergedChunk, joined, score, filter, max, push, Array, length, Boolean, if, else", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/context-optimizer.ts:133:174": "typescript,function,dedupeSimilar,threshold,OptimizedSearchResult,chunk,content,jaccardSimilarity,score,dedupedFrom,splice,while,break,optimized,lodash,spread,keyword,typescript-function,optimization,de-duping,search-result", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/context-optimizer.ts:188:254": "optimizeContext, TypeScript, mergeAdjacent, dedupeSimilar, scoreSort, maxPerFile, topK, fileCapped", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/description-stage.test.ts:6:19": "function, makeChunk, partial, Chunk, id, overrides, undefined, \"chunk-1\", content, export, function, hello, return, world, metadata, filePath, startLine, endLine, language, overrides, metadata, {...}, ..., overrides, keywordDSL, TypeScript, src, helloTS", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/description-stage.test.ts:23:122": "typescript,chunk,describe,test,async,await,it,generateDescriptions,noopLogger,assert,makeChunk,descriptionMap,generateBatchDescriptions,forEach,describer,pre-doc,undoc,generateDescription,maps", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/description-stage.test.ts:123:181": "typescript,test,asyncAwait,it,assert,generateDescriptions,descriptionMap,failures,provider,makeChunk,noopLogger,describe,chunks,throws,error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/embedBatch.test.ts:6:22": "File: mockEmbedder.ts, Language: TypeScript, Lines: 6-22, Function: mockEmbedder, Keywords:mock, EmbeddingProvider, calls, lastBatchSizes, embed, texts, Promise, number, array, state, calls++, push, texts.length, return, [state.calls * 100 + i]", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/embedBatch.test.ts:24:101": "mockEmbedder,it,returns,empty,array,async,await,deepStrictEqual,assert,embedBatch,batchSize,texts,lastBatchSizes,call,mock,items,batches,customBatchSize,flattenedResults,batchedData,ItWorksAsExpected,edgeCaseHandling", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/factory.test.ts:7:16": "function, makeConfig, overrides, Partial, RagConfig, DEFAULT_CONFIG, extends, embedding, DEFAULT_CONFIG, embedding, extends", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/factory.test.ts:18:104": "typescript,it,test,file,CreatedWith,TSJest,itx,module,config,provider,assertEqual,throws,message,unknown,embedding,apiKey,baseUrl,model,proxy,createEmbedder,ollama,OpenAI,custom", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/health.test.ts:7:30": "function, baseConfig, overrides, Partial, RagConfig, embedding, provider, baseUrl, model, timeoutMs, indexing, includeExtensions, excludeDirs, chunkOverlap, concurrency, embedBatchSize, vectorStore, path, retrieval, topK, minScore, openCode, enabled, maxContextChunks, tui, fileListKeybinding, chunksKeybinding, logging, level, logFilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/health.test.ts:32:52": "function,startMockServer,Promises,newPromise,resolve,createServer,server,address,port,listen,Error,throw,typeof,object,object,null,failed,to,start,server,port,0,\"127.0.0.1\",bind,end,data,chunk,String,unknown as", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/health.test.ts:54:153": "missing,status,error,timeout,url,callCount,provider,type,systemPrompt,enabled,description,model,test,ok,embeddings,requests,connections,prompt,content,close,assert,await,JSON,server,port,startMockServer,baseUrl,baseConfig,includes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/health.test.ts:154:253": "typescript, mock-server, test, chai, assert, Ollama, description, embedding, health-check, image-description, server-close, setTimeout, callCount, baseUrl, port, provider, enabled, status, it, describe, timeoutMs, systemPrompt, model, missing, promise, await, try, finally", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/health.test.ts:254:353": "it,test,typescript,describe,async/await,assert,e2e,test.ts,files,CSS,server,startMockServer,json,end,openai,provider,status,model,vision-model,baseUrl,timeoutMs,prompt,port,baseConfig,close,Promise,res,ok,mock,endpoint,data,invalid,key", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/health.test.ts:354:453": "typescript,test,provider,health,check,await,config,assert,endpoint,succeeded,error,message,unknown,provider,baseConfig,startMockServer,port,res,end,json.stringify,close", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/health.test.ts:454:457": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\embedder\\health.test.ts, Language:typescript, Line:454-457, Keywords:assert, ok, results, error, includes, Unknown, provider", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/health.test.ts:459:508": "typescript,it,test,throws,error,pull,model,endpoint,async,await,startMockServer,assert.rejects,pullOllamaModels,progress,line,connection,rejected,failed,assert.ok,assert.equal,Promise,close,modelNotFoundError,ConnectionRefusedError", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/ollama.test.ts:7:106": "it,test,it,typescript,assert,provider,ollama,localhost,api,fetch,baseUrl,trailingslash,model,apiKey,promise,unittest,abortsynchronous,async,rejects,error,createServer,request,data,chunk", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/ollama.test.ts:107:206": "typescript,fetch,receive,data,end,assert,match,server,address,start,test,provider,embed,it,listen,port,close,file,snippet,createServer,globalThis,async,await,try,catch,throw,embedding,originalFetch,locations,keywords,arrays,methods,urls,contentTypes,post,request,response,origins,connections,proxies,redirects,keywordMatchers,embeddedData", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/ollama.test.ts:207:227": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\embedder,Ollama.test.ts,Lines,207-227,TypeScript,Object,Promise,server,test,listen,address,port,localhost,resolve,Error,assert.deepEqual,p,qwen2.5:3b,await,finally,close,globalThis,fetch,originalFetch,destroyAllPooledConnections", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/openai.test.ts:6:105": "typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\embedder\\openai.test.ts, keywords, test, OpenAIProvider, assert, it, baseUrl, apiKey, fetch, Promise, Error, AbortError, once, signal", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/openai.test.ts:106:153": "typescript,it,test,synchronous,request,test-server,openai,test-embeddings,fetch,rejects,setTimeout,async,assert,localhost,server,address,port,end,createServer,Promise,await,try,catch,finally,originalFetch,globalThis,OpenAIProvider,JSON.stringify", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/openai.test.ts:155:175": "typescript,function,promise,available,check,ollama,get,on,error,timeout,destroy,end,data,json,parse,models,true,false", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/embedder/openai.test.ts:177:239": "typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\embedder\\openai.test.ts, before, it, OpenAIProvider, available, OllamaAvailable, embed, assert, array, length, number, dimensional, vectors", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/session-logger.test.ts:10:12": "File,C:\\Daten,Entwicklung,OpenCodeRAG,src,__tests__,eval,session-logger.test.ts,Lines,10-12,typescript,function,makeTmpDir,returns,string,path,join,os,tmpdir,Sync,mkdtempSync,", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/session-logger.test.ts:14:69": "typescript, file, src, tests, eval, session-logger.test, directory, tmpDir, beforeEach, afterEach, SessionEvent, appendSessionEvent, readSessionEvents, listSessionIDs, deleteSession, existsSync, path, assert, deepStrictEqual,.existsSync", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/session-logger.test.ts:71:108": "typescript,it,test,session-event,array,computeSummary,assert.strictEqual,assert.strictEqual,sessions,events,message,count,tokens,input,output,total,cost,steps,model,tool,call,calls,time,context,unique,file,deepStrictEqual,isEmpty,arr,empty,assert.ok,avgResponseTimeMs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/session-logger.test.ts:110:141": "typescript,it,test,function,session,event,logger,tmpDir,create,remove,compare,sessions,delta,assertions,events,timestamps,missing,object,recursion,token,context,helper,tests,append,role", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/session-logger.test.ts:143:242": "typescript,log,message.updated,event,session,logger,test,token,tool,step,fine,tmpDir,rmSync,createSessionLogger,readSessionEvents,assert,properties,events", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/session-logger.test.ts:243:317": "typescript, test, session-logger, createSessionLogger, readSessionEvents, assert.strictEqual, events, event, onRagContext, ragInjected, ragChunkCount, ragContextTokens, session.created, malformed_events, throws", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/integration.test.ts:5:8": "typescript,function,isOpencodeAvailable,spawnSync,opencode,version,boolean,encoding,shell,processExitStatus,exists,test,module,tests,testfile,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\integration.test.ts,lines5-8", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/integration.test.ts:10:41": "it,starts,test,CI,isOpencodeAvailable,sync,spawn,promise,typescript,encoding,timeout,cwd,shell,assert,exit,stdout,stderr,output,loglevel,error,process", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/images/TestFile.png:1:1": "[image] [png] [src/__tests__/mcp/images/TestFile.png] smiley face, yellow, happy, light bulb, blurred, simple, cheerful, modern, abstract, cartoon, round, bright", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:10:23": "function, makeChunk, partial, Chunk, returns, id, \"chunk-1\", content, \"export function hello() { return 'world'; }\", metadata, filePath, \"src/hello.ts\", startLine, 1, endLine, 3, language, \"typescript\", overrides, keyword, \".\", cascade, extends", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:25:37": "function, makeConfig, Partial, DescriptionConfig, {}, return, enabled, true, provider, \"ollama\", baseUrl, \"http://127.00.0.1:11434/api\", model, \"test-model\", timeoutMs, 5000, systemPrompt, \"Describe the code.\", retryMax, 0, retryBaseDelayMs, 10, ..., overrides, {}", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:39:67": "createServer, data, end, handler, JSON, listen, newPromise, open, promise, resolve, req, res, typeof, typeofaddr, useTypes, void, writHead, JSON.stringify", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:69:168": "it,test,typescript,language,directory,CSS,FilesystemPath,mock_server,start,assert,await,async,provider,give,config,message,role,content,file_path,metadata,description,include,use,custom,prompt,test_cases,generate,setup,teardown,tests", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:169:268": "typescript,it,test,code,capture,body,status,message,content,provider,new,LlmDescriptionProvider,generateDescription,assert,rejects,startMockServer,await,close,url,baseUrl,chunk,endpoint,throws,error,config,prompt,mock,assertion,role,content,empty,response,HTTP,status,500,message,error,intercept,return,async,finally", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:269:300": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\describer\\describer.test.ts,LanguagescriptTypeScript,Lines269-300,Assertion,asyncAwait,MockServer,startStopMocks,assertEqual,tryFinally,LLMProvider,newOperator", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:302:387": "typescript,it,test,function,startMockServer,async,await,new,LlmDescriptionProvider,makeConfig,assert,Array,equals,generateBatchDescriptions,describer,test,describe,files,requests,mocks,descriptions,chunkIds,fails,callIndices,metadata,locations,languages,errorLogs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:389:396": "typescript,it,xception,test,assert,ok,typeof,createDescriptionProvider,makeConfig,generateDescription,generateBatchDescriptions,return,instanceof", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:398:497": "typescript,itests,retry,tested,function,async,await,startMockServer,LlmDescriptionProvider,makeConfig,assert.equal,assert.rejects,usefixtures,fixture,retries,testcases,errorhandling,keywordtesting,codeexample,stubbing,unittesting", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/describer/describer.test.ts:498:537": "typescript,it,test,function,await,rejects,assert,equals,try,catch,finally,new,LlmDescriptionProvider,startMockServer,callCount,baseUrl,makeConfig,makeChunk,close,503,429,rate%20limited", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/describe-image.test.ts:11:15": "type, toolResult, string, object, properties, optional, metadata, record, title, output", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/describe-image.test.ts:19:23": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\opencode\\describe-image.test.ts, Language:typescript, Lines:19-23, Keywords:function, makeFakeVisionProvider, ImageVisionProvider, async, describeImage, TEST_DESCRIPTION", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/describe-image.test.ts:25:43": "function, makeConfigWithImageDesc, overrides, Partial, RagConfig, DEFAULT_CONFIG, embedding, retrieval, imageDescription, enabled, provider, model, baseUrl, timeoutMs, prompt, resizeMaxDimension, override, TypeScript, line25-43", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/describe-image.test.ts:45:48": "typescript,function,assert,notEqual,typeof,assign,exclude,typecast,nonNullable", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/describe-image.test.ts:53:152": "file, TypeScript, directory, tempfile, mkdtempSync, path_join, writeFileSync, rmSync, describe-image-test, image-desc, fake-vision-provider, Object-as, ImageDescriptionCfg, tool-create, filePath, file-path, output-match, error-metadata, unsupported-extension, disabled, absolute-file-path", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/describe-image.test.ts:153:164": "typescript,it,creates,test,image,provider,inject,fallback,config,execute,tool,assert,describe,tmpDir,worktree,imageDesc,create", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/read-format.test.ts:6:23": "function, makeResult, returns, SearchResult, id, string, filePath, number, startLine, endLine, language, string, content, score, metadata, object, filePath, startLine, endLine, language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/read-format.test.ts:25:124": "typescript, file-path, retrieval-query, line-numbers, scores, code-fences, language-metadata, assert.match, chunk-1, chunk-2, chunk-3", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/read-format.test.ts:125:203": "const,output,assert,it,formatReadOutput,makeResult,retrievalQuery,maxChunks,maxChars,chunk,count,truncation,notice,returned,header,includes,assert.match,assert.doesNotMatch,typescript,largeContent,manyResults,python,content,OpenCodeRAG,test,file", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/read-query.test.ts:5:78": "typescript,it,test,assertions,query,buildReadQuery,filePath,startLine,endLine,lineRange,incremental,indexing,function,focus,includes,match,deterministic,output,assert.equal,different,graceful,empty,whitespace,implementation,lines,code,chunks,return,assert.doesNotMatch", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/tool-args.test.ts:6:8": "File:C_\\Daten_Entwicklung_OpenCodeRAG_src__tests__opencode_tool-args.test.ts,Lines:6-8,Language:Typescript,function(resolve,p_str):string{return_path_resolve(p_str).replace(/\\//g,\\\");}", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/tool-args.test.ts:10:109": "filePath,path,absolutePath,startLine,endLine,offset,limit,query,reason,assert.throws", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/tool-args.test.ts:110:136": "typescript,itests,assertThrows,normalizeReadArgs,startLine,endLine,offset,throws,error,message", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/tool-args.test.ts:138:182": "typescript,it,test,resolveWorkspacePath,assert,resolve,absolute,path,resolution,worktree,relative,traversal,parent,throws,error,message,rejects,assert.equal,fuzziness:2", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/context-optimizer.test.ts:6:23": "function, makeResult, string, number, object, SearchResult, id, filePath, startLine, endLine, content, score, language, typescript, chunk, metadata", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/context-optimizer.test.ts:25:31": "function,defaultOptions,Partial,ContextOptimizationOptions,topK,config,DEFAULT_CONTEXT_OPTIMIZATION,overrides,extends,ObjectSpreadOperators,typescript,25-31", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/context-optimizer.test.ts:33:132": "lines 33-132, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/context-optimizer.test.ts:133:232": "lines 133-232, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/context-optimizer.test.ts:233:332": "optimize-context-test,topK,maxPerFile,fileCapped,empty-input,disabled,optimize,pipeline,merge-dedup-cap,matchedTerms,metadata-explanation,assertions,sequence-execution,edge-cases", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/context-optimizer.test.ts:333:388": "typescript,itests,optimizeContext,makeResult,assert.equal,opt.length,DEFAULT_CONTEXT_OPTIMIZATION,defaultOptions,optimizeContext,mergeAdjacent,dedupFrom,optimized,optimized!.mergedFrom,opt.length,chunk.content,indexOf", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/keyword-index.test.ts:9:15": "function, makeChunk, returns, string, type, TypeScript, keyword, identifies, properties, includes, file, line, starts, ends, IDs, contents", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/keyword-index.test.ts:17:90": "typescript,it,tokenize,function,it,splits,on,non-alphanumeric,characters,extracts,camelCase,parts,snake_case,parts,filters,tokens,longer,than,2,characters,returns,unique,tokens,handles,empty,string,handles,code,dots,special,chars,stems,plural,forms,keyword,matching,stems,-ing,suffix,stems,-ed,suffix,preserves,original,tokens", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/keyword-index.test.ts:92:191": "keyword-index,test,typescript,index,chunks,search,retrieve,multiple,chunks,removeByFilePath,assertions,metadata,tokens,filenames,Lines92-191", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/keyword-index.test.ts:192:270": "typescript,chunk,test,index,keyword,add,chunks,search,clear,load,mkdtempSync,assert,save,searchResults,deserialize,exists,graceful,fallback,empty,indexFile,remove", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/watcher/integration.test.ts:15:17": "async,map,texts,length,index,purpose,embed,return,Promise", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/watcher/integration.test.ts:20:22": "File,__tests__,src,OpenCodeRAG,watcher,integration,test,typescript,async,function,makeTempDir,promise,string,fs,mkdtemp,path,join,tmpdir,name", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/watcher/integration.test.ts:24:27": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\watcher\\integration.test.ts,Language,typeScript,Lines,24-27,async,function,writeFile,string,await,fs,mkdir,writeFile,filePath,content,Promise,void,recursive,fs,writeFile", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/watcher/integration.test.ts:29:47": "typescript,function,test,config,RagConfig,default,includeExtensions,excludeDirs,minFileSizeBytes,indexing,openCode,autoIndex,enabled,debounceMs,intervalMs,DEFAULT_CONFIG", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/watcher/integration.test.ts:49:92": "before,after,it,typescript,workspaceDir,storeDir,logFilePath,store,TestEmbedder,makeTempDir,path,fs,rmdir,writeFile,delay,await,indexer,createBackgroundIndexer,testConfig,assertEqual,LanceDbStore,timeout,close,backgroundIndexer", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/vectorstore/factory.test.ts:8:16": "Function, returns, extends, overrides, config, partial, DEFAULT_CONFIG, includes, vectorStore, {...}", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/vectorstore/factory.test.ts:18:75": "it,test,typescript,store,LanceDbStore,InMemoryVectorStore,provider,config,createVectorStore,assert,throws,unknown,UnknownProviderError,addChunks,search,count,deleteByFilePath,clear,metadata,embedding", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/_images/aa_configuration1.png:1:1": "[image] [png] [src/__tests__/_images/aa_configuration1.png] web app, settings, account, validation, server, configuration, interface, security, authentication, login, database, administrative, fields, input, text, box, tab, navigation, software, online, platform, resource, details, info, setup, secure", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/watcher/watcher.test.ts:7:17": "typescript,function,test,config,RagConfig,default,configuration,indexing,file,extensions,directories,exclusion,built-in,properties,minSize", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/watcher/watcher.test.ts:19:42": "typescript,it,test,assert,equality,absolute,path,resolution,ignore,configuration,files,manifest,json,dependencies,workspace,directory,source,testing", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/_images/aa_configuration2.png:1:1": "[image] [png] [src/__tests__/_images/aa_configuration2.png] starlims, administrative, features, feature, license, description, available, codes, signature, user code, request, send, detail, invitation, kessler, register, signature, use code", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/_images/aa_configuration3.png:1:1": "[image] [png] [src/__tests__/_images/aa_configuration3.png] starlims xfd designer, starlims server, new aar report, reports manager, crystal reports, advanced analytics, validation, qm, application, workspace, explorer, applications, features users, xfp forms, e mail main, features, html forms, phone forms, tablet forms, server scripts, client scripts, data sources, table manager, reports manager, results, output, find results, server log, pending checkins, appearance, name, description, node type, version, absolute version, properties, shared home, update connection, data source, ok, cancel", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/_images/aa_configuration4.png:1:1": "[image] [png] [src/__tests__/_images/aa_configuration4.png] Role access, workbook, description, category, aA, cA1, clinical, clinicalsamples, bA4, environmental, resultanalysis, tA1, forensic, grants, resource, recipient, type, item, distribution, collection, controlnumber, copylimit, environment, contact, extract, nextdection, smalltemplate, emailtemplate, grant, research, management, advancedanalytics, management, roleaccess, worksheet", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/_images/aa_configuration5.png:1:1": "[image] [png] [src/__tests__/_images/aa_configuration5.png] Healthcare, patient data, map, statistics, demographics, bar charts, age distribution, result status, medical clinics, average results, infographic, survey, information, healthcare dashboard, medical records, visualization, analysis, risk assessment, summary, health metrics, global health, research, data analysis, interactive, web interface", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/_images/aa_troubleshoot1.png:1:1": "[image] [png] [src/__tests__/_images/aa_troubleshoot1.png] error message, software, event, date, time, url, invalid request, table, resource, message, error, browser, page, technology, communication", + "C:/Daten/Entwicklung/OpenCodeRAG/tailwind.config.js:1:14": "File tailwind.config.js, Language text, Lines 1-14 keywords:\n@type, import, tailwindcss, Config, content, darkMode, class, extend, colors, brand, theme, extendColors, themes, plugins, empty, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/tsconfig.build.json:2:2": "file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\tsconfig.build.json,language,json,lines,1-to-2,extends,./tsconfig.json", + "C:/Daten/Entwicklung/OpenCodeRAG/tsconfig.build.json:3:6": "Json,file_path,C:\\Daten\\Entwicklung\\OpenCodeRAG\\tsconfig.build.json,lines_3-6,json_object,compilerOptions_property,incremental,true,tsBuildInfoFile_property,path_dot_tsbuildinfo", + "C:/Daten/Entwicklung/OpenCodeRAG/tsconfig.build.json:7:7": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\tsconfig.build.json, Language:json, Lines:7-7, Keywords:\"exclude\", [\"node_modules\", \"dist\", \"src/__tests__\"]", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/_images/aa_configuration6.png:1:1": "[image] [png] [src/__tests__/_images/aa_configuration6.png] TAT, missed days, site lab, serology, team, >5 days, STARLIMS, flu, molecular, micro, keywords, bar chart, scientific, data, timeline, research, missing info", + "C:/Daten/Entwicklung/OpenCodeRAG/tsconfig.json:2:19": "JSON, compilerOptions, target, ES2022, module, ESNext, moduleResolution, bundler,esModuleInterop, strict, noUncheckedIndexedAccess, outDir, dist, rootDir, src, declaration, sourceMap, skipLibCheck, isolatedModules, noUnusedLocals, noUnusedParameters", + "C:/Daten/Entwicklung/OpenCodeRAG/tsconfig.json:20:20": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\tsconfig.json,Lines:20-20,Include:[\"src/**/*.ts\",\"src/**/*.d.ts\"]", + "C:/Daten/Entwicklung/OpenCodeRAG/tsconfig.json:21:21": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\tsc config,json,Lines:21-21,JSON,CssKeywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/doc.ts:15:23": "async,function,extract,filePath,string,buffer,Promises,ExtractResult,await,import,docjs,extractDocText,content,try,catch,error,message", + "C:/Daten/Entwicklung/OpenCodeRAG/AGENTS.md:5:6": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\AGENTS.md,Lines:5-6,Language:markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/AGENTS.md:6:16": "File,CODE,Navigation,Skeleton,Search,Usages,Describe,Image,Markdown,Lines", + "C:/Daten/Entwicklung/OpenCodeRAG/AGENTS.md:16:24": "File, C:\\Daten\\Entwicklung\\OpenCodeRAG\\AGENTS.md, markdown, lines, 16-24, Architecture, Entry-points, src/index.ts, OpenCode, plugin-entry.ts, CLI, src/cli.ts, TUI, src/tui.ts, Web, UI, server.ts, Core, modules, src/core/, interfaces, config, manifest, chunker/AST, embedder/Ollama, Cohere, describer/LLM, retriever/vector, keyword, hybrid, vectorstore/LanceDB, opencode/plugin, integration, architecture, doc/architecture.md", + "C:/Daten/Entwicklung/OpenCodeRAG/AGENTS.md:24:33": "npm-install,legacy-peer-deps,LanceDB,type-casting,unknown,CSS-tree-sitter,WASM-only,Parsing-class,Language-top-level,Node-syntaxNode,Plugin-types,@opencode-ai/plugin,local-typescript-plugin,d-ts,Config-loading,loadConfig,deep-merging,CLI-auto-detects,json,Embedding-responses,accepts-number-array,accepts-two-dimensional-array", + "C:/Daten/Entwicklung/OpenCodeRAG/AGENTS.md:33:42": "File,Created,Language,Markdown,Lines,33-42,Keywords,new,create,open,close,destroy,cancel,try,finally,cleanup,process,once,removeListener,bounds,Growth,map,set,signal,parameters,wire,never,prefix,_,AbortSignal,ReadableStream,readers,cancel,releaseLock", + "C:/Daten/Entwicklung/OpenCodeRAG/AGENTS.md:42:49": "npm,test,integration-tests,typecheck,build,tsc,tsconfig,markdown,C:\\Daten\\Entwicklung\\OpenCodeRAG\\AGENTS.md,42-49", + "C:/Daten/Entwicklung/OpenCodeRAG/AGENTS.md:49:52": "file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\AGENTS.md,language,markdown,lines,49-52,command,npm,run,release:patch,bumps,version,builds,test,publishes,tags,dry-run,--dry", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/cli.md:1:100": "CLI, config, help-flag, init-command, index-command, query-command, status-command, force-option, watch-option, top-k-option, language-support, relevance-score, file-path, chunk-description, content-preview, stats-showing, health-check", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/cli.md:101:200": "file,CMD,markdown,language,detection,nodejs,command,line,options,flag,default,value,json,junction,description,indexing,plugins,cli,runtime,setup,clear,list,show,dump,keyword,index,manifest,chunk,opencode,rag", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/cli.md:201:300": "setup,update,npm,installation,junction-links,nodejs,bundle-version,cli,opencode-rag,workspace,index,watching,force,rebuild,semantic-search,top-k,results,status,list,dump,clear,config,eval:sessions,analyze,compare,usage,tokens,context,impact,projection,log", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/cli.md:301:326": "compare, sessions, token-usage, CLI, eval:compare, options, -c, --config, path, output, formatted, comparison, table, delta, percentage, change, metric, evaluation, documentation, programmatically, runCli, import, opencode-rag-plugin/library", + "C:/Daten/Entwicklung/OpenCodeRAG/ReadMe.md:1:100": "lines 1-100, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/ReadMe.md:101:159": "file,CSS,markdown,Lines,101-159,Language,Markdown,Agent,System,Discovery,Skills,Skeleton,Find,Usages,Search,Describe,Image,Read,Edit,Tool,Purpose,When,to,Use,OpenCodeRAG,Integration,System,Prompt,Guidance,RAG,Context,On-Demand,Keybindings,Evaluation,Token,Analysis,Privacy,Security,Licence,MIT", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/postbuild.js:27:36": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\scripts\\postbuild.js,Language,javascript,Lines,27-36,Function,removeSourceMaps,Directory,readdirSync,withFileTypes,true,Entry,name,endsWith,.js.map,UnlinkSync,Synchronous,FileSync,Dir", + "C:/Daten/Entwicklung/OpenCodeRAG/scripts/postinstall-setup.js:1:31": "File,CODE,JavaScript,Postinstall,Setup,Runtime,Error Handling,Node,Npm,Global Installation,Async Import,Conditional Exit,Logging", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/installation.md:1:100": "Node.js, Ollama, OpenCode, installation, prerequisites, bash, setup, plugin, workspace, init, uninstall, tui, GitHub, npm, tree-sitter, gitignore, legacy-peer-deps, version, config, dependencies, skill, vector_store, embeddings, description_model, vision_model, image_description, CLI, installer, quick_install, air_gapped, source_install, contributors, developers", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/installation.md:101:153": "npm-package, init-command, status-command, Ollama-models, opencode-rag-init, opencode-rag-index, opencode-rag-query, npm-install, lscache-status, lsp-enablement, opencode-json-lsp, search-semantic, get-file-skeleton, find-usages, agents-plugin-documents", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/base.ts:26:55": "typescript, class-methods, return-object, set-types, check-string-length, byte-limit-check, create-parser, parse-tree, traverse-tree, map-node-data, uuid-generator, file-metadata-extraction", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/base.ts:57:64": "typescript,private,async,Promise,createParser,setLanguage,new,Parser,await,loadLanguageFromPath,loadLanguage,language,grammarName,wasmFilePath,filePath,return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/base.ts:66:91": "async, chunk, filePath, string, content, Promise, Chunk[], if, trim, length, equals, 0, maxContentBytes, bytes, Buffer, byteLength, utf-8, throws, Error, createParser, parse, walkTree, nodeTypes, AstNode, uuid, leadingDoc, startLine, endLine, language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/factory.ts:97:115": "registerChunker, extensions, fileExtensions, Chunker, registration, consoleWarn, extensionMap, lower, has, set, loop, conditional, typing, TypeScript, function, string[], objectLiteralEnhancement", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/factory.ts:124:132": "getFileExtension, stringLastIndexOf, substring, conditionalCheck, extLowerCase, hasMethod, getFromMap, undefinedSafeAccess, fileLowercase, defaultFallbackFunction, getTypeFromStringPath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/factory.ts:134:136": "File,Created,Type,Language,Typescript,Lines,134-136,Function,getNameRegisteredExtensions,ReturnType,string[],Parameters,none,Implementation,[...extensionMap.keys()],.sort()", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/factory.ts:141:204": "function, splitOversized, chunks, filePath, MAX_CHUNK_LINES, MAX_CHUNK_CHARS, uuid, for, lines, join, push, currentLines, subChunks, lineOffset, if, else, continue, trim, length, greaterThan, lessThanOrEqual", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/factory.ts:207:218": "typescript, function, applyChunkerConfig, Chunker, filePath, maxSvgSizeBytes, options, instanceof, TreeSitterChunker, fileExtension, endsWith, svg, xml, csproj, bytes, content", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/factory.ts:232:256": "typescript, function, async, string, overrideTypes, Set, applyChunkerConfig, chunks, filePath, content, options, maxSvgSizeBytes, treeSitterChunker, fallbackChunker, chunk, nodeTypesOverrides, withNodeTypes, splitOversized, import, filePath, content, nodeTypes, language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/xml.ts:1:23": "file, overview, TreeSitterChunker, import, class, XmlChunker, extends, language, fileExtensions, grammarName, nodeTypes, maxContentBytes, export, singleton, default, constructor, XML, XMLelements, SVG, csproj, text, contentBytes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/index-command.ts:38:52": "function,watches,logger,logs,appendDebugLog,scopes,conditional,console,informational,warning,debug,message,severity,return,typeScript,triggered", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/index-command.ts:63:162": "lines 63-162, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/index-command.ts:163:224": "await, runPass, false, abortController, signal, process, removeListener, SIGINT, SIGTERM, options, watch, await, cleanupContext, ctx, logCliInfo, createWatchPassScheduler, Promise, race, watcher, on, add, change, unlink, unlinkDir, addDir, error, shutdown, process, once, SIGINT, SIGTERM, formatDuration, Date, started, path, resolve, process, cwd, \".opencode\", \"opencode-rag.log\", logCliError, message, err, Error, lowerCase, includes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:16:18": "typescript,function,visionSleep,Promize,toTimeout,ms,milliseconds,keyword,return,new,setTimeout,resolve", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:41:43": "File:image-ts,Lines:41-43,Function:getMimeType,Returns,string,MIME_TYPES,obj,indexOf,toLowerCase,replace,return,imagePNG", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:50:52": "interface,Vision,provider,image,describeImage,args,mimeType,prompt,abortsignal,Promises,typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:67:74": "constructor, ImageDescriptionConfig, baseUrl, replace, timeoutMs, think, numCtx, proxy", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:76:128": "typescript,async-await,for-loop,error-handling,sleep,function-declaration,json-parsing,image-processing,api-request,model-configurations,retry-strategy,vision-retries,base64-images,message-structure,retryable-statuses,promises,url-endpoint,abort-cancellation,proxy-setting,timing,delay-multiplier,timeout-management", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:143:149": "constructor,ImageDescriptionConfig,baseUrl,model,apiKey,timeoutMs,proxy,replace,replaceAll,undefined,??,ms", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:151:208": "async, describeImage, imageBase64, mimeType, prompt, url, baseUrl, model, messages, user, role, text, content, type, json, choices, message, content, response, ok, body, headers, Content-Type, apiKey, Authorization, error, retryable, statuses, attempt, maxTokens, VISION_RETRY_MAX, visionSleep, visionRetryBaseDelayMs, visionRetryMax", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:223:229": "constructor,imageDescriptionConfig,baseUrl,model,apiKey,timeoutMs,proxy,undefinedCheck,replace,trimSuffix,assignment,optionalChaining,parameter", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:231:292": "async, describeImage, imageBase64, mimeType, prompt, abort, Promise, user, type, anthropicVersion, json, responseOk, text, retryableStatuses, sleep, visionRetryDelayMS, error, find, trim, JSON.stringify, throw, lastError", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:307:313": "constructor, typescript, file-path, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\chunker\\image.ts, parameters, ImageDescriptionConfig, baseUrl, replace, removeTrailingSlashes, model, apiKey, timeoutMs, milliseconds, proxy, configuration", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:315:373": "typescript,async,function,describeImage,imageBase64,mimeType,prompt,body,generateContent,url,headers,VISION_RETRYABLE_STATUSES,VISION_RETRY_MAX,VISION_RETRY_BASE_DELAY_MS,visionSleep,postJson,json,candidates,parts,text,timeoutMs,proxy,abort,throwError", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:383:400": "File,image,ts,Lambda,typescript,function,createImageVisionProvider,config,provider,AnthropicImageVisionProvider,GeminiImageVisionProvider,OpenAIImageVisionProvider,OllamaImageVisionProvider,if,throw,error,apiKey", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:412:414": "constructor, extends, image, TypeScript, fileExtensions, initialization", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/image.ts:422:491": "typescript,async-await,chunks,paragraphs,content-split,filters,trims,uuid,MAX_CHUNK_CHARS,MIN_GROUP_CHARS,currentSize,currentGroup,flush,paragraphIndex,filePath,startLine,endLine,image,metadata,split,characters,loops,if-statement,strings,joins,arrays,pushes,dictionary", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/index.ts:1:18": "barrel, re-export, CLI, command, registration, functions, index-command, query, clear, status, list, show, dump, init, ui, mcp, eval, describe-image", + "C:/Daten/Entwicklung/OpenCodeRAG/PLANNING.md:1:69": "lines 1-69, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/PLANNING.md:69:146": "Brainstorming,Future,Enhancements,Query,Expansion,Code,Graph,Awareness,Re-ranking,Layers,Context,Optimization,Permissions,Persistent,Caching,Diversity,Integration,Multimodal,Embeddings,Storage,Memory,Optimization,Multispace,Export,Import,Benchmarks,Validation,Parallel,Summaries,Heuristics", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/troubleshooting.md:1:100": "Troubleshooting,Cause,Fix,OpenCode,plugin,config,module,resolution,Bun,Node.js,auto-discovery,workspace-local,init,regenerate,workspace-local,plugin files,debugging,log,output,common,issues,Fixes,plugins,functions,best-practices,verification,test-force-exit,ReadMe,content,manual-edits,corporate-proxy,SSL,errors,proxy,interference,direct-request,localhost,Ollama,timeouts,lancedb,peer-dependency,npm-install,globals,set,export,Apache-Arrow", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/troubleshooting.md:101:164": "manifest-corruption, description-failures, force-index-command, opencode-rag-plugin, dynamic-import-test, require-test, proxy-auth-header-check, watcher-status-json, index-rebuild-trigger, log-generation-warnings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/setup.ts:16:20": "Interface, SetupOptions, uninstall, force, check", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/setup.ts:22:26": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\cli\\commands\\setup.ts,Lines,22-26,Language,typescript,function,removeIfExists,targetPath,void,if,existsSync,targetPath,rmSync,targetPath,recursive,true,force,true", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/setup.ts:28:40": "typescript, function, checkOpenCodeRunning, try..., execSync, pids, exec, execSyncOptions, encoding, utf8, trim, consoleLog, warn, OpenCode, running, restart, updated, plugin, pgrep, Get-Process, errorAction, silentlyContinue, ForEachObject, timeout, milliseconds", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/setup.ts:42:131": "lines 42-131, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/status.ts:29:53": "checkStaleLock, storePath, logFilePath, path, join, fs.existsSync, fs.readFileSync, JSON.parse, lockPath, process.kill, c.warn, logCliInfo, fs.unlinkSync, try, catch", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/status.ts:64:163": "lines 64-163, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/status.ts:164:175": "typescript,catch,error,message,logFilePath,path,resolve,cleanupContext,status,process,exit,ignore,ignoreNetworkErrors,logCliError,await,try,lines,164-175", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/index.ts:79:91": "typescript,functionality,determine,moduleUrl,realpathSync,argv1,path,replacement,regex,includes,equals,url,endsWith,catch,errorHandling,filesystem,conditions,return,false,true", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/index.ts:128:130": "File:index-ts, Language:typescript, Lines:128-130,function, async, runCli, argument, argv, process, argv, parseAsync, program, await, Promise,void, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/progress.ts:9:29": "function, formatBreadcrumb, stageIdx, failed, string, parts, join, STAGE_LABELS, length, push, greaterThanOrEqual, lessThan, equalTo, break, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/progress.ts:43:45": "constructor, _stream, NodeJS.WriteStream, constructor-parity, console-log, output", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/progress.ts:47:49": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\cli\\progress.ts, Language:typescript, Line-range:47-49, Keywords:setFileCount, number, void, if, console, log, Indexing, files, greater-than, less-than", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/progress.ts:51:55": "File, startFile, label, has, entries, set, console, log, formatBreadcrumb, void", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/progress.ts:57:63": "typescript, function, finishStage, label, entries, set, get, idx, STAGE_LABELS, length, console, log, formatBreadcrumb, increment, breadcrumb, print, string, progress, update, index", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/progress.ts:65:70": "File, progress, TypeScript, language, lines, 65-70, finishFile, label, entries, set, undefined, length, console, log, formatBreadcrumb, STAGE_LABELS", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/progress.ts:72:76": "typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\cli\\progress.ts, method, failFile, add, failed, set, has, label, log, console, string, add, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/progress.ts:78:81": "clear, entries, failed, function, done, method, clear, TypeScript, remove, cleanup", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/reader.ts:23:34": "interface, WorkspaceFile, filePath, normalizedPath, content, hash, isEmpty, isTooSmall, extractionStatus, ok, skipped, failed, extractionError, mtime, size, typescript, file", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/reader.ts:36:40": "interface, Logger, methods, info, warn, debug, void, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/reader.ts:46:94": "async, function, walkFiles, dir, string, readdir, fs, entries, array, for, loop, continue, Set, directory, file, entry, name, path, join, logger, info, warn, directories, files, maxDirs, maxResults, extensions, excludeDirs, excludeFiles, results, Promise, string, lowPriorityLogging", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/reader.ts:96:127": "async,function,dispatchExtraction,filePath,string,BUFFER,type,Buffer,imageVisionProvider,null,imagePrompt,string,resizeMaxDimension,number,PDF_EXTENSIONS,has,lower,pdfExtractor.extract,docxExtractor.extract,docExtractor.extract,excelExtractor.EXCEL_EXTENSIONS.has,lower,fs.readFile,content,string,utf-8,error,catch,Error,message", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/reader.ts:137:236": "file, ts, scanWorkspaceFiles, cwd, config, logger, manifest, filterPaths, set, workspace, files, string, promise, async, function, TypeScript, fileManifest, path, extname, basename, includes, excludes, extension, exclude, dirs, Set, contains, resolve, directories, walk, Files, Date, milliseconds, computed, cache, computeDescriptionConfigHash, fs, stat, mtimeMs, size, read, images, isImageFile, imageExtractor, normalizeFilePath, pLimit, concurrency, minFileSizeBytes, totalFiles, scanConcurrency, completed, imageVisionProvider, imageDescConfigHash", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/reader.ts:237:336": "isBinary, filePath, fs.readFile, Buffer.alloc, descCache, computeFileHash, imageBytesHash, cacheKey, result.content, descriptionCache, imageVisionProvider, imageResizeMaxDimension, dispatchExtraction, completed, totalFiles, files, imageExtractor.isImageFile, imageLimit, textLimit, Promise.all, workspaceFiles, scanStart", + "C:/Daten/Entwicklung/OpenCodeRAG/src/content/reader.ts:337:339": "logger, info, scanComplete, workspaceFiles, secondsProcessed, return, logs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:15:18": "interface, CacheEntry, description, timestamp, createdAt, typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core\\desc-cache.ts, lines, 15-18", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:20:23": "interface,CacheData,version,number,entries,Record,string,CacheEntry,typescript,20-23", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:32:34": "class-constructor, cacheDir, initialize, TypeScript, parameters, file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core\\desc-cache.ts, keyword-detection, lines-32-34", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:37:53": "async, load, Promise, void, if, this, loadPromise, async, path, join, cacheDir, .desc-cache.json, fs, readFile, utf-8, try, catch, JSON.parse, CacheData, version, CACHE_VERSION, entries, dirty, false, return, this", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:56:58": "File:C__DatenEntwicklungOpenCodeRAGsrccoredesc-cachetsLine:56-58, Language:Typescript, KeywordType:get, Return,string|undefined, Parameter:key:string, PropertyAccessor:this.cache.entries[key], Access:typeScriptQuestionMark, AccessProperty:.description", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:61:68": "set,key,description,setCacheEntry,dirty,eviction,maybeEvict,now,timestamp,cache,properties,typescript,object,assign", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:71:78": "setMany,entries,Array,Date,now,cache,entries,dirty,maybeEvict,forEach", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:81:83": "is, keyword, file-path, C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core\\desc-cache.ts, language, TypeScript, method, has, checks, object-property-existence, using, in-operator, cache, entries", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:86:106": "async save, dirty, JSON.stringify, fs.mkdir, fs.writeFile, fs.rename, fs.unlink, promise, recursive, tryCatch, cachePath, tmpPath, cacheDir, await, catch, Promise, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:109:112": "typescript, static, codeKey, content, sha256, hash, hex, string, slice, concatenation, descriptor", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:115:117": "static,imageKey,returns,string,concatenate,hashes,slice,substring,hexdigest,generate,key", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/desc-cache.ts:120:141": "private, maybeEvict, checksLength, MAX_ENTRIES, Date.now, cutoff, entries, keys, createdAt, delete, Object.keys, sort, sorted, oldest, Object.entries, Object.values, i, MAX_AGE_DAYS, days, milliseconds, deleteOldest, iterations", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/version-check.ts:1:7": "interface, UpdateInfo, currentVersion, latestVersion, updateAvailable, releaseUrl, publishedAt, typescript, properties", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/version-check.ts:9:19": "function, compareVersions, takes, two, strings, returns, number, splits, version, numbers, compares, length, undefined, checks", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/version-check.ts:21:57": "async, function, checkForUpdate, currentVersion, UpdateInfo, fetch, response, json, compareVersions, timeout, clearTimeout, signal, latestVersion, tag_name, html_url, published_at, abort, await, try, catch, const, typescript, GitHubAPI, versions, release, latest", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:12:17": "interface, HttpResponseLike, boolean, number, Promise, string, json, T, TypeScript, lines12-17", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:23:26": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\embedder\\http.ts,Lines:23-26,Language:typescript,KeywordInterface,PooledSocket,Socket,tls,TLSocket,setTimeoutReturnType", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:30:32": "Function,poolKey,typeScript,line,30-32,returns,string,concatenation,isHttps,boolean,port,number,host,string,tls,tcp", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:34:46": "function, acquireConnection, host, port, isHttps, poolKey, connectionPool, pop, clearTimeout, socket, destroyed, writable, destroy, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:48:74": "typescript,function,releaseConnection,socket,writable,destroyed,poolKey,get,set,MAX_POOL_SIZE,IDLE_TIMEOUT_MS,findIndex,splice,removeAllListeners", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:77:85": "destroyAllPooledConnections,connectionPool,values,for...of,pool.entries,clearTimeout,socket.destroy,clear,forEach,destructuring,destructuring-assignment,timeout,cleared,connectionsDestroyed", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:97:105": "typescript,function,isLocalhost,hostname,toLowerCase,equals,localhost,normalized,equalsIgnoreCase,returns,boolean", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:108:114": "typescript,function,parseNoProxyList,params,string[],if,striptrue,map,lowercase,filtervalues,lengthgreaterzero", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:126:140": "typescript,function,matchesNoProxy,hostname,noProxy,patterns,isLocalhost,toLowerCase,startsWith,endsWith,normalize,regex,localhost,domain,comparison,simple,match,exists,indexOf,return,false", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:143:149": "typescript, function, buildProxyAuthHeader, ProxyConfig, username, password, Buffer, toString, base64, Basic, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:152:164": "applyProxyEnv, function, ProxyConfig, returns, object, httpProxy, httpsProxy, processEnv, url, ifNotNull, assignment, existenceCheck, nullReturn", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:177:185": "function,directRequest,url,body,headers,timeoutMs,redirectCount,promise,HttpResponseLike,sendRawHttpRequest,raw,request,HTTP,method,URL,arguments,async,Promise,return,implementation", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:190:209": "function, buildRequestPayload, unknown, headers, URL, JSON.stringify, Host, Connection, Content-Type, Content-Length, Object.entries, map, requestHeaders, headerLines, join, Buffer, byteLength, pathname, search, HTTP/1.1, POST, utf8", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:212:227": "function,parseline,function,parseHeaderLines,typescript,lines,splits,trims,indexOf,contains,lowercase,assign,map,return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:230:260": "decodeChunkedBody,Buffer,chunks,sizeLine,endOffset,CRLF,slice,Number.isFinite,concat", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:263:290": "typescript,function,parsing,response,buffers,status,line,headers,body,decodeChunkedBody,parseHeaderLines,indexOf,includes,parseInt,isFinite,slice,exec,match,split,toString,concat,Buffer,createReadStream,readFile,streamToArray,transform,encoding,decodeURIComponent,regex,replace,URLSearchParams,fetch,Promise,async,await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:293:392": "async, sendRawHttpRequest, URL, unknown, Record, string, number, Promise, Buffer, buildRequestPayload, acquireConnection, net.Socket, tls.TLSSocket, setTimeout, clearTimeout, releaseConnection, url, hostname, port, protocol, isHttps, expectedBodyLength, isChunked, responseConnectionClose, headerEndIndex, lines, content-length, transfer-encoding, connection, setContentLength, setTransferEncoding, setResponseConnectionClose, Buffer.concat, Buffer.from, trim, toString, includes, slice, length, ascii, close, lowercase", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:393:468": "typescript,socket,on,data,end,error,settle,resolved,rejected,parseResponse,url,redirectHttpRequest,buffer,tls,net,await,async,JSON,concat,toString,length,resolve,fetchRawHttpRequest,releaseOrDestroy,setTimeout,connect,write,headers,location,bufferToString,rawHttpRequest,pooled,isHttps", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:484:501": "URL, URLSearchParams, isLocalhost, matchesNoProxy, bypassProxy, directRequest, postJsonViaFetch, fetch, unknown, Record, hostname, ProxyConfig, AbortSignal, promises, promise, function, asynchronous", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/http.ts:504:557": "async, function, postJsonViaFetch, urlString, body, headers, timeoutMs, proxy, ProxyConfig, signal, buildProxyAuthHeader, applyProxyEnv, process, envOverride, HTTP_PROXY, HTTPS_PROXY, clearTimeout, signal, abort, finally, once, removeEventListener, JSON.stringify", + "C:/Daten/Entwicklung/OpenCodeRAG/src/index.ts:1:42": "file,index.ts,export,chunker,embedder,vectorstore,retriever,describer,factory,context-optimizer,config,watcher,indexer,image,chunker,image-vision-provider,mimetype,supported,extensions,search,index,getcontext,validateConfig,scanWorkspace,getIndexStatusSummary,RagConfig,DescriptionConfig,ImageDescriptionConfig,ContextOptimizationConfig,ContextOptimizationOptions,Chunk,SearchResult,OptimizedSearchResult,Chunker,DescriptionProvider,EmbeddingProvider,VectorStore,ragPlugin,id,server,default,OpenCodeRAG", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:9:20": "interface, HealthCheckResult, provider, model, type, embedding, description, image_description, status, ok, missing, error, humanReadableErrorMessage, undefined, TypeScript, lines9-20", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:26:42": "async,function,checkProviderHealth,Promises,healthCheckResult,embedding,model,description,imageDescription,timeoutMs,enabled,Promise,all", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:45:61": "async, function, checkEmbeddingModel, RagConfig, config, embedding, provider, baseUrl, model, apiKey, timeoutMs, HealthCheckResult, Promise, isOpenAiCompatible, openai, ollama, cohere, unknown, error, type, status", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:64:86": "async,function,checkDescriptionModel,config,typeScript,Promises,healthCheckResult,desc,model,status,error,provider,baseUrl,model,apiKey,timeoutMs,descTimeout,checkOllamaChat,checkAnthropicChat,checkGoogleChat,checkOpenAiChat,if-statement,else-fi‌st_statement", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:89:111": "async,function,checkImageDescriptionModel,config,type,RagConfig,Promise,HealthCheckResult,provider,model,status,error,ollama,Anthropic,google,OpenAI,baseUrl,timeoutMs,imageTimeout,proxy,checkOllamaChat,checkAnthropicChat,checkGoogleChat,checkOpenAiChat", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:114:117": "Set, has, openaiCompatible, provider, hasOwnProperty, isOpenAiCompatible, string, TypeScript, function, Set, contains", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:122:155": "async, function, checkOllamaEmbed, baseUrl, string, model, timeoutMs, HealthCheckResult, provider, ollama, embedding, url, postJson, response, ok, modelNotFoundError, isModelNotFoundError, body, isConnectionError, connectionError, error, msg, status", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:158:192": "async, function, checkOllamaChat, baseUrl, model, timeoutMs, proxy, try, catch, postJson, response, ok, body, isModelNotFoundError, isConnectionError, type, provider, status, error, messages, role, connection, running, slice, string, message", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:200:232": "async, function, checkOpenAiEmbed, baseUrl, string, apiKey, undefined, if, string, replace, not, empty, apiKey, condition, try, catch, fetch, headers, Authorization, Bearer, signal, AbortSignal, timeout, Math, min, response, ok, status, 401, 403, await, text, body, slice, error, provider, model, type, status, HTTP, message", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:235:268": "async, function, checkOpenAiChat, TypeScript, apiKey, baseUrl, model, fetch, Authorization, response, ok, status, 401, 403, signal, AbortSignal, timeout, error, HTTP, body, slice, message, config, provider, type, status", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:273:304": "typescript,async-await,function,checkCohereEmbed,url,postJson,response,text,body,ok,status,error,message,authorization,apiKey,timeouts,proxy,cohere,model,provider,type,status,healthCheckResult,try-catch,return,statusCode,embed,HttpError,Promise,import,extracted,healthCheckResult", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:309:351": "async, function, checkAnthropicChat, typescript, baseUrl, model, apiKey, timeoutMs, fetch, response, ok, status, 401, 403, signal, AbortSignal, timeout, provider, error, json.stringify, role, content, HTTP, body, message, slice", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:356:392": "async,function,checkGoogleChat,baseUrl,model,apiKey,type,Promise,HealthCheckResult,fetch,response,ok,401,403,signal,AbortSignal,timeout,status,error,message,JSON.stringify,parts,text,parts,text,200,slice,String,Error,proxy-usage:pbcl5-zz5fkd4yfojq7gq15jtypv69k9t", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:397:404": "interface,PullModelEntry,model,baseUrl,proxy,typescript,397-404", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:410:495": "async, function, pullOllamaModels, models, onProgress, Promise, void, PullModelEntry[], typescript, asyncController, fetch, response, timeout, clearTimeout, TextDecoder, reader, done, value, buffer, JSON, parse, await, catch, Error, statusCode, status, pct, totalMb, entry, model, line, signal, body, pullUrl, baseUrl, method, headers, JSONStringify, content, type, contentType, body, empty, response, signal, abort, controller, signal, onProgress", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:500:507": "typescript, function, isModelNotFoundError, string, includes, boolean, model, notFound, doesNotExists, available, lowercase, conditionals, keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/embedder/health.ts:510:517": "typescript, function, isConnectionError, error-checking, message-lowercase, includes, connection-refused, econnrefused, connect-error, conditional-return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:32:72": "interface,RAGConfig,vectorStore,embedder,force,logger,keywordIndex,descriptionProvider,progress,abortSignal,dimension,filterPaths,deletedPaths,imageVisionProvider,typescript,Cwd,storePath,RunIndexPassOptions", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:75:79": "interface, Logger, interfaceLogger, info, warning, log, debug, message, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:81:87": "createLogger, function, returns, object, includes, info, warn, debug, logger, partial, properties, undefined, calls", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:89:100": "typescript,function,tryUpdateLastGitCommit,checkRepoRoot,getRepoRoot,currentCommit,getCurrentCommit,manifest,lastGitCommit,setManifestProperty,catchException", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:105:112": "isPidAlive, function, checks, alive, process, kill, throws, exception, returns, boolean", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:122:151": "async,function,logger,createLogger,path,join,fs,readFile,writeFile,catch,await,JSON.parse,JSON.stringify,isPidAlive,process,pid,Date,unlink,lockFile,try,finally,lockMaxAgeMs,lockPath,LOCK_FILE,LOCK_MAX_AGE_MS,runIndexPassInner,createIndexStats,options,logger,Infinity,Lock,process", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:153:252": "lines 153-252, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:253:352": "lines 253-352, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:353:452": "typescript,indexer,pipeline,files,map,async,function,promise,logger,delayed,descriptions,maxContentChars,chunk,replacement,contentLength,descriptionCache,cached,entries,generateBatchDescriptions,paths,hashes,buildFallbackDescription,fallbackDescriptions,options,stage,progress,preparation,manifest,files,concurrency", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:453:552": "lines 453-552, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:553:652": "typescript,embedder,embedding,error-handling,promise,logging,storing,manifest-updating,worker-processing,progress-tracking,rebuild-check,directory-swapping,timestamp-update,store-closure,aborted-checks", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:653:696": "File,indexer,pipeline,typescript,store,reopen,logger,debug,catch,fs,rm,manifest,schema,save,cache,count,try,finally,totalChunks,aborted,state,chunks,keywordIndex,description", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:698:734": "typescript, function, aggregateStats, IndexRunStats, WorkerResult, results, loop, isEmpty, isRemoved, skippedEmptyFiles, removedFiles, isTooSmall, skippedSmallFiles, unchangedFiles, modifiedFiles, newFiles, totalChunks, batchesFlushed, descriptionFailedFiles, chunkCount, descriptionFailed", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/pipeline.ts:749:819": "async, function, getIndexStatusSummary, cwd, storePath, RagConfig, store, loadManifest, manifest, count, skipScan, workspaceFiles, scanWorkspaceFiles, Set, normalizedPath, isEmpty, isTooSmall, pendingFiles, upToDateFiles, manifestExpectedChunks, reduce, Object.keys, entries, chunkCount", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/worker.ts:20:47": "interface, WorkerResult, canonicalPath, normalizedPath, contentHash, hash, fileLabel, fileLabel, isNew, isModified, isUnchanged, isEmpty, isTooSmall, isRemoved, chunkCount, hadChunks, descriptionFailed, descHash", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/worker.ts:50:77": "interface, PreparedFile, canonicalPath, contentHash, humanLabel, modifiedFlag, earlyResultWorker, chunksArray, textEmbedTexts, failedDescription, relativePath, embeddingPrefix, metadataHeaderString, documentPrefix, imageCheck, descriptionConfigHash", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/worker.ts:91:112": "buildTextsToEmbed, chunks, relPath, metaHeader, docPrefix, isImage, textToEmbed, description, content, trim, push, for loop", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/worker.ts:114:118": "interface, Logger, info, warning, warn, message, void, debug, TypeScript, lines, 114-118", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/worker.ts:120:125": "interface, ManifestFile, hash, chunkCount, indexedAt, descHash", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/worker.ts:148:247": "file,indexer,worker,typescript,function,prepareFile,WorkspaceFile,ManifestFile,chunking,chunks,image,fileLabel,uuid,path,logger,async,await,isModified,isImageFile,previous,chunksLength,normalizePath,hash,directory,fileContent,description,maxContentChars,config,embedding,indexing,descHash,deferDescriptions,removeDuplicates,unchanged,tooSmall,isEmpty,hadChunks,earlyResult,normalizedPath,filePath,language,contentType,error,chunk,deserialization,keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/worker.ts:248:315": "File,indexer,worker,typescript,logger,debug,chunks,length,keywordIndex,addChunks,config,embedding,documentPrefix,path,relative,cwd,file,filePath,replace,isImage,isModified,buildFileMetadataHeader,buildFallbackDescription,generateDescriptions,descriptionMap,failures,batchDesc,textToEmbed,buildTextsToEmbed,normalizedPath,hash,fileLabel,isModified,chunks,descHash,logger,debug,deferDescriptions,isImageFile,buildTextsToEmbed,fallbackDescription,descriptionProvider,maxContentChars,descriptions,embed,buildTextsToEmbed,relPath,metaHeader,docPrefix,normalizePath,filePath,logger,log,descriptionFailed,exists,buildFallbackDescription", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/worker.ts:327:370": "async, function, storeFileChunks, PreparedFile, embeddings, VectorStore, Logger, chunks, textToEmbed, embedding, addChunks, normalizedPath, hash, chunkCount, fileLabel, isNew, isModified, isUnchanged, isEmpty, isTooSmall, isRemoved, validChunks, length, await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/worker.ts:388:436": "async, function, processFile, WorkspaceFile, cwd, previous, ManifestFile, undefined, async, await, prepareFile, embedBatch, embeddings, storeFileChunks, err, logger, warn, fileLabel, Error, message, normalizedPath, hash, chunkCount, isNew, isModified, isUnchanged, isEmpty, isTooSmall, isRemoved, descriptionFailed", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/server.ts:23:30": "interface, McpServerOptions, configPath, string, cwd, working, directory, resolve, paths, custom, transport, defaults, stdio", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/server.ts:33:38": "interface, RagMcpInstance, MCP, server, underlying, gracefully, close, promise, void, resources, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/server.ts:41:140": "async, createMcpServer, McpServer, server, tool, SearchSemanticParams, FileSkeletonParams, FindUsagesParams, DescribeImageParams, cwd, process, embedder, store, keywordIndex, handleSearchSemantic, handleFileSkeleton, handleFindUsages, handleDescribeImage, ctx, options, z, string, number, error, topK, filePath, file", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/server.ts:141:154": "typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\mcp\\server.ts, line, 141-154, transport, options, StdioServerTransport, await, server, connect, close, await, ctx, store, close, ctx, keywordIndex, close", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:33:36": "interface,SkeletonConfig,grammarName,nodeTypes,array,typescript,lines,33-36,definition,typesafe,object,model,codesnippet", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:80:83": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\opencode,tools.ts,Lines,80-83,function,getExtension,path,file,typeScript,keyword,dot,lastIndexOf,toLowerCase,slice", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:88:91": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\opencode\\tools.ts,Lines,88-91,language,typescript,functionality,resolvesFilePath,isAbsolute,resolve", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:97:149": "async,function,extractSkeleton,content,string,ext,PROMISE,array,type,skeleton,configs,regex,patterns,line,count,file,lines,last,fallback,set,key,tree,sitter,parser,language,walkTree,astNode,types,nodeTypes,text,text,type,text,startLine,endLine,delete,delete,map,setType,setName,extractNodeName,content,assign,await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:155:177": "function, extractNodeName, string, text, nodeType, match, keywords, Set, keywordSet, has, arrow, method, class, interface, type, enum, struct, trait, impl, def, fun, fn, return, firstLine, split, line, length, slice, charLength", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:182:201": "formatSkeleton,items,type,name,startLine,endLine,depth,indent,lineRange,item.startLine,item.endLine,typeIcon,join,lines,string,concat,repeat,repeat,replace,return,String", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:203:213": "function,typeIcon,includes,return,if,◇,ƒ,§,τ,⊞,#,¶,·", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:220:222": "interface, FileSkeletonToolOptions, defines, properties, worktree, TypeScript, line, 220-222", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:231:286": "File,skeleton,tool,options,execute,args,resolveFilePath,readFileSync,getExtension,extractSkeleton,map,entries,join,Error,message,String,error,title,output,formatSkeleton,metadata,filePath,elements,type,skeleton,toolDefinition,typescript,function,async,await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:293:299": "interface, FindUsagesToolOptions, VectorStore, EmbeddingProvider, RagConfig, KeywordIndex, RetrieveFn, TypeScript, Options Interface", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:318:322": "interface, DescribeImageToolOptions, worktree, config, RagConfig, imagevisionprovider, undefined, interface-definition, typescript, file-location, src, opencode, tools-ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:334:415": "file,type,gts,typescript,lines334-415,tool,definition,image,description,vision,model,provider,image,mimeType,resize,execute,args,output,metadata,catch,resolve,fallback,imports,utils,functions,schema,string,min,has,await,import,fs,path,extends,class,keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:428:527": "typescript,find-usages-tool,options,extractUsageLines,symbol,content,context,regex,pattern,escapeRegex,searchViaKeywordIndex,searchViaVectorStore,toolDefinition,args,topK,execute,Set,mergeResults,results,keywordIndex,embedding,store,embedder,command,line,symbolName,snippet,usage,indexing,findUSagesTool,lines,embeddedCode,usages", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:528:627": "typescript, extractUsageLines, find_usages, symbolName, usageGroups, fileGroups, chunk, regex, Map, extractUsageLines, Symbol, lineNumbers, usages, context, filePath, language, files, sortedOutputs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/tools.ts:628:642": "catch,error,message,instanceof,String,return,title,output,metadata,symbolName,tool,search,fail,metadataKey,toolValue,handleError,extractMetadata,usageSearchFailed", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:21:23": "File,indexer,test,typescript,async,function,map,text,length,index,embed,return,arrays,purpose,could-be-query-or-document", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:26:28": "File,indexer,test,ts,makeTempDir,function,Promises,typeScript,os,tmpdir,fs,mdktmp,keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:30:33": "File,C:\\Daten,Entwicklung,OpenCodeRAG,src,__tests__,indexer,indexer.test.ts,async,function,writeFile,filePath,content,Promise,void,await,fs,mkdir,path.dirname,recursive,await,fs.writeFile,utf-8", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:35:45": "typescript, function, testConfig, RagConfig, DEFAULT_CONFIG, indexing, includeExtensions, excludeDirs, minFileSizeBytes, 0, return, {...}, {...}, , , , , , , , , , , , ,", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:47:146": "file,indexer,test,typescript,workspaceDir,storeDir,store,LanceDbStore,TestEmbedder,beforeEach,makeTempDir,writeFile,runIndexPass,loadManifest,assert,e2e测试,文件操作,类型检查", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:147:246": "file,test,indexer,test.test.ts,it,sizes,config,writeFile,runIndexPass,assert,manifest,status,files,count,rebuilds,store,pending,summary,missing,workspaceDir,storeDir,testConfig,normalizeFilePath,embedder,normalize", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:247:346": "typescript,itests,indexer,testConfig,fs.unlink,await,runIndexPass,delay,assert.equal,createWatchPassScheduler,async-await,scheduler.notifyChange,await-delay,describe,context,writeFile,Map,string,set,async-Promise,async-DescriptionProvider,generateDescription,chunk-metadata-filePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:347:446": "typescript,assertEqual,runIndexPass,testConfig,it,writeFile,asyncAwait,embed,texts,files,assertOk,embeddedTexts,filePath,storePath,storeDir,workspaceDir,chunks,descProvider,descriptionProvider,chunk,trackingEmbedder,embeddingProvider,desc,generateBatchDescriptions,generateDescription,embeddedText,csv", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:447:546": "typescript,it,s TypeScript,test,directory,writeFile,async,Promise,Map,assert,embed,texts,pass,cwd,workspaceDir,storeDir,store,config,descriptionProvider,runIndexPass,embeddingProvider,filePath,assertok,description,function,descriptionFailed,manifest,failing", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:547:646": "typescript, file, index.test.ts, LLM, unavailable, throws, assert, equal, files, manifest, writeFile, normalizeFilePath, path, descHash, unchangedFiles, descriptionFailed, retry.ts, chunk, testConfig, runIndexPass, async, await, provider, generateDescription, generateBatchDescriptions", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:647:746": "reused,cached,image,description,test,typescript,manifest,run,indexing,pass,imageVisionProvider,vision,llm,prompt,cache,files,unchanged,failed,control,fail,success,filePath,normalize,assert,e2e,test,keyboardinterrupt,call,count,fs,abort,signal,aborted,repo,opencoderag,src,__tests__,indexer,indexer,test,ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/indexer/indexer.test.ts:747:749": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\indexer\\indexer.test.ts,Lines:747-749,Language:typeScript,Keywords:assertion,notCalledAgain,secondRun,CtrlC,testFunction,setupBeforeEach", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/updater.test.ts:5:85": "typescript,fetch,replacement,afterEach,it,assert,async,error,updater,test,versions,available,check", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/server.ts:31:34": "serveStatic, function, ServerResponse, writeHead, end, Content-Type, html, 200, contentTypeTextHtml, utf8", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/server.ts:37:48": "typescript,function,serveUiAsset,params,res,response,file,content,type,MIME_TYPES,extname,readFileSync,end,writeHead,handleError,404,notFound,FileNotFoundException", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/server.ts:51:56": "interface, WebUiServer, port, number, close, promise, void, lines, 51-56", + "C:/Daten/Entwicklung/OpenCodeRAG/src/web/server.ts:70:121": "async, function, startWebUi, LanceDbStore, KeywordIndex, load, getStaticHtml, createApiHandler, Server, createServer, IncomingMessage, ServerResponse, serveStatic, serveUiAsset, Promise, resolve, reject, server, port, \"127.0.0.1\", 404, close", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/query.ts:25:101": "registerQueryCommand,CliCommands,typescript,function,query,command,line,description,natural,language,options,topK,explain,retrieval,minScore,hybridSearch,keywordIndex,config,topK,contextOptimization,optCfg,results,logFilePath,cleanupContext,process,cwd,path,resolved,await,assign,async,catch,message,Error,logger,console,error,exit,commandNotFoundError", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:14:17": "interface,SkeletonConfig,grammarName,nodeTypes,array,typescript,lines,14-17,typescript-file", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:57:60": "getFileExtension, TypeScript, function, string, path, lastIndexOf, substring, lowerCase, returns, dot, slice", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:62:65": "typescript,functionality,file-path-resolution,isAbsolute,resolution,resolve,strings,absolute,worktree,support,filepath,directory,types,return,value,logic,utilization,typecheck", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:67:115": "async, function, extractSkeleton, content, string, ext, Promise, type, array, keywords, matches, parser, setLanguage, walkTree, Parser, initParser, loadLanguage, tree, delete, nodeTypes, AstNode, set, keywords, extractNodeName, content, lines, content, regex, exec, match, index, split, grammarName, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:117:131": "extractNodeName,typescript,function,match,string,pattern,set,keyword,type,enum,class,async,replace,return,regex", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:133:143": "typescript, function, typeIcon, string, includes, return, if, keyword, declarations, symbols, enum, alias, items, rules, headings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:145:157": "formatSkeleton,items,type,name,startLine,endLine,lineRange,typeIcon,join,lines,String,concat,forEach,return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:159:161": "typescript,function,escapeRegex,string,replacement,globally,capturing,replacements,regex,replace,backreferences,escape,keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:164:173": "interface, SearchSemanticParams, query, pathHints, languageHints, language, topK, maximum, results", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:176:181": "interface, SearchableDocument, SearchResult, chunks, formatted, typescript, file, C_, Daten, Entwicklung, OpenCodeRAG, src, mcp, handlers_ts, keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:184:236": "async, function, handleSearchSemantic, params, SearchSemanticParams, embedder, EmbeddingProvider, store, VectorStore, cfg, RagConfig, keywordIndex, KeywordIndex, retrieveFn, retrieve, Promise, asyncFunction, count, await, parts, stringArray, trim, join, query, topK, retrieveOptions, RetrieveOptions, options, queryPrefix, embedding, queryPrefix, results, optimizeContext, map, metadata, language, relevance, score, formattedString, filePath, startLine, endLine, description, chunk, content, language, textBlock, return, chunks, searchSemanticResult, join, newline, arrowFunction, typeScript, fileLocation, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\mcp\\handlers.ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:239:242": "interface, FileSkeletonParams, path, file, filePath, define, type, TypeScript, parameters, skeletonize", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:245:252": "interface,SkeletonResult,file,structuralElements,type,name,startLine,endLine,formatted,skeleton,output,summary,elements,formatting,description,lineNumbers,information,knowledge,metadata,documentation,extraction,structure,analysis,representation,typescript,structured,code,responsibility,utility,definition", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:255:277": "async, function, handleFileSkeleton, FileSkeletonParams, worktree, resolveFilePath, readFileSync, getExtension, extractSkeleton, content, ext, Map, declCounts, item, type, replace, entries, map, join, formatSkeleton, skeleton, elements, formatted, summary, structural, elements, summary, \"--\"", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:280:287": "typescript, interface, FindUsagesParams, symbolName, pathHint, topK, maximumResults, parameters, TypeScriptCodeSnippet, fileNameHandlersTS, filePathCdotDatenDotEntwicklungDotOpenCoderragDotsrcDotmcp", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:290:299": "interface, FindUsagesResult, matches, filePath, language, line, content, context, totalMatches, fileCount, formatted, individual, usage, context, reference, lines, distinct, files", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:302:305": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\mcp\\handlers.ts,Language:typescript,Lines:302-305,Keyword:interface,DescribeImageParams,Path,image,file,filePath,string,InterfaceDefinition,Properties,DescribeImageParams,FilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:308:313": "interface, DescribeImageResult, interface-description, raw-text, vision-provider, formatted-output, human-readable, metadata, interface-formatted, string", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:316:363": "File, TypeScript, handleDescribeImage, fs, path, resolveFilePath, existsSync, readFileSync, import, node, async, DescribeImageParams, RagConfig, worktree, imageVisionProvider, SupportedImageExtensions, enabled, import, image.js, chunker, import, image.js, resizeImage, getMimeType, buffer, mimeType, maxDimension, await, describeImage, provider, visionProvider, createImageVisionProvider, description, formatted, base64, _Generated", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:366:465": "typescript,async,function,handleFindUsages,params,topK,symbolName,keywordIndex,embedder,vectorStore,cfg,retrieveFn,findUsagesResult,searchResult,Set,merge,usageGroup,fileGroups,regex,RegExp,definitionLine,symbolName,lineNum,contextLines,usages,filePath,languages", + "C:/Daten/Entwicklung/OpenCodeRAG/src/mcp/handlers.ts:466:494": "File, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\mcp\\handlers.ts, TypeScript, Keywords, Variables, Usages, Lines, Files, Sorts, Contexts, Escapes, Returns, Objects, Joins, Filters, Semantics, Handlers", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/create-read-tool.ts:15:34": "interface,options,workspace-root,string,RagReadToolOptions,config,embedding-provider,vector-store,log-file-path,map,session-last-message,map,session-retrieval-cache,keyword-index,max-session-cache-size", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/create-read-tool.ts:42:141": "lines 42-141, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/create-read-tool.ts:142:180": "typescript,catch,error,message,return,output,title,tool,metadata,chunks,indexed,fileContent,resolvedPath,startLine,endLine,maxChars,formatHybridReadOutput,read,retrievalErrorMessage,ragChunks,relatedFiles,filePath,Error,instanceof,String,try,resolvedPath,normalized,startLine,endLine,errorMessage,create-read-tool-ts,lines142-180", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/create-read-tool.ts:191:215": "typescript, function, applyLineRangeFilter, filterResults, chunkMetadataStartLine, chunkMetadataEndLine, resultsArray, lineRangeFilter, undefinedCheck, startLine, endLine", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/create-read-tool.ts:218:222": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\opencode\\create-read-tool.ts,Lines:218-222,Language:typescript,KeywordInterface:SessionQueryArgs,Properties:query,startLine,endLine", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/create-read-tool.ts:231:258": "function, messageText, resolvedPath, SessionQueryArgs, if, parts, file, path, include, join, standard, query, normalized, lines, startLine, endLine, return, buildReadQuery", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/create-read-tool.ts:261:264": "interface, RelatedFileEntry, interfaceDefinition, filePath, string, score, number", + "C:/Daten/Entwicklung/OpenCodeRAG/src/opencode/create-read-tool.ts:271:293": "typescript,function,collectRelatedFiles,searchResult,rawResults,requestFile,maxRelated,bestScore,map,set,get,filePath,score,sort,slice,entries,entries,Array,from,map,keyword,relatedFileEntry,return,sortedEntries", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/run-token-test.ts:40:48": "function,getConfig,path.join,loadConfig,try-catch,DEFAULT_CONFIG,loadRuntimeOverrides,STORE_PATH,applyRuntimeOverrides,resolveApiKey,WORKTREE", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/run-token-test.ts:50:67": "typescript, function, formatFileList, Map, entries, sort, relative, path, maxFiles, sorted, lines, join, \"\\n\", results, fileMap, entries, metadata, startLine, endLine, language, lang, fp, info, relevance,toFixed, find, \"\\\\\",", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/run-token-test.ts:69:168": "async, function, main, console, log, getConfig, createEmbedder, createVectorStore, KeywordIndex, load, STORE_PATH, QUERIES, retrieve, countTokens, formatFileList, WORKTREE, thresholds, avgContext, totalContext", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/run-token-test.ts:169:268": "lines 169-268, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/run-token-test.ts:270:270": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\run-token-test.ts,Lines:270,Language:typescript,Keyword:console,error,exit,process,failed,err,typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:53:63": "typescript,function,boundedSet,map,has,set,keys,next,value,maxSize,delete,undefined,delete,map,keys,forEach,oops", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:71:80": "type, RetrievalQueryHints, natural-language-search-query, path-hints-string-array, language-hints-string-array, top-k-number, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:86:99": "typescript,functionality,log,append,scope,message,payload,logFilePath,logLevel,debugLog,formatLogPayload", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:105:174": "function, formatLogPayload, unknown, string, number, boolean, undefined, array, object, entries, nested, null, type, typeof, instanceof, map, join, multiline, indent, prefix, recursive, keys, entries, values, return, if, else, typeof, function, string, repeat, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:180:186": "Function, TypeScript, accepts, string, returns, indented, multiline, splits, joins, repeats, prefix, lines, tabs, newline, concatenation, indentation, transformation", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:193:215": "async,function,get,set,load,cache,try,catch,file,path,resolve,DEFAULT,config,debug,log,configFile,chunkers,directory,configPath,loadConfig,appendLog,findConfigFile,await,Promise,typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:221:247": "formatContext,results,retrieve,reduce,avgScore,chunk,metadata,filePath,startLine,endLine,languages,content,description,language,join,---,CONTEXT_MARKER,RETURN_TYPE,TYPE_DESCRIPTORS,FILE_PATH,LANGAGE,DESCRIPTION,CODE,RESULTS,AVG_SCORE,FORMAT", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:250:295": "formatAutoInjectContext,SearchResult[],worktree,maxTokens,maxChunks,sorted,slice,Set,path.relative,metadata,startLine,endLine,included,buildString,line,relPath,m.score,lines,join,countTokens,formatted,included,while,pop,formatted,return,formatted", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:301:315": "function, buildRetrievalQuery, hints, RetrievalQueryHints, string, trim, pathHints, languageHints, filter, join, length, join, trim, returns, join, \"\\n\", trim", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:321:336": "async,retrieveContext,embedder,vectorStore,topK,retrieveFunction,minScore,keywordIndex,keywordWeight,queryPrefix,explain,hybridEnabled,returnPromise,SearchResult", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:343:367": "async, function, loadRetrievedResults, query, embeddingProvider, vectorStore, RagConfig, retrieveFn, topK, extraQuery, keywordIndex, queryPrefix, explain, minScore, hybridSearchKeywordWeight, hybridSearchEnabled, retrieveContext, optimizeContext, SearchResult, DEFAULT_CONTEXT_OPTIMIZATION", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:370:374": "File,Created,Evelopment,Daten,plugin,Typescript,Lines,370-374,Keywords,RagPluginDependencies,Embedder,Create,Store,Retrieve,Type,typeof,Function,Object,Dependency,Dependencies,VectorStore,Dimension,Config,Typed,TS", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:379:379": "FunctionDefinition, TypeScript, FileLocationC:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\plugin.ts, Line379, ArrowFunction, ParametersStorePathDimensionConfig, ReturnCreateVectorStore", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:384:405": "type, CreateRagHooksOptions, RagConfig, storePath, logFilePath, logLevel, worktree, dependencies, Partial, RagPluginDependencies, VectorStore, embedder, KeywordIndex, descriptionProvider", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:412:448": "file-map, file-list, formatFileList, metadata-lines, scores-comparison, sort-by-max-score, relative-path, relevance-value, language-detection, context-search, find-usages, get-file-skeleton", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:460:484": "extractUserMessageText,typescript,function,messageID,modelID,sessionID,agent,message,content,textParts,join,undefined,null,filter,typeof,strings,length,arrays,parts,typecheck,object,unknown", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:499:598": "lines 499-598, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:599:698": "typescript,catch,error,message,register,tool,createFileSkeletonTool,createFindUsagesTool,getEffectiveCfg,dependencies,retrievalTool,appendDebugLog,CONTEXT_TOOL_NAME,formatContext,output,contextMetadata,tools,logFilePath,filePath,startLine,endLine,language,score,results,chunks,indexed,pathHints,languageHints,query,topK", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:699:798": "lines 699-798, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:799:898": "lines 799-898, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:899:998": "lines 899-998, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:999:1038": "typescript,message-processing,conditional-mutation,msgParts,text-modification,debug-log,output-analysis,parts-text,duplicate-check,failure-handling", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:1044:1061": "async, function, loadKeywordIndex, storePath, logFilePath, import, await, KeywordIndex, load, try, catch, appendDebugLog, scope, message, count, chunks, failed, create, empty, error, err, KeywordIndex", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:1071:1097": "typescript,function,resolveNodeExecutable,process,cachedNodeExecutable,path,basename,if-statement,execPath,is,node,platform,win32,which,where,execSync,encoding,timeout,stdio,trim,split,return,catch,error,null,platform,isEmpty,console,log,execute,node", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:1103:1114": "File,CSSRAG,src,plugin,TS,resolveMcpCliEntry,function,path,directoryname,path,url,to,string,null,existsSync,join,packageRoot,dir,existsSync,srcDir,existsSync,srcCli,existsSync,distCli", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:1121:1199": "typescript,function,startMcpServerProcess,cwd,param,logFilePath,param,logLevel,args,spawn,nodeExec,child,stdout,on,data,event,stderr,on,data,event,error,on,exit,event,close,async,kill", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:1213:1312": "async, PluginInput, getConfig, path, resolveLogConfig, level, applyRuntimeOverrides, loadRuntimeOverrides, effectiveCfg, storePath, backgroundIndexers, mcpServers, configCache, pendingUpdateInfo, destroyAllPooledConnections, createEmbedder, embedder, vectorDimension, createVectorStore, loadKeywordIndex, appendDebugLog, directory, apiKey, OPENAI_API_KEY, OpenCode", + "C:/Daten/Entwicklung/OpenCodeRAG/src/plugin.ts:1313:1391": "typescript,hook,createRagHooks,startMcpServerProcess,path,isExistsSync,updateCheck,UpdateInfo,json,readFileSync,writeFileSync,appendDebugLog,pendingUpdateInfo,backgroundIndexers,mcpServers,existsSync,tmpdir,UpdateInfo,autoUpdateCfg,autoIndexCfg,effectiveCfg,input,logFilePath,descriptionProvider,storePath,keywordIndex,logger,systemPrompt", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/manifest.test.ts:17:19": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\core\\manifest.test.ts, Language:typescript, Lines:17-19, Function:makeTempDir, Parameters:string,name, Returns:Promise, Uses:fs.mkdtemp,path.join, os.tmpdir", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/manifest.test.ts:21:120": "typescript, file-system, manifest, testing, normalization, hashing, temp-directory, JSON-validation, schema-version-checking, RagConfig, computed-hash, directory-management", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/manifest.test.ts:121:125": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\core\\manifest.test.ts, Language:typescript, Lines:121-125, Keywords:assertNotEqual, computeDescriptionConfigHash, config1, config2, unknownAs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/vectorstore/lancedb.test.ts:9:108": "typescript,File,CSS-selector,test,it,assert,async,await,lanceDbStore,store,chunk,search,embedding,metadata,clear,addChunks,topK,filter", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/vectorstore/lancedb.test.ts:109:208": "typescript,chunk,store,count,clear,deleteByFilePath,search,normalizeFilePath,description,metadata,embedding,addChunks,assert,e2e,test,files,lines,typescript-code,arrays,fill,filter,assertEqual,chunks,descriptions,paths,clearStore,searchChunks", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/vectorstore/lancedb.test.ts:209:308": "typescript,test,store,addChunks,count,search,listFiles,getChunksByFilePath,assert,e2e测试,embedding,metadata,files,chunk,description,lancedb,test,normalizeFilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/vectorstore/lancedb.test.ts:309:386": "typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\vectorstore\\lancedb.test.ts, pagination, chunks, clear, addChunks, getChunks, getFilePaths, assertions, assert, async, store, unique, filePaths", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/vectorstore/lancedb.test.ts:388:406": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\vectorstore\\lancedb.test.ts,Language:typescript,Lines:388-406,Keywords:assertDeepStrictEqual,l2Normalize,it,normalize,vectors,unit,length,magnitude,direction,identical,original,vector,result,deepStrictEqual,zero,three,ten,four,six,eight,origin,Vectors,Normalization,test", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/vectorstore/lancedb.test.ts:408:458": "File,Created,Test,Function,it,Typescript,LanceDbStore,Array,Assert,Recursive,Sync,MkdtempSync,ExistsSync,ReadDirSync,RmSync", + "C:/Daten/Entwicklung/OpenCodeRAG/src/api.ts:16:33": "interface, SearchOptions, cwd, configPath, topK, minScore, keywordWeight, pathHints, languageHints, explain", + "C:/Daten/Entwicklung/OpenCodeRAG/src/api.ts:36:43": "interface, IndexOptions, path, opencode-rag-json, configPath, force, boolean, onProgress, callback, progress, messages, invoking, API, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/api.ts:46:51": "type, contextResult, interface, searchResults, SearchResult, array, formattedText, markdown, includes, details", + "C:/Daten/Entwicklung/OpenCodeRAG/src/api.ts:57:73": "function, formatContextResults, results, length, 0, return, string, lines, array, append, filePath, startLine, endLine, language, chunk, metadata, score, r, content, description, join, \"\\n\"", + "C:/Daten/Entwicklung/OpenCodeRAG/src/api.ts:83:115": "async,function,search,resolveRagContext,retrieve,optimizeContext,configPath,cwd,options,topK,minScore,keywordWeight,hybridSearch,queryPrefix,explain,pathPatterns,languages,store,close,destroyAllPooledConnections", + "C:/Daten/Entwicklung/OpenCodeRAG/src/api.ts:125:157": "async,index,workspace,resolveRagContext,runIndexPass,cwd,options,onProgress,await,finally,close,destroyAllPooledConnections,keywordIndex,descriptionProvider,storePath,configPath,force,indexStats,stats,Promise,typescript,processcwd,ctx", + "C:/Daten/Entwicklung/OpenCodeRAG/src/api.ts:167:176": "async,function,get,set,chunks,text,search,options,format,results", + "C:/Daten/Entwicklung/OpenCodeRAG/src/api.ts:194:200": "function,synchronous,imports,workspace,file,scan,async,cwd,config,logger,promise,return,files", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:7:19": "interface, Chunk, has, id, string, content, string, description, optional, undefined, embedding, array, number, metadata, object, filePath, string, startLine, number, endLine, number, language, string, contentType, optional, interface, TypeScript, line, 7-19", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:22:26": "interface, DescriptionLogger, has, three, methods, info, warn, debug, accepts, strings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:29:34": "interface, DescriptionProvider, generateDescription, generateBatchDescriptions, Chunk, logger, Promise, Map, multiple, concurrent, descriptions, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:37:57": "interface,type,SearchExplanation,scoreBreakdown,vectorScore,keywordScore,rawVectorScore,rawKeywordScore,keyWeight,vectorRank,keywordRank,matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:60:67": "interface, SearchResult, Chunk, relevance, score, explanation, optional, computation, interface, TypeScript, lines60-67", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:70:80": "interface, optimizedsearchresult, extends, SearchResult, metadata, optimizations, mergedFrom, dedupedFrom, fileCapped, typescript, properties, objects, keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:83:90": "interface, Chunker, readonly, language, fileExtensions, string, array, Promise, chunk, filePath, content, Chunk, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:93:98": "interface, embeddingProvider, readonly, name, texts, embed, promise, purpose, query, document", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:101:118": "interface, release, resources, free-memory, close, index, addChunks, removeByFilePath, search, topK, filter, metadataFilter, getMatchedTerms, clear, count, save, indexed-data, persist, JSON, keyword, terms, query, chunks, file-path, match", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:121:138": "interface, VectorStore, addChunks, search, searchWithFilter, count, clear, deleteByFilePath, getFilePaths, close", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:141:146": "interface, metadataFilter, glob, paths, patterns, language, identifiers, typescript, array, support, optional", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/interfaces.ts:149:160": "interface, IndexProgress, setFileCount, startFile, finishStage, finishFile, failFile", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/retriever.ts:13:23": "interface, RetrieveOptions, topK, minScore, keywordIndex, keywordWeight, hybridEnabled, boolean, queryPrefix, explain, MetadataFilter", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/retriever.ts:38:109": "async,retrieve,function,topK,minScore,prefixedQuery,embedder,VectorStore,options,Promise,SearchResult,map,array,Set,results,keywordIndex,hybridEnabled,keywordWeight,combinedResults,explaining,explanation,scoreBreakdown,matchedTerms,terms,filter,searchWithFilter,fetch_overfetch_factor,rank,fetch,overfetch", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:18:24": "typescript,normalize,function,l2Normalization,map,for-of,math,sqrt,pow,return,vector,array,variable,assign,norm", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:31:40": "typescript,function,isCorruptionError,instanceof,includes,message,contains,lance,error,errors,return,boolean", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:50:67": "typescript,function,async,await,fs,rename,move,directory,swap,Promise,try,catch,removeRecursive,force,fallback,backup,restore,error,tasks,cleanup", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:70:79": "interface, ChunkRow, id, content, description, embedding, number[], filePath, startLine, endLine, language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:97:100": "classConstructor, dbPath, vectorDimension, initializes, sets", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:102:107": "async, dbPath, db, connect, await, Connection, this, Path, database, getConnection, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:109:120": "async, getTable, Promise, Table, table, tableInit, initTable, await, finally, null, undefined, check, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:122:190": "async, typescript, db, tableNames, TABLE_NAME, initTable, LanceDB, addColumns, manifestPathFor, fs, unlink, createTable, deleteRow, query, toArray, vectorDimension, chunkRow, dropTable, overwite, seedRow", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:192:199": "File:C\\Dados\\Desenvolvimento\\OpenCodeRAG\\src\\vectorstore\\lancedb.ts, Language:typescript, Lines:192-199, Function:tableHasDescriptionColumn, Async, Try-catch, Schema, Fields, Some, Return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:208:219": "async, addChunks, chunks, array, Promise, void, try, catch, isCorruptionError, await, repair, retry, internal, throws, error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:221:292": "typescript,addChunksInternal,table,getTable,map,normalizeFilePath,insert,duplicate,delete,chunks,row,Map,rows,dedup,sql,escape,INSERT,DELETE,forEach,replace,splice,exclude,files,lines,ids,async,await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:301:303": "async, search, embedding, number[], topK, Promise, SearchResult[], this, searchWithFilter, asynchronous, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:305:317": "async searchWithFilter,topK,embedding,filter,metadataFilter,searchInternal,isCorruptionError,tryRepair,repaired,return[],catch,error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:319:334": "typescript, private, rowToSearchResult, calculateScore, max, min, distance, chunkId, content, descriptionField, filePath, startLine, endLine, metadataLanguage, nullSafeConversion", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:340:360": "typescript,async,function,listFiles,await,countRows,table,query,select,limit,toArray,map,get,set,entries,sort,localeCompare,filePath,language,chunkCount,new,FileMap,forEach,Promise,rows,entry,promise,typescript,extract,objects,files", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:367:388": "typescript,async-await,getTable,query,select,where,toArray,map,normalizeFilePath,replace,string,type-conversion,unknown-to-string,metadata-extraction,sorting,startLine,endLine,filePath,language,description,chunks,columns", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:396:413": "getChunks, table, QUERY_COLUMNS, rows, map, id, filePath, language, startLine, endLine, content, description, offset, limit, toArray, unknown", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:422:439": "typescript,async-await,getDb,getTable,vectorSearch,countRows,distanceType,whereClause,buildWhereClause,toArray,map,rowToSearchResult,filters,topK,resultMapping", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:445:456": "async, count, Promise, number, try, catch, getDb, db, tableNames, includes, TABLE_NAME, getTable, countRows", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:462:479": "async, getFilePaths, Promise, try, catch, getDb, db.tableNames, TABLE_NAME, await, this.getTable, table.query, select, filePath, toArray, Set, paths, add, Array.from, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:488:495": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\vectorstore,lancedb.ts,Language,typeScript,Lines,488-495,async,reopen,await,this.table?.close,await,this.db?.close,assign,null,tableInit,set,dbPath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:498:503": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\vectorstore\\lancedb.ts, Language:typescript, Lines:498-503, Keywords:async, close, Promise,void, table, null, db, close, this", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:509:527": "async, clear, table, null, getDb, dropTable, db, close, TABLE_NAME, fs.rm, recursive, force", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:533:539": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\vectorstore,lancedb.ts,Licensed,DropDatabase,Async,Promisified,RemoveDirectoryTree,ForceCleanup", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:546:556": "async, deleteByFilePath, filePath, tryRepair, isCorruptionError, catch, await, Promise, throw, error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:558:566": "typescript,private,async,deleteByFilePathInternal,await,getDb,getTable,tableNames,includes,delete,table,filePath,normalizeFilePath,replace,globes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:568:625": "typescript, database, repair, tryRepair, async, await, tableNames, db, TABLE_NAME, versions, checkLatest, restore, force, console.error, console.warn, force, index, continue, slice, sort, countRows, restore, latest, rebuild, catch", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/lancedb.ts:632:651": "typescript,function,buildWhereClause,MetadataFilter,languages,pathPatterns,language,langs,map,filter,join,filePath,LIKE,OR,comparisons,conditions,concatenate,whereclause,conditions,patterns,strings,replacements,keywords,logicalOperators,metadataFilters,constructors,expressions,identifiers,types", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:10:12": "async, addChunks, chunks, filter, embedding, length, greater, zero, push, memory, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:14:16": "async, search, embedding, number[], topK, Promise, SearchResult[], memory, ts, file, line14-16", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:18:33": "async, searchWithFilter, embedding, number[], topK, filter, MetadataFilter, Promise, SearchResult[], chunks, cosineSimilarity, similarity, score, sort, slice, filtered, embeddings, map, filterByMetadata, matchesFilter, filterConditions, comparison, chunk, metadata, filtering, result, topKElements", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:35:37": "async, count, Promise, number, return, this, chunks, length", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:39:41": "async, clear, Promise, void, this, chunks, =, []", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:43:46": "getFilePaths, async, Promise, string[], Array.from, chunks, map, metadata, filePath, Set", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:52:54": "async, deleteByFilePath, filePath, chunks, filter, metadata, FilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:57:58": "async, close, Promise, void, memory, ts, file, development, source, development, OpenCodeRAG, src, vectorstore", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:67:75": "typescript,globMatch,function,pattern,filePath,replacement,string,regex,test,replace,globstar,escape,star,questionmark,character,replacement,replacement,regexp,matcher,matchers,search,replace,expression,replace,find,match,regexes,fallback,strings,keywords,keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:77:84": "typescript,function,matchesFilter,chunks,metadataFilter,languages,pathPatterns,globMatch,boolean,includes,some,return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/vectorstore/memory.ts:86:99": "typescript,function,cosineSimilarity,numbers,dot,loop,i,condition,exponentiation,!operator,sqrt,pow,divide,multiply,return,zero,null,undefined,variables", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:33:35": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\eval\\token-comparison.test.ts, Language:typescript, Lines:33-35, Keywords:function makeTmpDir,path,os,tmpdir,FileSync,await,return,mkdtempSync", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:37:47": "typescript,function,makeConfig,Partial,RagConfig,defaultConfig,embedding,indexing,vectorStore,retrieval,openCode,chunkers,override,spread_operator", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:50:50": "FunctionDefinition, TypeScript, Line50, AsyncAwaitKeyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:51:51": "Function, endsWith, arrowFunction, line51, undefined, TypeScript, fileAbsolutePath, C_Daten_Entwicklung_OpenCodeRAG_src_tests_eval_token_comparison_test_ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:52:54": "async, searchWithFilter, embedding, number[], topK, filter, undefined, any, Promise, SearchResult[], this, search, await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:55:55": "FunctionDeclaration, Async, ReturnsNumber, Line55", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:56:56": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\eval\\token-comparison.test.ts,Lines:56-56,Language:typescript,KeywordCount:0", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:57:57": "Function, defined, async, block, file, path, TypeScript, line, 57, empty", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:58:58": "Function, async, defined, line, 58, exceeds, 20", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:59:59": "async, file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\eval\\token-comparison.test.ts, language-typescript, line-59, empty-array, async-function", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:64:82": "it,it-decorator,assert,equality,empty-string,non-empty-text,positive-token-count,longer-text,token-counting,test-implementation,typescript,assertion,context-tokens,statement,conditional-testing", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:88:187": "lines 88-187, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:188:215": "typescript,file,test,analyzeTokenUsage,compareTokenAnalyses,assertEqual,assertOk,formatTokenReport,tokenComparison", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:219:264": "File,CSS,RAG,token,Savings,test,it,project,assert,typescript,values,verified,keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:268:304": "typescript,it,test,token,count,assert,estimation,remove,create,hook,transform,synchronization,context,messages,code,equality,files,tests,logging,dummy,objects,dependencies,providing,async,await,storage,path,configuration,recycle,beforeEach,afterEach", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/eval/token-comparison.test.ts:308:394": "lines 308-394, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:18:18": "type, ToolContent, defines, object, properties, type, string, TypeScript, file, c, daten, Entwicklung, OpenCodeRAG, src, __tests__, mcp, server, test, ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:19:19": "Type, ToolResult, definition, typeScript, structure, content, tools, array, properties, interface, defined", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:25:25": "async, File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\mcp\\server.test.ts, language,typeScript,Line,25,emptyArrayDeclaration,asyncFunction,keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:28:35": "typescript,function,makeConfig,Partial,RagConfig,defaultConfig,embedding,retrieval,defaultEmbedding,defaultRetrieval,objectSpread,typecast", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:37:56": "function, makeResult, returns, object, contains, score, chunk, properties, id, content, description, metadata, filePath, startLine, endLine, language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:58:71": "function, makeEmptyStore, VectorStore, addChunks, search, searchWithFilter, embedding, topK, filter, Promise, SearchResult[], count, clear, deleteByFilePath, close, getFilePaths", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:73:86": "function, makeStore, number, SearchResult[], VectorStore, async, addChunks, search, searchWithFilter, embedding, topK, filter, Promise, count, clear, deleteByFilePath, close, getFilePaths", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:88:97": "typescript,function,makeRetrieveFn,async,await,results,SearchResult,promise,embedder,vectorStore,options,retrieveOptions,test,module,src,__tests__,mcp,server,test.ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:99:110": "typescript,function,makeRetrieveCapture,async,await,capture,options,query,retrieveOptions,embedder,vectorStore,resultPromise,undefined,return,emptyArray", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:112:123": "function-keyword,index-object,addChunks,removeByFilePath,search,function-expression,count,clear,save,close,getMatchedTerms,results-array,keyword-index,typescript,async-await,topK,param-query,param-chunkId", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:127:214": "typescript,it,test,async/await,assert,makeConfig,handleSearchSemantic,dummyProvider,makeStore,makeEmptyStore,makeRetrieveFn,makeResult,match,assert.match,console.assert,src/auth.ts,src/db.ts,assert.equal,assert.match,assert.fail,pathHints,languageHints,topK", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:218:280": "typescript,it,test,function,handleFileSkeleton,assert,async,rejects,throws,ENOENT,file,SKELETON,tmpdir,mkdtempSync,writeFileSync,rmdirSync,assertEqual,assertMatch,assertOk,filePath,formatted,result,elements,lineCount,unknownExtension,emptyFile,skeleton,regex,fallback", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:284:378": "typescript,it,test,function,async,keyword,index,vector,results,store,dummyProvider,formatted,output,matches,totalMatches,fileCount,makeResult,assert,match,concatenate,assign,await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:382:481": "typescript,itests,mcp,server,testfunction,createTestServer,Mcpserver,tool,asyncawait,clientconnect,clientsend,clienthandle,receivedjson,assertdeepStrictEqual,usagesfind,callTool,listTools,fileSkeleton,transport,inMemoryTransport,connection,close", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:482:547": "File,Clients,Server,it,Tests,Tool,testTool,connect,calls,InMemoryTransport,createLinkedPair,close,assert,await,finally,createTestServer", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:553:557": "makeFakeVisionProvider, imageVisionProvider, asynchronous, describeImage, returns, description, fake, typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\mcp\\server.test.ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:559:575": "typescript, function, makeConfigWithImageDesc, overrides, RagConfig, DEFAULT_CONFIG, embedding, retrieval, imageDescription, enabled, provider, model, baseUrl, timeoutMs, prompt, partial, keywordOrDefault, objectSpread", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:579:665": "File,Csharp,Lines-579-665,Language-typescript,Context-test-code,Keywords,test-image-description,typescript,assert,rejects,file-path,imageDescription,visionProvider,makeFakeVisionProvider,handleDescribeImage,filePath,tmpDir,configWithImageDesc,makeConfigWithImageDesc,descriptive,test-description,formatted,relativeFilePath,absoluteFilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:669:768": "file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\mcp\\server.test.ts, TypeScript, before, after, mkdtempSync, path.join, tmpdir, writeFileSync, rmSync, mkdtempSync, path.join, tmpdir, Buffer.from, \"hex\", makeConfigWithImageDesc, makeFakeVisionProvider, handleDescribeImage, assert.ok, assert.equal, assert.match, ToolResult, Client, InMemoryTransport, createLinkedPair, listTools, callTool", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/mcp/server.test.ts:769:776": "file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\mcp\\server.test.ts,language,typeScript,lines,769-776,assert_equal,result,isError,assignement,finally,await,client,close,await,server,close,test,code", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:12:37": "function, makeConfig, Partial, RagConfig, DEFAULT_CONFIG, embedding, indexing, vectorStore, retrieval, openCode, overrides, {...}, ..., ?, DEFAULT_CONFIG", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:39:58": "function, makeResult, accepts, id, filePath, startsWith, number, endLine, string, content, includes, score, undefined, optional, returns, object, SearchResult, contains, score, chunk, metadata, filePath, startLine, endLine, language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:63:63": "FunctionDefinition, TypeScript, Line63, EmptyFunctionArrow, AsyncAwaitKeyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:64:64": "async,function,arrow,single-line,empty,arrayDeclaration", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:65:67": "async, searchWithFilter, embedding, topK, filter, undefined, returns, search, Promise, SearchResult[], async, lines, 65-67", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:68:68": "AsyncFunction, InvalidSyntax, Line68, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:69:69": "FunctionDeclaration, async, Line69, TypeScript, FileC:\\Daten_Entwicklung_OpenCodeRAG_src__tests__plugin_test_ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:70:70": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\plugin.test.ts,Lines:70-70,Language:typescript,KeywordCount:0", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:71:71": "FunctionDeclaration, TypeScript, Line71, EmptyBlock, AsyncArrowFunc", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:72:72": "Function, asynchronous, ends_here", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:75:78": "type, SeenRetrieveCall, interface, query, topK, defined, TypeScript, file, C_\\Daten_Entwicklung_OpenCodeRAG_src__tests__plugin.test.ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:80:103": "function, makeDependencies, SearchResult[],, count,number,{},dependencies,{retrieve,typeof},_count,getSeen,getFunction,async,retrieve,string,_embedder,EmbeddingProvider,_store,options?,topK,number,Promise,SearchResult[],query,seen=query,topK=0,results,return,dependencies,{retrieve},getSeen,()seen={},options?", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:105:111": "typescript,function,makeToolContext,returns,record,string,unknown,properties,sessionID,callID,agent,test,values,testFunction,lines,105-111", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:113:212": "typescript,it,test,load,config,directory,mkdtempSync,path,writeFileSync,rmSync,tmpdir,assert,deepStrictEqual,equals,async,await,try,finally,rmdir,testWorktree,createRagHooks,makeResult,dependencies,tool,execute,topK,minScore,chunk,retrieval,semantic,search,score,chunks,execute,query,pathHints,languageHints,metadata,structured,output,assert.match,match", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:213:312": "typescript,itests,file-system,mktemp,tempdir,pathjoin,tmpdir,assert,readFileSync,writeFile,rmdir,async,await,tool-context,makeResult,makeDependencies,createRagHooks,makeConfig,testWorktree,ToolDefinition,execute,match", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:313:412": "typescript,itests,async,it,assert,dependencies,hooks,testWorktree,tmpdir,createRagHooks,makeConfig,toolDefinition,execute,ToolContext,assertEqual,assertMatch,assertNotEqual,results,populatedStore,query,search_semantic,storePath,logFilePath,worktree,metadata,indexed", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:413:512": "typescript,it,test,async,execute,symbolName,output,metadata,title,toolDefinition,register,assert,makeConfig,createRagHooks,dependencies,hooks,tmpdir,path,join,match,extractUserMessageText,authenticate,testWorktree,systemHook,populatedStore,experimental.chat.system.transform", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:513:612": "lines 513-612, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/plugin.test.ts:613:659": "typescript,test,script,file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\plugin.test.ts,assert,dependencies,hooks,eventHook,chatMessageHook,writeFileSync,rmSync,tmpDir,openCode,RAG,storePath,logFilePath,mock,events,plugins,testWorktree,results,config,createRagHooks,match,assertDoesNotMatch", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/retriever.test.ts:13:20": "function, makes, embedder, returns, object, asynchronous, embed, accepts, number, two-dimensional, array, vectors, purpose, query, document, async, Promise, await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/retriever.test.ts:22:39": "function, makeStore, SearchResult[], VectorStore, addChunks, async, search, embedding, topK, results, length, count, clear, deleteByFilePath, filePaths, async, close", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/retriever.test.ts:41:140": "file,Crates,test,typescript,it,async,await,retrieve,store,assert,makeEmbedder,makeStore,search,topK,customFilters,minScore,vectorFactor,embeddings,results,FilePaths,close,clear,deleteByFilePath,assertEqual", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/retriever.test.ts:141:240": "lines 141-240, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/retriever.test.ts:241:340": "lines 241-340, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/retriever/retriever.test.ts:341:410": "typescript,it,test,function,assert,keywordIndex,embedder,store,retrieval,explain,minScore,matchedTerms,scoreBreakdown,combinedScore,assertEqual,makeEmbedder,makeStore,makeKI,retireve", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:12:17": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\opencode\\create-read-tool.test.ts,Lines:12-17,Language:typescript,Function:makeEmbedder,Returns:EmbeddingProvider,Uses:embed:function,Parameters:_texts,_purpose", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:19:38": "function, makeStore, options, undefined, count, searchResults, VectorStore, addChunks, search, async, searchWithFilter, embedding, topK, filter, Promise, SearchResult, await, close, clear, deleteByFilePath, getFilePaths", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:40:53": "function, makeChunk, returns, object, id, string, filePath, number, startLine, endLine, language, string, content, metadata, array, filePath, number, number, number, language", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:55:68": "function, makeResult, id, filePath, startLine, endLine, language, content, score, SearchResult, makeChunk, object_declaration, string_concatenation, number_type, function_expression, keyword_return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:72:171": "typescript,File,C72-171,fs,os,tmpDir,tmpWorktree,mainFile,otherFile,other2File,other3File,fs,mkdir,fs,writeFile,it,createRagReadTool,DEFAULT_CONFIG,makeEmbedder,makeStore,assert,match", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:172:271": "file,CSS,RAG,chunks,typescript,line-range,overlap,embedding,error,graceful,retrieval,tmpWorktree,assert,doesNotMatch,async,await,store,results,makeResult,execute,test,typescript,tool,mainFile,otherFile,filePath,DEFAULT_CONFIG,createRagReadTool,searchResults,embedder,src,entwicklung", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:272:371": "typescript,itests,create-read-tool,test,tmpWorktree,DEFAULT_CONFIG,makeEmbedder,makeStore,execute,assert.match,assert.doesNotMatch,output,metadata,related-files,mainFile,otherFile,other2File,read-related-files-max,tool,ragReadTool,failingStore", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:372:471": "typescript, file, tests, create-read-tool, assert, execute, it, suppresses, related, files, max, same, scores, deduplicate, keeps, keep, duplicates, tool, worktree, store, config, filePath, match, results, embeddings, context, openCode, extract, assertions", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:472:571": "typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\opencode, assert.match, Map, createRagReadTool, tmpWorktree, DEFAULT_CONFIG, makeEmbedder, createTestSession, searchStore, sessionLastMessage, sessionRetrievalCache", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/opencode/create-read-tool.test.ts:572:608": "typescript,itests,filePath,startLine,endLine,execute,assert.match,assert.doesNotMatch,tool,createRagReadTool,tmpWorktree,DEFAULT_CONFIG,embedder,store,sessionID,sessionRetrievalCache,filePath,output,import,export,function,assert,async,it,test", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/configuration.md:1:100": "embedding, DEFAULT_CONFIG, opencode-rag.json, runtime-overrides-json, 5-second-TTL, Architecture, embedding-provider, ollama, openai, cohere, model-recommendations, proxy-details, file-discovery, chunking-behavior, indexing-extension, exclude-dirs, overlap, min-file-size, concurrency, embed-batch-size, embed-concurrency, description-concurrency, vector-store", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/configuration.md:101:200": "lines 101-200, markdown", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/configuration.md:201:300": "enabled, default, vision, provider, baseUrl, apiKey, model, timeoutMs, proxy, prompt, concurrency, maxImageBytes, enabled, readOverride, readNoResultsBehavior, maxReadOutputChars, readRelatedFilesMax, autoIndex_enabled, debounceMs, intervalMs, watcher, enabled, autoUpdate_enabled, logging_level, logFilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/configuration.md:301:350": "chunking,markdown,file,C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\configuration.md,nodeTypes,language,json,record,string,AST,external,inject,auto-detect,CLI,plugin,config,discovery,path,project,root,extensions,javascript,jsonc,key,resolution,OpenAI,apiKey,provider,auto-resolution,order,json-file,comments,strikethrough", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:2:9": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\opencode-rag.example.json,Language,json,Lines,2-9,embedding_provider,ollama,baseUrl,http,localhost:11434/api,model,qwen3-embedding:0.6b,timeoutMs,60000,documentPrefix,\"\",queryPrefix,\"\"", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:10:42": "json,indexing,extensions,includeExtensions,excludeDirs,excludeFiles,chunkOverlap,minFileSizeBytes,concurrency,embedBatchSize,embedConcurrency,ollamaMaxBatchSize,descriptionConcurrency", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:43:45": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG, Language:json, Line-range:43-45, Keyword:value=\"./.opencode/rag_db\", Structure:JSON-object, Property:named,vectorStore", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:46:53": "file-path, json, line-range, retrieval, topK, minScore, hybridSearch, enabled, keywordWeight", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:54:64": "json, file, path, enabled, maxContextChunks, readOverride, autoIndex, debounceMs, intervalMs, watcher", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:65:75": "json,imageDescription,enabled,provider,model,baseUrl,timeoutMs,prompt,think,numCtx,resizeMaxDimension", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:76:88": "json, file-path, C:\\Daten\\Entwicklung\\OpenCodeRAG\\opencode-rag.example.json, description, enabled, ollama, baseUrl, model, qwen2.5:3b, think, false, numCtx, 4096, timeoutMs, 60000, systemPrompt, purpose, key-concepts, inputs-outputs, dependencies, batchConcurrency, 3, retryMax, 3, retryBaseDelayMs, 1000", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:89:94": "json, documentationMode, enabled, autoStart, batchSize, systemPrompt, codebase, symbols, JSDoc, TSDoc, docComments, inlineComments, filePaths, fullContent, formatOutput, publicSymbols, privateSymbols, existingComments, incorrectUpdates", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:95:97": "file-path, mcp-enabled, json-object, line-range-95-97", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:98:100": "file-path, auto-update-settings, disabled, configuration-json", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:101:104": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\opencode-rag.example.json,Lines:101-104,Language:json,UI,port,3210,openBrowser,true", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:105:108": "file,json,lines,105-108,tui,keybinding,ctrl,enter,chunks,ctrl,alt,enter", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.example.json:109:112": "json, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\opencode-rag.example.json, line, 109-112", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/development.md:1:100": "git, clone, npm, install, legacy-peer-deps, cd, bash, git, clone, https, github, mrdoe, OpenCodeRAG, git, init, force, opencode-rag, setup, force, commands, cli, test, typecheck, build, release, patch, tests, run, node, tsx, test, test-force-exit, chunker, memory, uri, native, binary, structure, path, readFileSync, fs, import, node, path, TypeScript, interfaces, core, vectorstore, embedder, descriptionprovider, factories, adapter, pattern, error, resilience, uuid, src, chunker, embedder", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/development.md:101:172": "File, markdown, keywords:\n10-20: C\\Dat, Daten\\Entwicklun, Entwicklung\\OpenCodeRAG\\doc\\development.md, describer, vectorstore, retriever, opencode, tui, types, indexer, watcher, plugin, cli, tui, index, __tests__", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:12:17": "interface, ChunkerConfig, module, string, extensions, array, TypeScript, file, path, language, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:20:29": "interface, ProxyConfig, URL, username, password, noProxy, comma-separated, optional, interface-definition, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:32:41": "interface,AutoIndexConfig,boolean,debounceMs,number,intervalMs,WatcherBackend", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:44:44": "type, ReadNoResultsBehavior, enum, TypeScript, declaration, options, hint, empty, error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:47:47": "type, watcherbackend, chokidar, git, TypeScript, definition, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:50:83": "interface, DescriptionConfig, enabled, provider, baseUrl, model, apiKey, timeoutMs, proxy, systemPrompt, batchMaxChunks, batchTimeoutMs, batchConcurrency, retryMax, retryBaseDelayMs, think, numCtx, maxContentChars", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:86:109": "interface, enabled, provider, model, baseUrl, apiKey, timeoutMs, prompt, think, numCtx, proxy, resizeMaxDimension", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:112:117": "interface, UiConfig, HTTP, port, auto, open, browser, boolean, configuration, TypeScript, properties, defines", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:120:129": "interface, DocumentationModeConfig, enabled, autoStart, batchSize, systemPrompt, documentation, mode, available, configuration", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:132:137": "interface, TuiConfig, keybinding, fileListKeybinding, chunksKeybinding, defines, configuration, parameters, typescript, properties", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:140:143": "interface, McpConfig, boolean, enabled, configuration, typeScript, properties, file, development, developmentFolder, src, core, configTS", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:146:149": "interface, AutoUpdateConfig, enabled, boolean, configuration, TypeScript, settings, file, properties, lines, 146-149", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:152:163": "interface, ContextOptimizationConfig, enabled, maxPerFile, mergeAdjacent, adjacentGapThreshold, similarityThreshold, jaccard, file, chunks, dedup, boolean, number, line, threshold, optimization, config, typescript, lines, 152-163", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:166:265": "lines 166-265, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:266:278": "typescript,config,file,C,\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core,keywords,properties,documentationMode,DocumentationModeConfig,mcp,McpConfig,autoUpdate,AutoUpdateConfig,ui,UiConfig,tui,TuiConfig,logging,LoggingConfig", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:281:281": "type, LogLevel, debug, info, error, none, TypeScript, file, C_\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core\\config.ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:284:289": "interface, LoggingConfig, LogLevel, minimum, severity, level, record, path, log, file, defined, interface, properties, typescript, lines, 284-289", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:491:496": "function, resolves, log, configuration, from, config, object, returns, LoggingConfig, based, on, levels, and, filepaths, defaults", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:499:508": "interface,RagContext,config,RagConfig,embeddingProvider,EmbeddingProvider,chunker,Chunker,vectorStore,VectorStore", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:511:516": "interface, validation, config, result, validity, warningMessages, properties, boolean, array, TypeScript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:519:618": "lines 519-618, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:619:623": "return, valid, warnings, length, equals, 0, 0, {, }, warnings, valid, 0, return, keywords, lines, 619-623", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:636:644": "typescript,function,findConfigFile,directory,CONFIG_FILE_CANDIDATES,path.join,existsSync,undefined,filesystem,file,config,locations,loop,search,strings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:647:746": "typescript,config,load,Partial,RagConfig,JSON.parse,readFileSync,try,catch,NodeJS.ErrnoException,ENOENT,Error,validation,validateConfig,AutoIndexConfig,DescriptionConfig,ImageDescriptionConfig,DocumentationModeConfig,McpConfig,AutoUpdateConfig,UiConfig,TuiConfig,LoggingConfig", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/config.ts:747:752": "consoleWarn, configWarning, returnCfg, line747, line752, TypeScript, filePath, OpenCodeRAG, configTS, filePathCDEn, developerCodeDevelopment, developerCoreSrc, consoleWarnUsage, warningMessageFormatting, configurationManagement, codeSnippet, TypeScriptSyntax", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:12:32": "interface, ManifestEntry, hash, chunkCount, indexedAt, mtime, size, descriptionFailed, descHash, SHA-256, timestamp, fileContent, unixTimestamp, descriptionConfig, provider, model, baseUrl, prompts, unchanged, re-describing", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:44:53": "interface, Unix, timestamp, lastIndexedAt, schemaVersion, forward-compatibility, checks, record, normalized, file, path, manifest, entry, GitCommit, incremental, re-indexing", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:56:56": "type, ManifestStatus, ok, missing, corrupt, TypeScript, file, C_Daten_Entwicklung_OpenCodeRAG_src_core, line, 56-56", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:59:66": "interface, LoadedManifest, manifest, FileManifest, path, status, ManifestStatus", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:69:71": "createEmptyManifest, function, returns, FileManifest, emptyObject, schemaVersion, SCHEMA_VERSION, files, Object", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:74:76": "typescript,function,manifestPathFor,returns,string,path.join,dbPath,manifestjson,directory,path,join,return,lines74-76", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:79:81": "normalizeFilePath,path.resolve,replace,slashes,typeScript,function", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:84:86": "computeFileHash, function, TypeScript, sha256, hash, update, digest, hex, content, string, manifest", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:96:115": "typescript,function,computeDescriptionConfigHash,checks,null,undefined,concatenates,Array,string,join,hash,createHash,sha256,digest,slice,hex,substring", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:118:145": "async, function, loadManifest, dbPath, Promise, LoadedManifest, manifestPathFor, fs, readFile, JSON.parse, raw, partialFileManifest, filesystemPath, filePath, MIN_SUPPORTED_SCHEMA_VERSION, version, createEmptyManifest, error, NodeJS_ErrnoException, code, ENOENT, status, corrupt, missing", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/manifest.ts:148:163": "async, function, saveManifest, dbPath, FileManifest, manifest, schemaVersion, SCHEMA_VERSION, fs, mkdir, path, dirname, writeFile, JSON.stringify, tempPath, rename, EPERM, unlink, catch, filePath, windows", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/embed-stage.ts:8:13": "interface, EmbedChunksOptions, Chunk[], EmbeddingProvider, batchSize, concurrency", + "C:/Daten/Entwicklung/OpenCodeRAG/src/indexer/embed-stage.ts:25:57": "async, function, embedChunks, EmbedChunksOptions, Promise, Chunk[], if, chunks, length, textsToEmbed, chunkIndices, for, i, continue, text, embeddings, await, batch, embedBatch, concurrency, Array, isArray, typeof, embedding, number, chunks", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:8:20": "interface, SerializedKeywordIndex, version, tokens, array, strings, arrays, tuples, keyword, index, chunkMap, objects, ids, descriptions, filePaths, lines, languages", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:23:39": "stem,typescript,function,if-statement,length,substring,endswith,stems,keyword,index,criteria,replacement,conditional,logic", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:47:79": "tokenize, split, regex, set, add, lowerCase, stem, camelCase, snakeCase, loop, condition, substring", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:81:83": "path-replacement, replace-all, remove-trailing, directory-fix, JSON-file, path-construction, backslash-to-slash, regex-glob, keyword-index-json, string-manipulation", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:95:97": "constructor, keyword-index, TypeScript, file, C_Daten_Entwicklung_OpenCodeRAG_src_retriever_keyword_index_ts, parameter, storePath, undefined, initialization", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:99:115": "typescript, function, addChunks, chunks, chunkMap, set, id, tokenize, tokens, invertedIndex, get, set, token, docs, Map, if, !, docs, set, increment, iterate, keyword, index, lines99-115", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:117:127": "getMatchedTerms, tokenize, query, chunkId, invertedIndex, get, has, stringArray, loop, keywordIndex, keywords, matches", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:129:154": "typescript, function, removeByFilePath, loop, chunkMap, metadata, filePath, idsToRemove, id, tokenize, invertedIndex, delete, docs, size, keywords, files, content, keyword, index, filesystem, paths, filepaths, typescript-code, tokenization, removal, cleanup", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:156:187": "typescript, function, search, query, tokenize, invertedIndex, filter, metadataFilter, scores, Map, entries, sort, slice, map, chunkId, chunks, frequency, idf, topK, filtered, metadataMap, matchesFilter", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:189:192": "File: keyword-index.ts, Language: TypeScript, Lines: 189-192, Keywords: close, clear, invertedIndex, chunkMap", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:194:197": "File-keyword,Clear-method,typescrip,Language-keyword,Lines-keyword,194-197,method-body,start-block,keyword-clear,void-type,variable-this,clear-method-call,index-object-instance,object-inverted-map,object-chunk-map", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:199:201": "file, keyword-index, TypeScript, lines, 199-201, count, method, size, chunkMap, returns, number, size", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:203:235": "async, save, storePath, indexPathFor, fsPromises, mkdir, writeFile, import, path, INDEX_VERSION, invertedIndex, entries, chunkMap, entries, id, content, description, filePath, metadata, startLine, endLine, language, JSON.stringify, utf-8, await", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:237:281": "typescript,async-await,fsPromises,access,readFile,jsonParse,keywordIndex,parsed,tokens,invertedIndex,chunkMap,id,content,startLine,endLine,language,filePath,metadata,storePath,index,version,map,set", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:283:289": "typescript, static, async, clearFile, storePath, indexPathFor, promises, fs, mkdir, path, json, stringify, version, tokens, chunkMap, recursive, utf8", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:292:300": "typescript,function,globMatch,pattern,filePath,globstar,replacement,regex,test", + "C:/Daten/Entwicklung/OpenCodeRAG/src/retriever/keyword-index.ts:302:309": "typescript,functionality,matchesFilter,Chunk,metadata,language,pathPattern,globMatch,literalMatchers,booleanExpressions,codeStructure,typescriptFunction,filterImplementation,conditionsEvaluation,filePathMatching,filesFilters", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/config.test.ts:9:92": "typescript, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\__tests__\\core\\config.test.ts, before, after, unlinkSync, join, writeFileSync, assertDeepStrictEqual, DEFAULT_CONFIG, DEFAULT_CONFIG.logging.logFilePath, DEFAULT_CONFIG.openCode.enabled, DEFAULT_CONFIG.indexing.includeExtensions, DEFAULT_CONFIG.embedding.baseUrl, DEFAULT_CONFIG.retrieval.topK, DEFAULT_CONFIG.vectorStore.path, DEFAULT_CONFIG.logging.level, DEFAULT_CONFIG.logging.logFilePath, DEFAULT_CONFIG.logging.logFilePath, DEFAULT_CONFIG.openCode.enabled, DEFAULT_CONFIG.openCode.maxContextChunks, DEFAULT_CONFIG.vectorStore.path", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/config.test.ts:94:139": "typescript,it,test,assertEqual,DEFAULT_CONFIG,includes,set,registeredExtensions,excludingDirs,enabled,retrieval,topK,minScore,logging,level,logFilePath", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/config.test.ts:141:166": "typescript,it,test,itests,resolves,logconfig,defaultvalues,override,assert,providedvalues,environmentvariables,custompath,logginglevel,logfilepath,configurationoverrides,unittesting", + "C:/Daten/Entwicklung/OpenCodeRAG/src/__tests__/core/config.test.ts:168:243": "typescript,itests,config,test,validateConfig,defaultConfig,unknownKey,embeddingProvider,baseUrl,chunkOverlap,retrieval,topK,minScore,loggingLevel,logFilePath,port,uiPort,invalidKeys,warnings,assertEqual,assertOk,assertIncludes", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:2:2": "File-name, Path, package.json, JSON, Line-1, Line-2, Name-keyword, OpenCodeRAG-package, Development-folder, C-drive", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:3:3": "Version, package.json, JSON, keyword", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:4:4": "description, OpenCode, plugin, local-first, RAG-based, semantic, code, search, JSON, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\package.json", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:5:5": "JSON, File, package.json, Line, 5-5, Type, Module", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:6:6": "File_path, Line_range_6_to_6, main_key, dist_folder, plugin_entry_js_file_path", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:7:7": "File,module,JSON,Lines,7-7,Path,C:\\Daten\\Entwicklung\\OpenCodeRAG\\package.json,Keyword,\"module\":\"./dist/plugin-entry.js\"", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:8:8": "File-name, Path, types, ./dist/plugin-entry.d.ts, JSON, Line-Range-8-8", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:9:37": "File, exports, .json, import, require, types, ./dist/plugin-entry.js, ./dist/plugin-entry.d.ts, ./dist/index.js, ./dist/index.d.ts, ./dist/tui.js, ./dist/tui.d.ts, ./dist/web/server.js, ./dist/mcp/server.js", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:38:44": "File, path, JSON, files, dist, wasm, postinstall-setup-js, README, LICENSE", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:45:47": "File: package.json, Line: 45-47, Keywords\nJSON, File Path, Development, Package, Structure, Bin, Command, Script, Alias, OpenCodeRAG, CLI, Executable, Dist, IndexJS", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:48:60": "npm,scripts,json,build,tsc,postinstall,scripts,postbuild,typecheck,test,integration,cli,release,patch,minor,tsx", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:61:71": "package,json,keywords,array,starts,61,line,ends,71,line", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:72:72": "Author, Email, JSON, Package, Name, Christoph, Doellinger, MedUni, Heidelberg, Germany", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:73:73": "license,TIMEDASH,MIT,C:\\Daten,Entwicklung,OpenCodeRAG,package,json,LICENSE,line,73,line,73", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:74:77": "repository,type,url,git,GitHub,OpenCodeRAG,URL,json", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:78:80": "File: package.json Line: 78-80 Language: JSON Keywords: bugs, url, https, github, OpenCodeRAG, issues", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:81:81": "file-path, line-range, package-json, homepage-url, github-repo-reference", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:82:84": "JSON, peerDependencies, object, dependency, version, greater-than-or-equal, plugin, property, \"@\"", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:85:102": "package,json,dependencies,keywords,version,xlsx,lancedb,modelcontextprotocol,dommatrix,tree,sitter,wasm,pdfjs,mammoth,p-limit,picocolors,sharp,web-tree-sitter,word-extractor", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:104:120": "package,json,devDependencies,key,node,react,autoprefixer,highlightjs,postcss,solidjs,tailwindcss,tree-sitter-cli,tsx,typeScript,version,dependencies,dependenciesVersion", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:121:124": "File:package.json, Line-range121-124, Keywords overrideConfigurations, uuidVersionOverride, webTreeSitterDependencyReference", + "C:/Daten/Entwicklung/OpenCodeRAG/package.json:125:129": "File: package.json, Line: 125-129, Keywords: JSON, Object, Properties, allowScripts, Boolean, Scripts, Configuration, esbuild, msgpackr-extract, tree-sitter-cli", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/pdf.ts:19:25": "typescript, function, getStandardFontsUrl, string, require, createRequire, import, meta, url, resolve, pdfjs-dist, package_json, path, dirname, join, fileURLtoPath, endsWith, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/pdf.ts:33:45": "async, createPdfDocument, import, @thednp/dommatrix, CSSMatrix, globalThis, DOMMatrix, DOMMatrixReadOnly, await, pdfjs-dist/legacy/build/pdf.mjs, getDocument, Uint8Array, new, buffer, standardFontDataUrl, getStandardFontsUrl, verbosity, 0, promise, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/pdf.ts:54:69": "async, function, extractPdfText, Buffer, await, createPdfDocument, pdf, numPages, for, i, page, getTextContent, items, filter, typeof, object, null, in, str, map, join, strings, \"\\n\\n\", return, Promise, string, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/chunker/pdf.ts:86:155": "async, chunk, filePath, content, Paragraphs, filter, trim, PARAGRAPH_SPLIT, flush, uuid, MAX_CHUNK_CHARS, MIN_GROUP_CHARS, currentGroup, currentSize, paragraphIndex, paragraphs, join, push, metadata, filePath, startLine, endLine, language, continue, length", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:37:65": "buildWorkspacePackageJson,existingDependencies,getOrDefault,pluginVersion,deps,assignToObject,removeKeys,ensureKeyPresence,typescript,function,recordEntries,objectValue,setOrCreateProperty,extractor,preserver,dependencies,Object.entries,versionSelector,assertType,returnObjectWithOverrides", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:76:88": "typescript,function,buildOpencodeConfig,existing,record,string,update,next,schema,delete,plugin,auto-discovery,init,version,stale,npm,dependency,resolve,remove,initialize,code,properties,json,property,config", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:100:135": "readJsonObject, path_join, existsSync, writeJsonFile, array_filter, file_changes, json_files, string_type_checks, update_configurations, remove_elements, type_conversions, synchronization_problems, config_directories, configuration_files", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:145:153": "typescript, function, generateWorkspacePluginFile, string, import, packageName, export, id, server, plugin, node_modules, dist, plugin_entry_js, join, \"\\n\", lines145-153", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:163:169": "typescript, function, generateWorkspaceTuiPluginFile, packageName, import, tui, dist, export, default, newline, join, string", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:178:239": "generateSkillFile, semicolon, OpenCodeRAG, workspaceSetup, toolsGuide, decisionTree, searchSemantic, fileSkeleton, findUsages, describeImage, readLines, editContext, antiPatterns, parameters, pathHints, languageHints, imageDescription, visionProviderConfig, indexWorkspace", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:250:282": "typescript,functionality,mergeGitignoreContent,existingContent,multiple-lines,Set,set-methods,filter,trimming,lines-splitting,content-logic,concatenation,conditional-logic,files-ignore,replacements,log-file,trailing-newline,indentation,arrays-push,boolean-checking", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:289:291": "typescript,function,getRuntimeDir,path,join,os,homedir", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:300:303": "typescript,functionality,symlinkSync,platform,detection,process,createJunction,targetPath,linkPath,filesystem,taking,path,type,win32,junction,createCommandLinks,utilities,helper,filePath,filesHandling,typescriptFunction,filePathManagement,commandLineUtils,platformSpecificLogic", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:320:407": "lines 320-407, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/cli/commands/init-helpers.ts:416:488": "generateDefaultConfigJson, JSON.stringify, embedding, baseUrl, model, timeoutMs, indexing, includeExtensions, excludeDirs, chunkOverlap, minFileSizeBytes, concurrency, embedBatchSize, vectorStore_path, retrieval_topK, retrieval_minScore, hybridSearch_enabled, hybridSearch_keywordWeight, openCode_enabled, maxContextChunks, readOverride, autoIndex_enabled, debounceMs, intervalMs, watcher, imageDescription_enabled, provider, model, baseUrl, timeoutMs, think, numCtx, description_enabled, provider, baseUrl, model, think, maxContentChars, mcp_enabled, logging_level, logFilePath, chunking_nodeTypes", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:16:33": "interface, TopResultEntry, rank, score, filePath, startLine, endLine, language, explanation, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, keywordWeight, vectorRank, keywordRank, matchedTerms, number, string", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:35:39": "Interface, defines, ThresholdResult, contains, threshold, passedCount, boolean, type, TypeScript, file, properties", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:41:48": "interface, QueryResult, object, contains, query, queryIndex, resultCount, latencyMs, topResults, thresholdAnalysis, array, entries, properties, numbers, typeDefinition", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:50:64": "interface,BenchmarkOutput,branch,commit,timestamp,config,embeddingProvider,embeddingModel,topK,minScore,hybridEnabled,keywordWeight,indexChunkCount,queries", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:66:91": "function, parseArgs, process.argv, slice, string, resolve, path, file, usage, console_error, exit, json, tsx, src, eval, compare_merge, md, main, branch, output", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:95:98": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\compare-merge.ts,Lines,95-98,Language,typescript,functionName,avg,paramType,number[],returnType,number", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:100:105": "typescript,functionality,median,calculate,array,length,sort,find,index,splice,conditional,return,value,divide,even,size,odd,midpoint,logic,implementation", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:107:112": "File,System,percentile,function,typescript,language,lines,107-112,code,logic,arr,number,array,sort,number,length,return,if,keyword,compare,merge,ts", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:114:119": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\compare-merge.ts,Lines,114-119,Language,typescript,Function,stdev,number[],number,if,length,less,return,0,avg,map,squaredDifference,reduce,Math,sqrt,parentheses", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:121:127": "typescript,function,jaccard,similarity,set,intersection,union,calculate,size,return,arrays,strings", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:131:133": "Function, takesNumber, optionalDecimals, returnsString, toFixed", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:135:139": "function,deltaStr,number,diff,sign,fmt,decimals,typeScript,135-139,formatted,return,value,compare,merge,literals,keywords,concatenate,single-line,code", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:141:146": "typescript, function, deltaStrPct, compares, numbers, percentage, returns, string, zero, infinity, division, subtraction, absolute, multiplication, rounding, formatting", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:151:154": "typescript,function,cell,strings,width,left,right,repeat,alignment,slice,assign,concat,spaces,conditionals", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:156:158": "typescript,function,tableRow,map,string,cell,args,widths,aligns,return,concat,columns,join,separator│,stringify,typesafe,indices,properties,getWidth,getAlign,template_literals", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:160:162": "Function, TypeScript, tableSep, widthArray, join, map, repeat, separator, concatenate, template, string", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:164:166": "File, C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\compare-merge.ts, TypeScript, Lines, 164-166, Function, tableTop, takes, number[], returns, string, joins, SEP.repeat, map, join, ─, ├─, ─┐", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:168:170": "Function, TypeScript, returns, string, tableBot, array, numbers, map, repeat, join, separator, pipes, dashes, brackets", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:174:194": "interface, ComparisonResult, BenchmarkOutput, perQuery, query, index, main, branch, count, topScore, latencyMs, top3Files, stats, topScore, resultCount, latency, jaccardTop3, thresholdAnalysis, threshold, mainInject, branchInject", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:196:266": "compare,merge,BenchmarkOutput,ComparisonResult,topScore,count,latency,jaccards,similarity,thresholds,inject,queries,files,analysis,metrics,filter,splice,map,lodash,JaccardSimilarity", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:268:367": "lines 268-367, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:368:406": "consoleLog, TypeScript, Jaccard, median, Math_min, Math_max, fmt, console, log, tableTop, tableRow, tableSep, perQuery, pqCols, pqW, pqA, deltaStr, index, topScore, top3Files, substring, length, length, maxLength, pop, join", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:408:507": "lines 408-507, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:508:607": "lines 508-607, typescript", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:608:661": "typescript, file-path,CSS,Cosine,similarity,rank-analysis,Jaccard,indexing,evalution,keyword-weight,retrieval-system,top-queries,branch-comparison,threshold-calculation,vector-scores,line-by-line,output-formatting,comparative-analysis,zero-results,rank-stability,q-score,application-notes,raw-vector-scores,merge-approach", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:663:687": "async, main, parseArgs, BenchmarkOutput, JSON.parse, readFileSync, writeFileSync, compare, printConsole, generateReport, path, mkdirSync, recursive, node_fs", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/compare-merge.ts:689:692": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\compare-merge.ts,Language,typescript,Lines,689-692", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2:2": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc,JSON,Lines,2-2,Branch,t1-cosine-l2", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:3:3": "File, Path, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc, eval-results-t1-cosine-l2.json, Language, JSON, Line, 3-3, commit, 8b9af91", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:4:4": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc,eval-results-t1-cosine-l2.json,Lines,4-4,Language,json,timestamp,2026-07-06T07:36:52.613Z", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:5:12": "File,json,Lines,5-12,Config,EmbeddingProvider,qwen3_embedding,Model,topK,minScore,HybridEnabled,KeywordWeight", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:13:13": "File, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc, eval-results-t1-cosine-l2.json, JSON, indexChunkCount, 1180, line, 13-13", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:14:113": "json,queries,array,length,rank,score,filePath,line,start,explanation,vectorScore,keywordScore,rawVectorScore,rawKeywordScore,keywordWeight,vectorRank,matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:114:213": "json, file, path, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc, eval-results-t1-cosine-l2.json, json-lines, data, thresholds, results, latency, query, explanations, vectorScore, keywordScore, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:214:313": "rank,score,filePath,endLine,language,explanation,vectorScore,keywordScore,rawVectorScore,rawKeywordScore,keywordWeight,vectorRank,vectorScore,vectorRank,matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:314:413": "json, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, filePath, language, rank, score, explanation, thresholdAnalysis", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:414:513": "json, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json, lines, 414-513, keywords, json, TypeScript, explanation, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, vectorRank", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:514:613": "File,json,lines,514-613,query,Where,is,the,LanceDB,store,implementation,topResults,rank,score,filePath,startLine,endLine,language,explanation,vectorScore,keywordScore,rawVectorScore,rawKeywordScore,keywordWeight,vectorRank,thresholdAnalysis,passedCount", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:614:713": "json, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json, thresholds, jsonResults, thresholdValues, wouldInject, false, resultsCount, topResults, rank, score, filePath, startLine, endLine, language, explanation, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, keywordWeight, vectorRank, keywordRank, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:714:813": "json,File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json,Lines,714-813,KeywordScore,VectorRank,ThresholdAnalysis,QueryIndex,TopResults,LatencyMs,Explain,UsageSearchResult", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:814:913": "json, keywords, file path, line range, TypeScript, vector score, keyword score, JSON, language detection, threshold analysis, latency milliseconds, top results", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:914:1013": "file,CreatedFile,filePath,startLine,endLine,json,lines,914-1013,language,typescript,vectorScore,float,keywordScore,float,vectorRank,number,vectorWeight,float,rawVectorScore,float,rawKeywordScore,float,matchedTerms,array,rank,number,score,float,explanation,key,value", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1014:1113": "thresholdAnalysis, queryIndex, resultCount, latencyMs, topResults, filePath, score, explanation_vectorScore, explanation_keywordScore, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1114:1213": "json,File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json,Lines,1114-1213,rank,score,filePath,startLine,endLine,language,explanation,vectorScore,vectorRank,keywordScore,rawVectorScore,rawKeywordScore,keywordWeight", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1214:1313": "json, keywords, file, path, scores, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, explanation, rank, filePath, language, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1314:1413": "JSON, thresholds, results, file, lines, data, percentages, injection, vector, scores, keywords, explanations, JSON, metrics, latencyMs, lines", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1414:1513": "json,File,Coincides-With-Path-LineNumbers-Keywords,MetadataFilter-interface-used-for,Score-Explanation,ThresholdAnalysis,List", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1514:1613": "json, file-path, rank, score, language, thresholdAnalysis, queryIndex, resultCount, latencyMs, topResults, filePath, startLine, endLine, keywordScore, vectorScore, rawVectorScore, rawKeywordScore, keywordWeight, vectorRank", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1614:1713": "json, file, line, scores, vectorScore, keywordScore, matchedTerms, rank, score, filePath, language, explanation, rawVectorScore, rawKeywordScore, vectorRank, keywordRank", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1714:1813": "json, keywords, thresholdAnalysis, resultsCount, latencyMs, fileLocation, filePath, score, vectorScore, keywordScore, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1814:1913": "image, json, file path, start line, end line, language, vector score, keyword score, raw vector score, raw keyword score, threshold analysis, passed count, latency milliseconds, top results, rank, score, matched terms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:1914:2013": "json, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json, keywords, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, vectorRank, rank, score, filePath, language, explanation, thresholdAnalysis, threshold, passedCount, wouldInject", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2014:2113": "json, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json, keywords, rank, score, filePath, language, explanation, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, vectorRank, keywordRank, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2114:2213": "json, file, threshold, passedCount, wouldInject, queryIndex, resultCount, latencyMs, topResults, rank, score, filePath, startLine, endLine, language, explanation, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, keywordWeight, vectorRank, keywordRank, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2214:2313": "query, resultCount, latencyMs, topResults, rank, score, filePath, startLine, endLine, language, explanation, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, keywordWeight, vectorRank, keywordRank, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2314:2413": "rank,score,filePath,startLine,endLine,language,explanation,vectorScore,keywordScore,rawVectorScore,rawKeywordScore,vectorRank,keywordWeight,keywordRank,matchedTerms,thresholdAnalysis,passedCount,threshold,wouldInject", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2414:2513": "json, keywords, scores, vectorScore, keywordScore, filePath, thresholdAnalysis, count, passed, wouldInject, explanations", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2514:2613": "JSON, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json, lines, 2514-2613, keywords", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2614:2713": "json, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc, eval-results-t1-cosine-l2.json, score, filePath, startLine, endLine, language, explanation, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, keywordWeight, vectorRank, keywordRank, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2714:2813": "json, file, path, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json, results, score, rank, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, explanation, thresholdAnalysis, passedCount, wouldInject", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2814:2913": "json, file, C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json, TypeScript, scores, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, vectorRank, thresholdAnalysis", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:2914:3013": "json, file-path-C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json, query-What is the FETCH_OVERFETCH_FACTOR constant?, results-count-20, latency-ms-159.3", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:3014:3113": "json, file-path, threshold, passedCount, wouldInject, query, resultCount, latencyMs, rank, score, filePath, startLine, endLine, language, explanation, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, keywordWeight, vectorRank, keywordRank, matchedTerms", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:3114:3213": "json, File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\doc\\eval-results-t1-cosine-l2.json, thresholdAnalysis, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, vectorRank, topResults, latencyMs, startLine, endLine", + "C:/Daten/Entwicklung/OpenCodeRAG/doc/eval-results-t1-cosine-l2.json:3214:3276": "json, file-path, score, rank, language, explanation, vectorScore, keywordScore, rawVectorScore, rawKeywordScore, thresholdAnalysis, passedCount, wouldInject", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:15:18": "interface, SetupResult, boolean, errors, array, TypeScript, file, development, sourcecode, codeblock, lines15-18", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:20:22": "typescript,function,getRuntimeDir,path,join,os,homedir", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:24:29": "typescript,function,getNpmGlobalRoot,execSync,npm,global,root,string,trim,encoding,utf8,timeouts,milliseconds", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:31:34": "createJunction, targetPath, linkPath, process_platform_win32, symlinkSync, type, function, TypeScript, filePath, synchronization, paths", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:36:40": "File,C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\core\\setup-runtime.ts,Language,typescript,Lines,36-40,Function,removeIfExists,targetPath,void,if,existsSync,targetPath),returnType,void,RmSync,targetPath,{recursive:true,force:true},", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:42:44": "Function getVersionFile, accepts-string, runtimeDir, returns-string, path-join, dot-bundle-version, directory-dot-file", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:46:52": "readFileSync, versionFile, utf8, trim, try-catch, string, null, function, file, throw, readFile, error", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:55:69": "typescript, function, getBinName, string, path, join, npmGlobalRoot, readFileSync, JSON.parse, object, keys, typeof, fallback, PLUGIN_NAME, try, catch, throw, return", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:80:115": "patchWindowsWrappers, process-platform-check, npmGlobalRoot, binDir, path-resolve, getBinName, existsSync, readFileSync, writeFileSync, cmdJsLine-test, cmdJsLine-replace, ps1DirectLine-match, ps1DirectLine-replace", + "C:/Daten/Entwicklung/OpenCodeRAG/src/core/setup-runtime.ts:117:210": "npm, createJunction, mkdirSync, execSync, existsSync, writeFileSync, removeIfExists, path, JSON.stringify, PLUGIN_NAME, cpSync, patchWindowsWrappers, SETUP_RUNTIME, setupRuntime, runtimeDir, versionFile, globalPluginDir, globalSdkPluginDir, globalNpmRoot, pluginVersion, readVersionFile, errors, silent, force, silent, success, node, type, dist, packageJson, private", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:2:7": "json, embedding, provider, baseUrl, model, timeoutMs, ollama, qwen3, embedding, 0.6b", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:8:96": "lines 8-96, json", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:97:99": "file-path, vectorStore, path=\"./.opencode/rag_db\", line-97, line-98, line-99, json-syntax", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:100:107": "json, retrieval, topK, minScore, hybridSearch, enabled, keywordWeight", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:108:118": "json, openCode, enabled, maxContextChunks, readOverride, autoIndex, enabled, debounceMs, intervalMs, watcher, chokidar", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:119:127": "json,imageDescription,enabled,provider,model,baseUrl,timeoutMs,think,numCtx", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:128:137": "enabled, provider, baseUrl, model, think, numCtx, timeoutMs, maxContentChars, description", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:138:140": "file-path,mcp,object-keyword,json-syntax,boolean-value,property-enable,status-flag", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:141:144": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\opencode-rag.json,Line-Range:141-144,Languages:JSON,Key:logging,Value-Level:\"info\",LogFilePath:\"./.opencode/opencode-rag.log\"", + "C:/Daten/Entwicklung/OpenCodeRAG/opencode-rag.json:145:149": "File, C:\\Daten\\Entwicklung\\OpenCodeRAG\\opencode-rag.json, Language, JSON, Lines, 145-149, {\"chunking\":{}, \"nodeTypes\":{}}", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/dump-descriptions.ts:14:61": "File,CSS,Entwicklung,System,Lancedb,Typescript,Process,Arguments,Path,JSON.stringify,MkdirSync,WriteFileSync", + "C:/Daten/Entwicklung/OpenCodeRAG/src/eval/dump-descriptions.ts:63:66": "File:C:\\Daten\\Entwicklung\\OpenCodeRAG\\src\\eval\\dump-descriptions.ts,Language:typescript,Lines:63-66,Error-handling-code,Console-error-output,Exit-process-on-failure" +} \ No newline at end of file diff --git a/doc/eval-branch-compare-report.md b/doc/eval-branch-compare-report.md new file mode 100644 index 0000000..186898c --- /dev/null +++ b/doc/eval-branch-compare-report.md @@ -0,0 +1,703 @@ +# Branch Comparison Report + +**Generated:** 2026-07-06T08:43:13.404Z +**Main branch:** `main` @ `734fc60` (2026-07-06) +**Feature branch:** `t1-cosine-l2` @ `e922a0b` (2026-07-06) + +## Configuration + +| Setting | `main` | `t1-cosine-l2` | +|---|---|---| +| Embedding provider | ollama | ollama | +| Embedding model | qwen3-embedding:0.6b | qwen3-embedding:0.6b | +| topK | 20 | 20 | +| minScore | 0.5 | 0.5 | +| Hybrid search | true | true | +| Keyword weight | 0.4 | 0.4 | +| Indexed chunks | 542 | 542 | + +## Scoring Method Differences + +| Aspect | `main` | `t1-cosine-l2` | +|---|---|---| +| Vector scoring | `1 / (1 + L2 distance)` | Cosine similarity via L2-normalized vectors | +| Hybrid fusion | Weighted linear: `(1-kw)*normV + kw*normK` | Reciprocal Rank Fusion (RRF, K=60) | +| Default minScore | 0.5 | 0.5 | +| Metadata filter | Not supported | `MetadataFilter` support added | + +## Top-1 Score Quality + +| Metric | `main` | `t1-cosine-l2` | Δ | Δ% | +|---|---|---|---|---| +| Average | 0.567 | 0.010 | -0.557 | -98.3% | +| Median | 0.570 | 0.010 | -0.560 | -98.3% | +| P95 | 0.661 | 0.010 | -0.651 | -98.5% | +| P5 | 0.490 | 0.010 | -0.480 | -98.0% | +| Std Dev | 0.054 | 0.000 | -0.054 | — | + +> **Interpretation:** Cosine similarity produces scores in a tighter 0-1 range. +> RRF further shifts scores based on rank rather than raw similarity, so comparing +> absolute scores across branches is misleading. The key metric is **whether the same +> relevant files appear in the top results** (see Rank Stability below). + +## Result Count (per query) + +| Metric | `main` | `t1-cosine-l2` | Δ | +|---|---|---|---| +| Average | 60.0 | 20.0 | -40.0 | +| Median | 60.0 | 20.0 | -40.0 | +| P95 | 60.0 | 20.0 | — | +| Zero-result queries | 0 | 0 | — | + +## Latency (ms per query) + +| Metric | `main` | `t1-cosine-l2` | Δ | +|---|---|---|---| +| Average | 144.3 | 147.1 | +2.8 | +| Median | 142.2 | 142.6 | +0.4 | +| P95 | 186.3 | 189.2 | — | + +## Threshold Coverage + +Shows how many queries would trigger RAG context injection at each `minScore` threshold. + +| Threshold | `main` | `t1-cosine-l2` | Δ | +|---|---|---|---| +| 0.85 | 0/25 | 0/25 | +0 | +| 0.75 | 0/25 | 0/25 | +0 | +| 0.65 | 2/25 | 0/25 | -2 | +| 0.50 | 21/25 | 0/25 | -21 | +| 0.35 | 25/25 | 0/25 | -25 | + +## Rank Stability (Jaccard Similarity) + +For each query, computes the Jaccard similarity of the top-3 file paths between branches. +1.0 = identical top-3 files, 0.0 = completely different. + +| Metric | Value | +|---|---| +| Average | 0.000 | +| Median | 0.000 | +| Minimum | 0.000 | +| Maximum | 0.000 | + +## Per-Query Results + +| # | Query | `main` results | `main` top score | `t1-cosine-l2` results | `t1-cosine-l2` top score | Δ score | Jaccard (top-3) | +|---|---|---|---|---|---|---|---| +| 1 | How does the retrieval pipeline work end-to-end? | 60 | 0.577 | 20 | 0.010 | -0.567 | 0.000 | +| 2 | How does the plugin interact with chat messages? | 60 | 0.537 | 20 | 0.010 | -0.527 | 0.000 | +| 3 | How does the keyword index combine with vector ... | 60 | 0.559 | 20 | 0.010 | -0.549 | 0.000 | +| 4 | Where is the embedder factory defined? | 60 | 0.582 | 20 | 0.010 | -0.572 | 0.000 | +| 5 | Where is the LanceDB store implementation? | 60 | 0.573 | 20 | 0.010 | -0.563 | 0.000 | +| 6 | Find all usages of the retrieve function | 60 | 0.555 | 20 | 0.010 | -0.545 | 0.000 | +| 7 | Find all usages of SearchResult type | 60 | 0.576 | 20 | 0.010 | -0.566 | 0.000 | +| 8 | How does the chunker factory register new langu... | 60 | 0.607 | 20 | 0.010 | -0.597 | 0.000 | +| 9 | What is the default minScore configuration? | 60 | 0.489 | 20 | 0.010 | -0.479 | 0.000 | +| 10 | How does the session logger capture token usage? | 60 | 0.650 | 20 | 0.010 | -0.640 | 0.000 | +| 11 | How does L2 normalization affect vector search ... | 60 | 0.534 | 20 | 0.010 | -0.524 | 0.000 | +| 12 | What is the MetadataFilter interface used for? | 60 | 0.502 | 20 | 0.010 | -0.492 | 0.000 | +| 13 | How does the background indexer handle file cha... | 60 | 0.601 | 20 | 0.010 | -0.592 | 0.000 | +| 14 | Where is the config validation logic? | 60 | 0.511 | 20 | 0.010 | -0.501 | 0.000 | +| 15 | How are PDF documents chunked and indexed? | 60 | 0.599 | 20 | 0.010 | -0.589 | 0.000 | +| 16 | What embedding providers are supported? | 60 | 0.661 | 20 | 0.010 | -0.651 | 0.000 | +| 17 | How does the CLI parse and dispatch commands? | 60 | 0.552 | 20 | 0.010 | -0.542 | 0.000 | +| 18 | How does the session logger persist events? | 60 | 0.663 | 20 | 0.010 | -0.653 | 0.000 | +| 19 | What is the manifest schema version used for? | 60 | 0.490 | 20 | 0.010 | -0.480 | 0.000 | +| 20 | How does the OpenCode plugin register tools? | 60 | 0.622 | 20 | 0.010 | -0.613 | 0.000 | +| 21 | Where is the globMatch function defined? | 60 | 0.491 | 20 | 0.010 | -0.481 | 0.000 | +| 22 | How does the proxy-aware HTTP client work? | 60 | 0.547 | 20 | 0.010 | -0.537 | 0.000 | +| 23 | What is the FETCH_OVERFETCH_FACTOR constant? | 60 | 0.497 | 20 | 0.010 | -0.487 | 0.000 | +| 24 | How does the TUI settings menu work? | 60 | 0.570 | 20 | 0.010 | -0.560 | 0.000 | +| 25 | How are image descriptions generated? | 60 | 0.628 | 20 | 0.010 | -0.618 | 0.000 | + +## Raw Top-5 Results by Query + +Each query shows the top-5 file paths and scores for both branches side by side. + +### Query 1: How does the retrieval pipeline work end-to-end? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.577 | `src/plugin.ts` | 343-367 | typescript | +| 2 | 0.563 | `src/plugin.ts` | 321-336 | typescript | +| 3 | 0.541 | `src/opencode/read-fallback.ts` | 10-17 | typescript | +| 4 | 0.535 | `src/plugin.ts` | 301-315 | typescript | +| 5 | 0.527 | `src/plugin.ts` | 71-80 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 343-367 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 321-336 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/opencode/read-fallback.ts` | 10-17 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/plugin.ts` | 301-315 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/plugin.ts` | 71-80 | typescript | + +### Query 2: How does the plugin interact with chat messages? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.537 | `src/plugin.ts` | 460-484 | typescript | +| 2 | 0.527 | `src/describer/anthropic.ts` | 10-13 | typescript | +| 3 | 0.526 | `src/plugin.ts` | 799-898 | typescript | +| 4 | 0.523 | `src/describer/describer.ts` | 15-18 | typescript | +| 5 | 0.520 | `src/types/opencode-plugin.d.ts` | 25-53 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 460-484 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/describer/anthropic.ts` | 10-13 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 799-898 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/describer/describer.ts` | 15-18 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/types/opencode-plugin.d.ts` | 25-53 | typescript | + +### Query 3: How does the keyword index combine with vector search? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.559 | `src/plugin.ts` | 321-336 | typescript | +| 2 | 0.554 | `src/mcp/handlers.ts` | 184-236 | typescript | +| 3 | 0.548 | `src/web/api.ts` | 245-275 | typescript | +| 4 | 0.547 | `src/plugin.ts` | 343-367 | typescript | +| 5 | 0.545 | `src/plugin.ts` | 1044-1061 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 321-336 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 184-236 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/web/api.ts` | 245-275 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/plugin.ts` | 343-367 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/plugin.ts` | 1044-1061 | typescript | + +### Query 4: Where is the embedder factory defined? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.582 | `src/embedder/factory.ts` | 23-46 | typescript | +| 2 | 0.545 | `src/core/bootstrap.ts` | 56-66 | typescript | +| 3 | 0.507 | `src/embedder/factory.ts` | 62-101 | typescript | +| 4 | 0.504 | `src/embedder/health.ts` | 45-61 | typescript | +| 5 | 0.501 | `src/embedder/health.ts` | 397-404 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/embedder/factory.ts` | 23-46 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/core/bootstrap.ts` | 56-66 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/embedder/factory.ts` | 62-101 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/embedder/health.ts` | 45-61 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/embedder/health.ts` | 397-404 | typescript | + +### Query 5: Where is the LanceDB store implementation? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.573 | `src/web/api.ts` | 165-186 | typescript | +| 2 | 0.565 | `src/web/api.ts` | 189-192 | typescript | +| 3 | 0.555 | `src/vectorstore/factory.ts` | 22-38 | typescript | +| 4 | 0.531 | `src/web/api.ts` | 230-242 | typescript | +| 5 | 0.522 | `src/web/api.ts` | 199-227 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/web/api.ts` | 165-186 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/web/api.ts` | 189-192 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/vectorstore/factory.ts` | 22-38 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/web/api.ts` | 230-242 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/web/api.ts` | 199-227 | typescript | + +### Query 6: Find all usages of the retrieve function + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.555 | `src/mcp/handlers.ts` | 366-465 | typescript | +| 2 | 0.546 | `src/opencode/tools.ts` | 293-299 | typescript | +| 3 | 0.543 | `src/opencode/tools.ts` | 428-527 | typescript | +| 4 | 0.534 | `src/mcp/handlers.ts` | 290-299 | typescript | +| 5 | 0.532 | `src/mcp/handlers.ts` | 280-287 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 366-465 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/opencode/tools.ts` | 293-299 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/opencode/tools.ts` | 428-527 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 290-299 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 280-287 | typescript | + +### Query 7: Find all usages of SearchResult type + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.576 | `src/mcp/handlers.ts` | 290-299 | typescript | +| 2 | 0.568 | `src/mcp/handlers.ts` | 366-465 | typescript | +| 3 | 0.566 | `src/mcp/handlers.ts` | 176-181 | typescript | +| 4 | 0.562 | `src/opencode/tools.ts` | 528-627 | typescript | +| 5 | 0.562 | `src/mcp/handlers.ts` | 280-287 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 290-299 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 366-465 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 176-181 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/opencode/tools.ts` | 528-627 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 280-287 | typescript | + +### Query 8: How does the chunker factory register new languages? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.607 | `src/chunker/factory.ts` | 97-115 | typescript | +| 2 | 0.570 | `src/chunker/base.ts` | 57-64 | typescript | +| 3 | 0.560 | `src/chunker/grammar.ts` | 87-97 | typescript | +| 4 | 0.546 | `src/chunker/grammar.ts` | 110-123 | typescript | +| 5 | 0.543 | `src/chunker/factory.ts` | 134-136 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/chunker/factory.ts` | 97-115 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/chunker/base.ts` | 57-64 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/chunker/grammar.ts` | 87-97 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/chunker/grammar.ts` | 110-123 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/chunker/factory.ts` | 134-136 | typescript | + +### Query 9: What is the default minScore configuration? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.489 | `src/chunker/fallback.ts` | 15-17 | typescript | +| 2 | 0.484 | `src/retriever/context-optimizer.ts` | 49-51 | typescript | +| 3 | 0.482 | `src/describer/anthropic.ts` | 34-36 | typescript | +| 4 | 0.477 | `src/embedder/cohere.ts` | 26-32 | typescript | +| 5 | 0.477 | `src/plugin.ts` | 412-448 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/chunker/fallback.ts` | 15-17 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/retriever/context-optimizer.ts` | 49-51 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/describer/anthropic.ts` | 34-36 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/embedder/cohere.ts` | 26-32 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/plugin.ts` | 412-448 | typescript | + +### Query 10: How does the session logger capture token usage? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.650 | `src/eval/session-logger.ts` | 26-40 | typescript | +| 2 | 0.624 | `src/eval/session-logger.ts` | 12-24 | typescript | +| 3 | 0.605 | `src/eval/session-logger.ts` | 43-52 | typescript | +| 4 | 0.597 | `src/eval/token-analysis.ts` | 83-182 | typescript | +| 5 | 0.573 | `src/web/api.ts` | 385-407 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/eval/session-logger.ts` | 26-40 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/eval/session-logger.ts` | 12-24 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/eval/session-logger.ts` | 43-52 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/eval/token-analysis.ts` | 83-182 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/web/api.ts` | 385-407 | typescript | + +### Query 11: How does L2 normalization affect vector search scores? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.534 | `src/retriever/context-optimizer.ts` | 49-51 | typescript | +| 2 | 0.517 | `src/plugin.ts` | 343-367 | typescript | +| 3 | 0.508 | `src/plugin.ts` | 321-336 | typescript | +| 4 | 0.503 | `src/embedder/ollama.ts` | 51-97 | typescript | +| 5 | 0.498 | `src/eval/token-analysis.ts` | 223-307 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/retriever/context-optimizer.ts` | 49-51 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 343-367 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 321-336 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/embedder/ollama.ts` | 51-97 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/eval/token-analysis.ts` | 223-307 | typescript | + +### Query 12: What is the MetadataFilter interface used for? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.502 | `src/mcp/handlers.ts` | 308-313 | typescript | +| 2 | 0.499 | `src/plugin.ts` | 71-80 | typescript | +| 3 | 0.493 | `src/indexer/metadata.ts` | 88-105 | typescript | +| 4 | 0.491 | `src/opencode/tools.ts` | 293-299 | typescript | +| 5 | 0.490 | `src/opencode/create-read-tool.ts` | 261-264 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 308-313 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 71-80 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/indexer/metadata.ts` | 88-105 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/opencode/tools.ts` | 293-299 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/opencode/create-read-tool.ts` | 261-264 | typescript | + +### Query 13: How does the background indexer handle file changes? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.601 | `src/watcher.ts` | 78-177 | typescript | +| 2 | 0.584 | `src/watcher.ts` | 21-24 | typescript | +| 3 | 0.583 | `src/watcher.ts` | 27-46 | typescript | +| 4 | 0.565 | `src/indexer/worker.ts` | 120-125 | typescript | +| 5 | 0.550 | `src/watcher.ts` | 178-189 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/watcher.ts` | 78-177 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/watcher.ts` | 21-24 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/watcher.ts` | 27-46 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/indexer/worker.ts` | 120-125 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/watcher.ts` | 178-189 | typescript | + +### Query 14: Where is the config validation logic? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.511 | `src/eval/run-token-test.ts` | 40-48 | typescript | +| 2 | 0.511 | `src/tui.ts` | 265-271 | typescript | +| 3 | 0.505 | `src/cli/format.ts` | 130-134 | typescript | +| 4 | 0.499 | `src/plugin.ts` | 193-215 | typescript | +| 5 | 0.491 | `src/tui.ts` | 361-376 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/eval/run-token-test.ts` | 40-48 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/tui.ts` | 265-271 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/cli/format.ts` | 130-134 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/plugin.ts` | 193-215 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/tui.ts` | 361-376 | typescript | + +### Query 15: How are PDF documents chunked and indexed? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.599 | `src/chunker/docx.ts` | 39-108 | typescript | +| 2 | 0.580 | `src/chunker/doc.ts` | 40-109 | typescript | +| 3 | 0.556 | `src/indexer/worker.ts` | 120-125 | typescript | +| 4 | 0.550 | `src/chunker/excel.ts` | 49-108 | typescript | +| 5 | 0.548 | `src/content/pdf.ts` | 15-23 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/chunker/docx.ts` | 39-108 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/chunker/doc.ts` | 40-109 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/indexer/worker.ts` | 120-125 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/chunker/excel.ts` | 49-108 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/content/pdf.ts` | 15-23 | typescript | + +### Query 16: What embedding providers are supported? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.661 | `src/embedder/ollama.ts` | 51-97 | typescript | +| 2 | 0.645 | `src/embedder/openai.ts` | 60-89 | typescript | +| 3 | 0.645 | `src/embedder/health.ts` | 45-61 | typescript | +| 4 | 0.643 | `src/embedder/factory.ts` | 23-46 | typescript | +| 5 | 0.609 | `src/core/bootstrap.ts` | 56-66 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/embedder/ollama.ts` | 51-97 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/embedder/openai.ts` | 60-89 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/embedder/health.ts` | 45-61 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/embedder/factory.ts` | 23-46 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/core/bootstrap.ts` | 56-66 | typescript | + +### Query 17: How does the CLI parse and dispatch commands? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.552 | `src/cli/commands/query.ts` | 25-101 | typescript | +| 2 | 0.536 | `src/cli/commands/eval.ts` | 71-134 | typescript | +| 3 | 0.522 | `src/cli/format.ts` | 110-122 | typescript | +| 4 | 0.519 | `src/cli/commands/index.ts` | 1-18 | text | +| 5 | 0.517 | `src/cli/commands/show.ts` | 22-59 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/cli/commands/query.ts` | 25-101 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/cli/commands/eval.ts` | 71-134 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/cli/format.ts` | 110-122 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/cli/commands/index.ts` | 1-18 | text | +| 5 | 0.009 | `../OpenCodeRAG-main/src/cli/commands/show.ts` | 22-59 | typescript | + +### Query 18: How does the session logger persist events? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.663 | `src/eval/session-logger.ts` | 43-52 | typescript | +| 2 | 0.653 | `src/eval/session-logger.ts` | 58-157 | typescript | +| 3 | 0.623 | `src/eval/session-logger.ts` | 158-183 | typescript | +| 4 | 0.620 | `src/eval/session-logger.ts` | 26-40 | typescript | +| 5 | 0.605 | `src/eval/storage.ts` | 26-35 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/eval/session-logger.ts` | 43-52 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/eval/session-logger.ts` | 58-157 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/eval/session-logger.ts` | 158-183 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/eval/session-logger.ts` | 26-40 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/eval/storage.ts` | 26-35 | typescript | + +### Query 19: What is the manifest schema version used for? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.490 | `src/mcp/handlers.ts` | 308-313 | typescript | +| 2 | 0.490 | `src/core/version-check.ts` | 1-7 | typescript | +| 3 | 0.488 | `src/describer/anthropic.ts` | 15-17 | typescript | +| 4 | 0.487 | `src/indexer/pipeline.ts` | 749-819 | typescript | +| 5 | 0.485 | `src/eval/types.ts` | 68-93 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 308-313 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/core/version-check.ts` | 1-7 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/describer/anthropic.ts` | 15-17 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/indexer/pipeline.ts` | 749-819 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/eval/types.ts` | 68-93 | typescript | + +### Query 20: How does the OpenCode plugin register tools? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.622 | `src/plugin.ts` | 1213-1312 | typescript | +| 2 | 0.615 | `src/plugin.ts` | 699-798 | typescript | +| 3 | 0.595 | `src/plugin-entry.ts` | 1-19 | text | +| 4 | 0.586 | `src/cli/commands/setup.ts` | 28-40 | typescript | +| 5 | 0.565 | `src/plugin.ts` | 499-598 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 1213-1312 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/plugin.ts` | 699-798 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/plugin-entry.ts` | 1-19 | text | +| 4 | 0.009 | `../OpenCodeRAG-main/src/cli/commands/setup.ts` | 28-40 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/plugin.ts` | 499-598 | typescript | + +### Query 21: Where is the globMatch function defined? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.491 | `src/chunker/ssl.ts` | 145-165 | typescript | +| 2 | 0.483 | `src/mcp/handlers.ts` | 290-299 | typescript | +| 3 | 0.468 | `src/opencode/tools.ts` | 628-642 | typescript | +| 4 | 0.467 | `src/mcp/handlers.ts` | 159-161 | typescript | +| 5 | 0.465 | `src/core/provider-defaults.ts` | 100-105 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/chunker/ssl.ts` | 145-165 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 290-299 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/opencode/tools.ts` | 628-642 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 159-161 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/core/provider-defaults.ts` | 100-105 | typescript | + +### Query 22: How does the proxy-aware HTTP client work? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.547 | `src/embedder/http.ts` | 152-164 | typescript | +| 2 | 0.543 | `src/embedder/http.ts` | 484-501 | typescript | +| 3 | 0.540 | `src/embedder/http.ts` | 143-149 | typescript | +| 4 | 0.533 | `src/embedder/http.ts` | 504-557 | typescript | +| 5 | 0.528 | `src/embedder/cohere.ts` | 26-32 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/embedder/http.ts` | 152-164 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/embedder/http.ts` | 484-501 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/embedder/http.ts` | 143-149 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/embedder/http.ts` | 504-557 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/embedder/cohere.ts` | 26-32 | typescript | + +### Query 23: What is the FETCH_OVERFETCH_FACTOR constant? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.497 | `src/core/runtime-overrides.ts` | 12-54 | typescript | +| 2 | 0.491 | `src/eval/token-analysis.ts` | 397-420 | typescript | +| 3 | 0.490 | `src/chunker/fallback.ts` | 15-17 | typescript | +| 4 | 0.480 | `src/eval/token-analysis.ts` | 223-307 | typescript | +| 5 | 0.479 | `src/web/api.ts` | 416-440 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/core/runtime-overrides.ts` | 12-54 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/eval/token-analysis.ts` | 397-420 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/chunker/fallback.ts` | 15-17 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/eval/token-analysis.ts` | 223-307 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/web/api.ts` | 416-440 | typescript | + +### Query 24: How does the TUI settings menu work? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.570 | `src/tui.ts` | 283-294 | typescript | +| 2 | 0.568 | `src/tui.ts` | 608-707 | typescript | +| 3 | 0.556 | `src/tui.ts` | 297-306 | typescript | +| 4 | 0.531 | `src/tui.ts` | 527-602 | typescript | +| 5 | 0.516 | `src/tui.ts` | 427-526 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/tui.ts` | 283-294 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/tui.ts` | 608-707 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/tui.ts` | 297-306 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/tui.ts` | 527-602 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/tui.ts` | 427-526 | typescript | + +### Query 25: How are image descriptions generated? + +**`main`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.628 | `src/chunker/image.ts` | 151-208 | typescript | +| 2 | 0.611 | `src/chunker/image.ts` | 231-292 | typescript | +| 3 | 0.606 | `src/mcp/handlers.ts` | 308-313 | typescript | +| 4 | 0.597 | `src/opencode/tools.ts` | 334-415 | typescript | +| 5 | 0.594 | `src/indexer/description-stage.ts` | 32-119 | typescript | + +**`t1-cosine-l2`** +| Rank | Score | File | Lines | Language | +|------|-------|------|-------|----------| +| 1 | 0.010 | `../OpenCodeRAG-main/src/chunker/image.ts` | 151-208 | typescript | +| 2 | 0.010 | `../OpenCodeRAG-main/src/chunker/image.ts` | 231-292 | typescript | +| 3 | 0.010 | `../OpenCodeRAG-main/src/mcp/handlers.ts` | 308-313 | typescript | +| 4 | 0.009 | `../OpenCodeRAG-main/src/opencode/tools.ts` | 334-415 | typescript | +| 5 | 0.009 | `../OpenCodeRAG-main/src/indexer/description-stage.ts` | 32-119 | typescript | + +## Explanation / Score Breakdown (Sample) + +First 3 queries with explanation details when available. + +### Query 1: How does the retrieval pipeline work end-to-end? + +**`main`** (top-1 explanation) +| Component | Value | +|-----------|-------| +| vectorScore | 0.577 | +| keywordScore | 0.000 | +| rawVectorScore | 0.577 | +| rawKeywordScore | 0.000 | +| keywordWeight | 0.400 | + +**`t1-cosine-l2`** (top-1 explanation) +| Component | Value | +|-----------|-------| +| vectorScore | 0.010 | +| keywordScore | 0.000 | +| rawVectorScore | 0.817 | +| rawKeywordScore | 0.000 | +| keywordWeight | 0.400 | +| vectorRank | 0 | + +### Query 2: How does the plugin interact with chat messages? + +**`main`** (top-1 explanation) +| Component | Value | +|-----------|-------| +| vectorScore | 0.537 | +| keywordScore | 0.000 | +| rawVectorScore | 0.537 | +| rawKeywordScore | 0.000 | +| keywordWeight | 0.400 | + +**`t1-cosine-l2`** (top-1 explanation) +| Component | Value | +|-----------|-------| +| vectorScore | 0.010 | +| keywordScore | 0.000 | +| rawVectorScore | 0.784 | +| rawKeywordScore | 0.000 | +| keywordWeight | 0.400 | +| vectorRank | 0 | + +### Query 3: How does the keyword index combine with vector search? + +**`main`** (top-1 explanation) +| Component | Value | +|-----------|-------| +| vectorScore | 0.559 | +| keywordScore | 0.000 | +| rawVectorScore | 0.559 | +| rawKeywordScore | 0.000 | +| keywordWeight | 0.400 | + +**`t1-cosine-l2`** (top-1 explanation) +| Component | Value | +|-----------|-------| +| vectorScore | 0.010 | +| keywordScore | 0.000 | +| rawVectorScore | 0.803 | +| rawKeywordScore | 0.000 | +| keywordWeight | 0.400 | +| vectorRank | 0 | + +## Verdict + +The `t1-cosine-l2` branch shows: + +- **notable rank shift (Jaccard 0.000)** + +### Caveats + +- Cosine similarity + RRF produce fundamentally different score distributions than L2 + linear fusion. + **Absolute scores are not directly comparable** between the two approaches. +- The key quality indicator is **whether relevant files rank highly**, not the raw score value. +- RRF de-emphasizes raw similarity magnitude and focuses on rank agreement between vector and keyword signals. +- This means an RRF score of 0.05 can be just as meaningful as an L2 score of 0.85 — they are different scales. + +### Recommendation + +Review the raw top-5 results per query above to confirm that the cosine+RRF approach +retrieves the same or better files. If rank stability is high (Jaccard > 0.5) and +threshold coverage improves, the new scoring is likely a net positive. diff --git a/doc/eval-ranking-report.md b/doc/eval-ranking-report.md new file mode 100644 index 0000000..83bc6ff --- /dev/null +++ b/doc/eval-ranking-report.md @@ -0,0 +1,87 @@ +# Ranking Order Comparison + +**main (734fc60)** vs **t1-cosine-l2 (e922a0b)** +**Generated:** 2026-07-06T08:52:29.409Z + +## Config + +| Setting | `main` | `t1-cosine-l2` | +|---|---|---| +| Embedding | qwen3-embedding:0.6b | qwen3-embedding:0.6b | +| topK | 20 | 20 | +| minScore | 0.5 | 0.5 | +| Hybrid | true | true | +| keywordWeight | 0.4 | 0.4 | +| Index chunks | 542 | 542 | + +## Ranking Agreement + +| Metric | Value | +|---|---| +| Top-1 match | 25/25 | +| Top-3 identical | 25/25 | +| Top-5 identical | 25/25 | +| Full top-K identical | 25/25 | +| Avg overlap in top-5 | 5.0 | +| Avg overlap in top-K | 5.0 | +| Kendall's τ (avg) | 1.0000 | +| Queries with keyword contribution | 0/25 | + +## Verdict + +**Ranking is 100% identical across all queries.** + +The `t1-cosine-l2` branch changes two things simultaneously: +- Vector scoring: L2 distance → cosine similarity +- Hybrid fusion: Weighted linear combination → RRF (K=60) + +However, in this benchmark, **keyword scores are zero on every query** +because the keyword index doesn't match any query terms. When only one signal +(vector similarity) contributes, both fusion methods produce the same +rank order. This is because both are **monotonically decreasing functions** +of the vector rank: + +- **Linear**: `score = (1-kw) · normVectorScore` (monotonic in vector score) +- **RRF**: `score = (1-kw) / (K + rank + 1)` (monotonic in vector rank) + +Since vector rank is itself monotonic with vector score, the final ordering +is identical regardless of which formula is used. + +### When would RRF make a difference? + +RRF excels when **both vector AND keyword signals contribute** to a query. +It can boost results that rank highly in both sources while demoting results +that only rank well in one. To see this effect: +- Index more files (including docs with token-rich content) +- Use queries with specific identifier/keyword terms that match the keyword index +- Increase keywordWeight to amplify keyword contributions + +## Per-Query Detail + +| # | Query | Top-1 same | Top-5 same | Full same | τ | main score | branch score | +|---|---|:---:|:---:|:---:|:---:|:---:|:---:| +| NaN | How does the retrieval pipeline work end-to-end? | ✓ | ✓ | ✓ | 1.000 | 0.577 | 0.010 | +| NaN | How does the plugin interact with chat messages? | ✓ | ✓ | ✓ | 1.000 | 0.537 | 0.010 | +| NaN | How does the keyword index combine with vecto... | ✓ | ✓ | ✓ | 1.000 | 0.559 | 0.010 | +| NaN | Where is the embedder factory defined? | ✓ | ✓ | ✓ | 1.000 | 0.582 | 0.010 | +| NaN | Where is the LanceDB store implementation? | ✓ | ✓ | ✓ | 1.000 | 0.573 | 0.010 | +| NaN | Find all usages of the retrieve function | ✓ | ✓ | ✓ | 1.000 | 0.555 | 0.010 | +| NaN | Find all usages of SearchResult type | ✓ | ✓ | ✓ | 1.000 | 0.576 | 0.010 | +| NaN | How does the chunker factory register new lan... | ✓ | ✓ | ✓ | 1.000 | 0.607 | 0.010 | +| NaN | What is the default minScore configuration? | ✓ | ✓ | ✓ | 1.000 | 0.489 | 0.010 | +| NaN | How does the session logger capture token usage? | ✓ | ✓ | ✓ | 1.000 | 0.650 | 0.010 | +| NaN | How does L2 normalization affect vector searc... | ✓ | ✓ | ✓ | 1.000 | 0.534 | 0.010 | +| NaN | What is the MetadataFilter interface used for? | ✓ | ✓ | ✓ | 1.000 | 0.502 | 0.010 | +| NaN | How does the background indexer handle file c... | ✓ | ✓ | ✓ | 1.000 | 0.601 | 0.010 | +| NaN | Where is the config validation logic? | ✓ | ✓ | ✓ | 1.000 | 0.511 | 0.010 | +| NaN | How are PDF documents chunked and indexed? | ✓ | ✓ | ✓ | 1.000 | 0.599 | 0.010 | +| NaN | What embedding providers are supported? | ✓ | ✓ | ✓ | 1.000 | 0.661 | 0.010 | +| NaN | How does the CLI parse and dispatch commands? | ✓ | ✓ | ✓ | 1.000 | 0.552 | 0.010 | +| NaN | How does the session logger persist events? | ✓ | ✓ | ✓ | 1.000 | 0.663 | 0.010 | +| NaN | What is the manifest schema version used for? | ✓ | ✓ | ✓ | 1.000 | 0.490 | 0.010 | +| NaN | How does the OpenCode plugin register tools? | ✓ | ✓ | ✓ | 1.000 | 0.622 | 0.010 | +| NaN | Where is the globMatch function defined? | ✓ | ✓ | ✓ | 1.000 | 0.491 | 0.010 | +| NaN | How does the proxy-aware HTTP client work? | ✓ | ✓ | ✓ | 1.000 | 0.547 | 0.010 | +| NaN | What is the FETCH_OVERFETCH_FACTOR constant? | ✓ | ✓ | ✓ | 1.000 | 0.497 | 0.010 | +| NaN | How does the TUI settings menu work? | ✓ | ✓ | ✓ | 1.000 | 0.570 | 0.010 | +| NaN | How are image descriptions generated? | ✓ | ✓ | ✓ | 1.000 | 0.628 | 0.010 | diff --git a/doc/eval-results-main.json b/doc/eval-results-main.json new file mode 100644 index 0000000..e41e374 --- /dev/null +++ b/doc/eval-results-main.json @@ -0,0 +1,2766 @@ +{ + "branch": "main", + "commit": "734fc60", + "timestamp": "2026-07-06T08:51:02.551Z", + "config": { + "embeddingProvider": "ollama", + "embeddingModel": "qwen3-embedding:0.6b", + "topK": 20, + "minScore": 0.5, + "hybridEnabled": true, + "keywordWeight": 0.4 + }, + "indexChunkCount": 542, + "queries": [ + { + "query": "How does the retrieval pipeline work end-to-end?", + "queryIndex": 0, + "resultCount": 20, + "latencyMs": 152.2, + "topResults": [ + { + "rank": 0, + "score": 0.577182422078366, + "filePath": "src/plugin.ts", + "startLine": 343, + "endLine": 367, + "language": "typescript", + "explanation": { + "vectorScore": 0.577182422078366, + "keywordScore": 0, + "rawVectorScore": 0.577182422078366, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.56318317222156, + "filePath": "src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.56318317222156, + "keywordScore": 0, + "rawVectorScore": 0.56318317222156, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5405678599185256, + "filePath": "src/opencode/read-fallback.ts", + "startLine": 10, + "endLine": 17, + "language": "typescript", + "explanation": { + "vectorScore": 0.5405678599185256, + "keywordScore": 0, + "rawVectorScore": 0.5405678599185256, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5348612372239245, + "filePath": "src/plugin.ts", + "startLine": 301, + "endLine": 315, + "language": "typescript", + "explanation": { + "vectorScore": 0.5348612372239245, + "keywordScore": 0, + "rawVectorScore": 0.5348612372239245, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5266452642025707, + "filePath": "src/plugin.ts", + "startLine": 71, + "endLine": 80, + "language": "typescript", + "explanation": { + "vectorScore": 0.5266452642025707, + "keywordScore": 0, + "rawVectorScore": 0.5266452642025707, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 16, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the plugin interact with chat messages?", + "queryIndex": 1, + "resultCount": 20, + "latencyMs": 148.9, + "topResults": [ + { + "rank": 0, + "score": 0.5365629334612002, + "filePath": "src/plugin.ts", + "startLine": 460, + "endLine": 484, + "language": "typescript", + "explanation": { + "vectorScore": 0.5365629334612002, + "keywordScore": 0, + "rawVectorScore": 0.5365629334612002, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5271891880002136, + "filePath": "src/describer/anthropic.ts", + "startLine": 10, + "endLine": 13, + "language": "typescript", + "explanation": { + "vectorScore": 0.5271891880002136, + "keywordScore": 0, + "rawVectorScore": 0.5271891880002136, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5258237833833236, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, + "language": "typescript", + "explanation": { + "vectorScore": 0.5258237833833236, + "keywordScore": 0, + "rawVectorScore": 0.5258237833833236, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.523499772935638, + "filePath": "src/describer/describer.ts", + "startLine": 15, + "endLine": 18, + "language": "typescript", + "explanation": { + "vectorScore": 0.523499772935638, + "keywordScore": 0, + "rawVectorScore": 0.523499772935638, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.519862346858401, + "filePath": "src/types/opencode-plugin.d.ts", + "startLine": 25, + "endLine": 53, + "language": "typescript", + "explanation": { + "vectorScore": 0.519862346858401, + "keywordScore": 0, + "rawVectorScore": 0.519862346858401, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 17, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the keyword index combine with vector search?", + "queryIndex": 2, + "resultCount": 20, + "latencyMs": 143.4, + "topResults": [ + { + "rank": 0, + "score": 0.5593279003513683, + "filePath": "src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.5593279003513683, + "keywordScore": 0, + "rawVectorScore": 0.5593279003513683, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5535023376982596, + "filePath": "src/mcp/handlers.ts", + "startLine": 184, + "endLine": 236, + "language": "typescript", + "explanation": { + "vectorScore": 0.5535023376982596, + "keywordScore": 0, + "rawVectorScore": 0.5535023376982596, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5480133473519115, + "filePath": "src/web/api.ts", + "startLine": 245, + "endLine": 275, + "language": "typescript", + "explanation": { + "vectorScore": 0.5480133473519115, + "keywordScore": 0, + "rawVectorScore": 0.5480133473519115, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5468181376103564, + "filePath": "src/plugin.ts", + "startLine": 343, + "endLine": 367, + "language": "typescript", + "explanation": { + "vectorScore": 0.5468181376103564, + "keywordScore": 0, + "rawVectorScore": 0.5468181376103564, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5446637871744806, + "filePath": "src/plugin.ts", + "startLine": 1044, + "endLine": 1061, + "language": "typescript", + "explanation": { + "vectorScore": 0.5446637871744806, + "keywordScore": 0, + "rawVectorScore": 0.5446637871744806, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 13, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "Where is the embedder factory defined?", + "queryIndex": 3, + "resultCount": 20, + "latencyMs": 131.3, + "topResults": [ + { + "rank": 0, + "score": 0.5817631242382381, + "filePath": "src/embedder/factory.ts", + "startLine": 23, + "endLine": 46, + "language": "typescript", + "explanation": { + "vectorScore": 0.5817631242382381, + "keywordScore": 0, + "rawVectorScore": 0.5817631242382381, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5447795419845345, + "filePath": "src/core/bootstrap.ts", + "startLine": 56, + "endLine": 66, + "language": "typescript", + "explanation": { + "vectorScore": 0.5447795419845345, + "keywordScore": 0, + "rawVectorScore": 0.5447795419845345, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5069139060553813, + "filePath": "src/embedder/factory.ts", + "startLine": 62, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.5069139060553813, + "keywordScore": 0, + "rawVectorScore": 0.5069139060553813, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5038618802536617, + "filePath": "src/embedder/health.ts", + "startLine": 45, + "endLine": 61, + "language": "typescript", + "explanation": { + "vectorScore": 0.5038618802536617, + "keywordScore": 0, + "rawVectorScore": 0.5038618802536617, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5012114570379301, + "filePath": "src/embedder/health.ts", + "startLine": 397, + "endLine": 404, + "language": "typescript", + "explanation": { + "vectorScore": 0.5012114570379301, + "keywordScore": 0, + "rawVectorScore": 0.5012114570379301, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 6, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "Where is the LanceDB store implementation?", + "queryIndex": 4, + "resultCount": 20, + "latencyMs": 144.1, + "topResults": [ + { + "rank": 0, + "score": 0.572806989541465, + "filePath": "src/web/api.ts", + "startLine": 165, + "endLine": 186, + "language": "typescript", + "explanation": { + "vectorScore": 0.572806989541465, + "keywordScore": 0, + "rawVectorScore": 0.572806989541465, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5645650973168209, + "filePath": "src/web/api.ts", + "startLine": 189, + "endLine": 192, + "language": "typescript", + "explanation": { + "vectorScore": 0.5645650973168209, + "keywordScore": 0, + "rawVectorScore": 0.5645650973168209, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5554483210112929, + "filePath": "src/vectorstore/factory.ts", + "startLine": 22, + "endLine": 38, + "language": "typescript", + "explanation": { + "vectorScore": 0.5554483210112929, + "keywordScore": 0, + "rawVectorScore": 0.5554483210112929, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5309788478689071, + "filePath": "src/web/api.ts", + "startLine": 230, + "endLine": 242, + "language": "typescript", + "explanation": { + "vectorScore": 0.5309788478689071, + "keywordScore": 0, + "rawVectorScore": 0.5309788478689071, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.522365564132601, + "filePath": "src/web/api.ts", + "startLine": 199, + "endLine": 227, + "language": "typescript", + "explanation": { + "vectorScore": 0.522365564132601, + "keywordScore": 0, + "rawVectorScore": 0.522365564132601, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 8, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "Find all usages of the retrieve function", + "queryIndex": 5, + "resultCount": 20, + "latencyMs": 194.3, + "topResults": [ + { + "rank": 0, + "score": 0.5550896469652798, + "filePath": "src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, + "language": "typescript", + "explanation": { + "vectorScore": 0.5550896469652798, + "keywordScore": 0, + "rawVectorScore": 0.5550896469652798, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5464938200120028, + "filePath": "src/opencode/tools.ts", + "startLine": 293, + "endLine": 299, + "language": "typescript", + "explanation": { + "vectorScore": 0.5464938200120028, + "keywordScore": 0, + "rawVectorScore": 0.5464938200120028, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5430671078518944, + "filePath": "src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, + "language": "typescript", + "explanation": { + "vectorScore": 0.5430671078518944, + "keywordScore": 0, + "rawVectorScore": 0.5430671078518944, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5337774623648306, + "filePath": "src/mcp/handlers.ts", + "startLine": 290, + "endLine": 299, + "language": "typescript", + "explanation": { + "vectorScore": 0.5337774623648306, + "keywordScore": 0, + "rawVectorScore": 0.5337774623648306, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5324106228403723, + "filePath": "src/mcp/handlers.ts", + "startLine": 280, + "endLine": 287, + "language": "typescript", + "explanation": { + "vectorScore": 0.5324106228403723, + "keywordScore": 0, + "rawVectorScore": 0.5324106228403723, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 12, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "Find all usages of SearchResult type", + "queryIndex": 6, + "resultCount": 20, + "latencyMs": 135, + "topResults": [ + { + "rank": 0, + "score": 0.5757054205071269, + "filePath": "src/mcp/handlers.ts", + "startLine": 290, + "endLine": 299, + "language": "typescript", + "explanation": { + "vectorScore": 0.5757054205071269, + "keywordScore": 0, + "rawVectorScore": 0.5757054205071269, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5683594438123775, + "filePath": "src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, + "language": "typescript", + "explanation": { + "vectorScore": 0.5683594438123775, + "keywordScore": 0, + "rawVectorScore": 0.5683594438123775, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.566144591136295, + "filePath": "src/mcp/handlers.ts", + "startLine": 176, + "endLine": 181, + "language": "typescript", + "explanation": { + "vectorScore": 0.566144591136295, + "keywordScore": 0, + "rawVectorScore": 0.566144591136295, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5623030607232565, + "filePath": "src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, + "language": "typescript", + "explanation": { + "vectorScore": 0.5623030607232565, + "keywordScore": 0, + "rawVectorScore": 0.5623030607232565, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5618906907763801, + "filePath": "src/mcp/handlers.ts", + "startLine": 280, + "endLine": 287, + "language": "typescript", + "explanation": { + "vectorScore": 0.5618906907763801, + "keywordScore": 0, + "rawVectorScore": 0.5618906907763801, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 13, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the chunker factory register new languages?", + "queryIndex": 7, + "resultCount": 20, + "latencyMs": 134, + "topResults": [ + { + "rank": 0, + "score": 0.6071041818181423, + "filePath": "src/chunker/factory.ts", + "startLine": 97, + "endLine": 115, + "language": "typescript", + "explanation": { + "vectorScore": 0.6071041818181423, + "keywordScore": 0, + "rawVectorScore": 0.6071041818181423, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.569802700076729, + "filePath": "src/chunker/base.ts", + "startLine": 57, + "endLine": 64, + "language": "typescript", + "explanation": { + "vectorScore": 0.569802700076729, + "keywordScore": 0, + "rawVectorScore": 0.569802700076729, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5602417787656173, + "filePath": "src/chunker/grammar.ts", + "startLine": 87, + "endLine": 97, + "language": "typescript", + "explanation": { + "vectorScore": 0.5602417787656173, + "keywordScore": 0, + "rawVectorScore": 0.5602417787656173, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5455432515897193, + "filePath": "src/chunker/grammar.ts", + "startLine": 110, + "endLine": 123, + "language": "typescript", + "explanation": { + "vectorScore": 0.5455432515897193, + "keywordScore": 0, + "rawVectorScore": 0.5455432515897193, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5426944664638417, + "filePath": "src/chunker/factory.ts", + "startLine": 134, + "endLine": 136, + "language": "typescript", + "explanation": { + "vectorScore": 0.5426944664638417, + "keywordScore": 0, + "rawVectorScore": 0.5426944664638417, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "What is the default minScore configuration?", + "queryIndex": 8, + "resultCount": 20, + "latencyMs": 134.4, + "topResults": [ + { + "rank": 0, + "score": 0.48892181029471843, + "filePath": "src/chunker/fallback.ts", + "startLine": 15, + "endLine": 17, + "language": "typescript", + "explanation": { + "vectorScore": 0.48892181029471843, + "keywordScore": 0, + "rawVectorScore": 0.48892181029471843, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.48419510216855544, + "filePath": "src/retriever/context-optimizer.ts", + "startLine": 49, + "endLine": 51, + "language": "typescript", + "explanation": { + "vectorScore": 0.48419510216855544, + "keywordScore": 0, + "rawVectorScore": 0.48419510216855544, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.48220511569439745, + "filePath": "src/describer/anthropic.ts", + "startLine": 34, + "endLine": 36, + "language": "typescript", + "explanation": { + "vectorScore": 0.48220511569439745, + "keywordScore": 0, + "rawVectorScore": 0.48220511569439745, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.47732997731936505, + "filePath": "src/embedder/cohere.ts", + "startLine": 26, + "endLine": 32, + "language": "typescript", + "explanation": { + "vectorScore": 0.47732997731936505, + "keywordScore": 0, + "rawVectorScore": 0.47732997731936505, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.476834340498025, + "filePath": "src/plugin.ts", + "startLine": 412, + "endLine": 448, + "language": "typescript", + "explanation": { + "vectorScore": 0.476834340498025, + "keywordScore": 0, + "rawVectorScore": 0.476834340498025, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the session logger capture token usage?", + "queryIndex": 9, + "resultCount": 20, + "latencyMs": 134.4, + "topResults": [ + { + "rank": 0, + "score": 0.64997790367023, + "filePath": "src/eval/session-logger.ts", + "startLine": 26, + "endLine": 40, + "language": "typescript", + "explanation": { + "vectorScore": 0.64997790367023, + "keywordScore": 0, + "rawVectorScore": 0.64997790367023, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.6242235350041389, + "filePath": "src/eval/session-logger.ts", + "startLine": 12, + "endLine": 24, + "language": "typescript", + "explanation": { + "vectorScore": 0.6242235350041389, + "keywordScore": 0, + "rawVectorScore": 0.6242235350041389, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.6052995517731005, + "filePath": "src/eval/session-logger.ts", + "startLine": 43, + "endLine": 52, + "language": "typescript", + "explanation": { + "vectorScore": 0.6052995517731005, + "keywordScore": 0, + "rawVectorScore": 0.6052995517731005, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5971586335739852, + "filePath": "src/eval/token-analysis.ts", + "startLine": 83, + "endLine": 182, + "language": "typescript", + "explanation": { + "vectorScore": 0.5971586335739852, + "keywordScore": 0, + "rawVectorScore": 0.5971586335739852, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5731101818065053, + "filePath": "src/web/api.ts", + "startLine": 385, + "endLine": 407, + "language": "typescript", + "explanation": { + "vectorScore": 0.5731101818065053, + "keywordScore": 0, + "rawVectorScore": 0.5731101818065053, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does L2 normalization affect vector search scores?", + "queryIndex": 10, + "resultCount": 20, + "latencyMs": 177, + "topResults": [ + { + "rank": 0, + "score": 0.5337170795728613, + "filePath": "src/retriever/context-optimizer.ts", + "startLine": 49, + "endLine": 51, + "language": "typescript", + "explanation": { + "vectorScore": 0.5337170795728613, + "keywordScore": 0, + "rawVectorScore": 0.5337170795728613, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5165566800276302, + "filePath": "src/plugin.ts", + "startLine": 343, + "endLine": 367, + "language": "typescript", + "explanation": { + "vectorScore": 0.5165566800276302, + "keywordScore": 0, + "rawVectorScore": 0.5165566800276302, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5082491036230451, + "filePath": "src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.5082491036230451, + "keywordScore": 0, + "rawVectorScore": 0.5082491036230451, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5026611907652707, + "filePath": "src/embedder/ollama.ts", + "startLine": 51, + "endLine": 97, + "language": "typescript", + "explanation": { + "vectorScore": 0.5026611907652707, + "keywordScore": 0, + "rawVectorScore": 0.5026611907652707, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.4984218379927961, + "filePath": "src/eval/token-analysis.ts", + "startLine": 223, + "endLine": 307, + "language": "typescript", + "explanation": { + "vectorScore": 0.4984218379927961, + "keywordScore": 0, + "rawVectorScore": 0.4984218379927961, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 4, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "What is the MetadataFilter interface used for?", + "queryIndex": 11, + "resultCount": 20, + "latencyMs": 148.8, + "topResults": [ + { + "rank": 0, + "score": 0.5021709176592174, + "filePath": "src/mcp/handlers.ts", + "startLine": 308, + "endLine": 313, + "language": "typescript", + "explanation": { + "vectorScore": 0.5021709176592174, + "keywordScore": 0, + "rawVectorScore": 0.5021709176592174, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.4993056773273916, + "filePath": "src/plugin.ts", + "startLine": 71, + "endLine": 80, + "language": "typescript", + "explanation": { + "vectorScore": 0.4993056773273916, + "keywordScore": 0, + "rawVectorScore": 0.4993056773273916, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.49328544161900684, + "filePath": "src/indexer/metadata.ts", + "startLine": 88, + "endLine": 105, + "language": "typescript", + "explanation": { + "vectorScore": 0.49328544161900684, + "keywordScore": 0, + "rawVectorScore": 0.49328544161900684, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.49118305993298894, + "filePath": "src/opencode/tools.ts", + "startLine": 293, + "endLine": 299, + "language": "typescript", + "explanation": { + "vectorScore": 0.49118305993298894, + "keywordScore": 0, + "rawVectorScore": 0.49118305993298894, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.4899592501199694, + "filePath": "src/opencode/create-read-tool.ts", + "startLine": 261, + "endLine": 264, + "language": "typescript", + "explanation": { + "vectorScore": 0.4899592501199694, + "keywordScore": 0, + "rawVectorScore": 0.4899592501199694, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 1, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the background indexer handle file changes?", + "queryIndex": 12, + "resultCount": 20, + "latencyMs": 140.5, + "topResults": [ + { + "rank": 0, + "score": 0.6013927958823782, + "filePath": "src/watcher.ts", + "startLine": 78, + "endLine": 177, + "language": "typescript", + "explanation": { + "vectorScore": 0.6013927958823782, + "keywordScore": 0, + "rawVectorScore": 0.6013927958823782, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.584471994512437, + "filePath": "src/watcher.ts", + "startLine": 21, + "endLine": 24, + "language": "typescript", + "explanation": { + "vectorScore": 0.584471994512437, + "keywordScore": 0, + "rawVectorScore": 0.584471994512437, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.582944980528561, + "filePath": "src/watcher.ts", + "startLine": 27, + "endLine": 46, + "language": "typescript", + "explanation": { + "vectorScore": 0.582944980528561, + "keywordScore": 0, + "rawVectorScore": 0.582944980528561, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5652756993373081, + "filePath": "src/indexer/worker.ts", + "startLine": 120, + "endLine": 125, + "language": "typescript", + "explanation": { + "vectorScore": 0.5652756993373081, + "keywordScore": 0, + "rawVectorScore": 0.5652756993373081, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5495112894178465, + "filePath": "src/watcher.ts", + "startLine": 178, + "endLine": 189, + "language": "typescript", + "explanation": { + "vectorScore": 0.5495112894178465, + "keywordScore": 0, + "rawVectorScore": 0.5495112894178465, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "Where is the config validation logic?", + "queryIndex": 13, + "resultCount": 20, + "latencyMs": 139.5, + "topResults": [ + { + "rank": 0, + "score": 0.5111564857236017, + "filePath": "src/eval/run-token-test.ts", + "startLine": 40, + "endLine": 48, + "language": "typescript", + "explanation": { + "vectorScore": 0.5111564857236017, + "keywordScore": 0, + "rawVectorScore": 0.5111564857236017, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5110111323272439, + "filePath": "src/tui.ts", + "startLine": 265, + "endLine": 271, + "language": "typescript", + "explanation": { + "vectorScore": 0.5110111323272439, + "keywordScore": 0, + "rawVectorScore": 0.5110111323272439, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5049805119823045, + "filePath": "src/cli/format.ts", + "startLine": 130, + "endLine": 134, + "language": "typescript", + "explanation": { + "vectorScore": 0.5049805119823045, + "keywordScore": 0, + "rawVectorScore": 0.5049805119823045, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.4990456770386439, + "filePath": "src/plugin.ts", + "startLine": 193, + "endLine": 215, + "language": "typescript", + "explanation": { + "vectorScore": 0.4990456770386439, + "keywordScore": 0, + "rawVectorScore": 0.4990456770386439, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.4907326233397001, + "filePath": "src/tui.ts", + "startLine": 361, + "endLine": 376, + "language": "typescript", + "explanation": { + "vectorScore": 0.4907326233397001, + "keywordScore": 0, + "rawVectorScore": 0.4907326233397001, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 3, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How are PDF documents chunked and indexed?", + "queryIndex": 14, + "resultCount": 20, + "latencyMs": 142.3, + "topResults": [ + { + "rank": 0, + "score": 0.5988040562536635, + "filePath": "src/chunker/docx.ts", + "startLine": 39, + "endLine": 108, + "language": "typescript", + "explanation": { + "vectorScore": 0.5988040562536635, + "keywordScore": 0, + "rawVectorScore": 0.5988040562536635, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5804692817652682, + "filePath": "src/chunker/doc.ts", + "startLine": 40, + "endLine": 109, + "language": "typescript", + "explanation": { + "vectorScore": 0.5804692817652682, + "keywordScore": 0, + "rawVectorScore": 0.5804692817652682, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5560128785732158, + "filePath": "src/indexer/worker.ts", + "startLine": 120, + "endLine": 125, + "language": "typescript", + "explanation": { + "vectorScore": 0.5560128785732158, + "keywordScore": 0, + "rawVectorScore": 0.5560128785732158, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5501933735756055, + "filePath": "src/chunker/excel.ts", + "startLine": 49, + "endLine": 108, + "language": "typescript", + "explanation": { + "vectorScore": 0.5501933735756055, + "keywordScore": 0, + "rawVectorScore": 0.5501933735756055, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5483333602969859, + "filePath": "src/content/pdf.ts", + "startLine": 15, + "endLine": 23, + "language": "typescript", + "explanation": { + "vectorScore": 0.5483333602969859, + "keywordScore": 0, + "rawVectorScore": 0.5483333602969859, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "What embedding providers are supported?", + "queryIndex": 15, + "resultCount": 20, + "latencyMs": 182.4, + "topResults": [ + { + "rank": 0, + "score": 0.660832259007303, + "filePath": "src/embedder/ollama.ts", + "startLine": 51, + "endLine": 97, + "language": "typescript", + "explanation": { + "vectorScore": 0.660832259007303, + "keywordScore": 0, + "rawVectorScore": 0.660832259007303, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.6448630403411468, + "filePath": "src/embedder/openai.ts", + "startLine": 60, + "endLine": 89, + "language": "typescript", + "explanation": { + "vectorScore": 0.6448630403411468, + "keywordScore": 0, + "rawVectorScore": 0.6448630403411468, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.644602639497984, + "filePath": "src/embedder/health.ts", + "startLine": 45, + "endLine": 61, + "language": "typescript", + "explanation": { + "vectorScore": 0.644602639497984, + "keywordScore": 0, + "rawVectorScore": 0.644602639497984, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.6434828647517459, + "filePath": "src/embedder/factory.ts", + "startLine": 23, + "endLine": 46, + "language": "typescript", + "explanation": { + "vectorScore": 0.6434828647517459, + "keywordScore": 0, + "rawVectorScore": 0.6434828647517459, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.6091671191094286, + "filePath": "src/core/bootstrap.ts", + "startLine": 56, + "endLine": 66, + "language": "typescript", + "explanation": { + "vectorScore": 0.6091671191094286, + "keywordScore": 0, + "rawVectorScore": 0.6091671191094286, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 1, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the CLI parse and dispatch commands?", + "queryIndex": 16, + "resultCount": 20, + "latencyMs": 129.9, + "topResults": [ + { + "rank": 0, + "score": 0.5516739028063521, + "filePath": "src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.5516739028063521, + "keywordScore": 0, + "rawVectorScore": 0.5516739028063521, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5364078675636673, + "filePath": "src/cli/commands/eval.ts", + "startLine": 71, + "endLine": 134, + "language": "typescript", + "explanation": { + "vectorScore": 0.5364078675636673, + "keywordScore": 0, + "rawVectorScore": 0.5364078675636673, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5220385521923081, + "filePath": "src/cli/format.ts", + "startLine": 110, + "endLine": 122, + "language": "typescript", + "explanation": { + "vectorScore": 0.5220385521923081, + "keywordScore": 0, + "rawVectorScore": 0.5220385521923081, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5189242529738165, + "filePath": "src/cli/commands/index.ts", + "startLine": 1, + "endLine": 18, + "language": "text", + "explanation": { + "vectorScore": 0.5189242529738165, + "keywordScore": 0, + "rawVectorScore": 0.5189242529738165, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5168549634058027, + "filePath": "src/cli/commands/show.ts", + "startLine": 22, + "endLine": 59, + "language": "typescript", + "explanation": { + "vectorScore": 0.5168549634058027, + "keywordScore": 0, + "rawVectorScore": 0.5168549634058027, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 11, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the session logger persist events?", + "queryIndex": 17, + "resultCount": 20, + "latencyMs": 134.7, + "topResults": [ + { + "rank": 0, + "score": 0.6629804422299629, + "filePath": "src/eval/session-logger.ts", + "startLine": 43, + "endLine": 52, + "language": "typescript", + "explanation": { + "vectorScore": 0.6629804422299629, + "keywordScore": 0, + "rawVectorScore": 0.6629804422299629, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.6525293734589068, + "filePath": "src/eval/session-logger.ts", + "startLine": 58, + "endLine": 157, + "language": "typescript", + "explanation": { + "vectorScore": 0.6525293734589068, + "keywordScore": 0, + "rawVectorScore": 0.6525293734589068, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.6231078176573119, + "filePath": "src/eval/session-logger.ts", + "startLine": 158, + "endLine": 183, + "language": "typescript", + "explanation": { + "vectorScore": 0.6231078176573119, + "keywordScore": 0, + "rawVectorScore": 0.6231078176573119, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.6197640686054513, + "filePath": "src/eval/session-logger.ts", + "startLine": 26, + "endLine": 40, + "language": "typescript", + "explanation": { + "vectorScore": 0.6197640686054513, + "keywordScore": 0, + "rawVectorScore": 0.6197640686054513, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.6046078910458497, + "filePath": "src/eval/storage.ts", + "startLine": 26, + "endLine": 35, + "language": "typescript", + "explanation": { + "vectorScore": 0.6046078910458497, + "keywordScore": 0, + "rawVectorScore": 0.6046078910458497, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 2, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "What is the manifest schema version used for?", + "queryIndex": 18, + "resultCount": 20, + "latencyMs": 143.9, + "topResults": [ + { + "rank": 0, + "score": 0.49013616945095406, + "filePath": "src/mcp/handlers.ts", + "startLine": 308, + "endLine": 313, + "language": "typescript", + "explanation": { + "vectorScore": 0.49013616945095406, + "keywordScore": 0, + "rawVectorScore": 0.49013616945095406, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.4898090834781935, + "filePath": "src/core/version-check.ts", + "startLine": 1, + "endLine": 7, + "language": "typescript", + "explanation": { + "vectorScore": 0.4898090834781935, + "keywordScore": 0, + "rawVectorScore": 0.4898090834781935, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.4880516873740033, + "filePath": "src/describer/anthropic.ts", + "startLine": 15, + "endLine": 17, + "language": "typescript", + "explanation": { + "vectorScore": 0.4880516873740033, + "keywordScore": 0, + "rawVectorScore": 0.4880516873740033, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.48674629277419823, + "filePath": "src/indexer/pipeline.ts", + "startLine": 749, + "endLine": 819, + "language": "typescript", + "explanation": { + "vectorScore": 0.48674629277419823, + "keywordScore": 0, + "rawVectorScore": 0.48674629277419823, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.48530710226822393, + "filePath": "src/eval/types.ts", + "startLine": 68, + "endLine": 93, + "language": "typescript", + "explanation": { + "vectorScore": 0.48530710226822393, + "keywordScore": 0, + "rawVectorScore": 0.48530710226822393, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the OpenCode plugin register tools?", + "queryIndex": 19, + "resultCount": 20, + "latencyMs": 149.9, + "topResults": [ + { + "rank": 0, + "score": 0.6223978580618758, + "filePath": "src/plugin.ts", + "startLine": 1213, + "endLine": 1312, + "language": "typescript", + "explanation": { + "vectorScore": 0.6223978580618758, + "keywordScore": 0, + "rawVectorScore": 0.6223978580618758, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.6152836440517907, + "filePath": "src/plugin.ts", + "startLine": 699, + "endLine": 798, + "language": "typescript", + "explanation": { + "vectorScore": 0.6152836440517907, + "keywordScore": 0, + "rawVectorScore": 0.6152836440517907, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5947045075873209, + "filePath": "src/plugin-entry.ts", + "startLine": 1, + "endLine": 19, + "language": "text", + "explanation": { + "vectorScore": 0.5947045075873209, + "keywordScore": 0, + "rawVectorScore": 0.5947045075873209, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5859969796238651, + "filePath": "src/cli/commands/setup.ts", + "startLine": 28, + "endLine": 40, + "language": "typescript", + "explanation": { + "vectorScore": 0.5859969796238651, + "keywordScore": 0, + "rawVectorScore": 0.5859969796238651, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5650384113063616, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, + "language": "typescript", + "explanation": { + "vectorScore": 0.5650384113063616, + "keywordScore": 0, + "rawVectorScore": 0.5650384113063616, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "Where is the globMatch function defined?", + "queryIndex": 20, + "resultCount": 20, + "latencyMs": 184.8, + "topResults": [ + { + "rank": 0, + "score": 0.49101113217391773, + "filePath": "src/chunker/ssl.ts", + "startLine": 145, + "endLine": 165, + "language": "typescript", + "explanation": { + "vectorScore": 0.49101113217391773, + "keywordScore": 0, + "rawVectorScore": 0.49101113217391773, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.4832034179843825, + "filePath": "src/mcp/handlers.ts", + "startLine": 290, + "endLine": 299, + "language": "typescript", + "explanation": { + "vectorScore": 0.4832034179843825, + "keywordScore": 0, + "rawVectorScore": 0.4832034179843825, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.46767902060794087, + "filePath": "src/opencode/tools.ts", + "startLine": 628, + "endLine": 642, + "language": "typescript", + "explanation": { + "vectorScore": 0.46767902060794087, + "keywordScore": 0, + "rawVectorScore": 0.46767902060794087, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.4670850304863925, + "filePath": "src/mcp/handlers.ts", + "startLine": 159, + "endLine": 161, + "language": "typescript", + "explanation": { + "vectorScore": 0.4670850304863925, + "keywordScore": 0, + "rawVectorScore": 0.4670850304863925, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.4647097165265677, + "filePath": "src/core/provider-defaults.ts", + "startLine": 100, + "endLine": 105, + "language": "typescript", + "explanation": { + "vectorScore": 0.4647097165265677, + "keywordScore": 0, + "rawVectorScore": 0.4647097165265677, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the proxy-aware HTTP client work?", + "queryIndex": 21, + "resultCount": 20, + "latencyMs": 144.2, + "topResults": [ + { + "rank": 0, + "score": 0.5466284128362742, + "filePath": "src/embedder/http.ts", + "startLine": 152, + "endLine": 164, + "language": "typescript", + "explanation": { + "vectorScore": 0.5466284128362742, + "keywordScore": 0, + "rawVectorScore": 0.5466284128362742, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5432101659452181, + "filePath": "src/embedder/http.ts", + "startLine": 484, + "endLine": 501, + "language": "typescript", + "explanation": { + "vectorScore": 0.5432101659452181, + "keywordScore": 0, + "rawVectorScore": 0.5432101659452181, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5396499104476383, + "filePath": "src/embedder/http.ts", + "startLine": 143, + "endLine": 149, + "language": "typescript", + "explanation": { + "vectorScore": 0.5396499104476383, + "keywordScore": 0, + "rawVectorScore": 0.5396499104476383, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5330086376024127, + "filePath": "src/embedder/http.ts", + "startLine": 504, + "endLine": 557, + "language": "typescript", + "explanation": { + "vectorScore": 0.5330086376024127, + "keywordScore": 0, + "rawVectorScore": 0.5330086376024127, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5283696555894284, + "filePath": "src/embedder/cohere.ts", + "startLine": 26, + "endLine": 32, + "language": "typescript", + "explanation": { + "vectorScore": 0.5283696555894284, + "keywordScore": 0, + "rawVectorScore": 0.5283696555894284, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 10, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "What is the FETCH_OVERFETCH_FACTOR constant?", + "queryIndex": 22, + "resultCount": 20, + "latencyMs": 149.7, + "topResults": [ + { + "rank": 0, + "score": 0.4972989931018104, + "filePath": "src/core/runtime-overrides.ts", + "startLine": 12, + "endLine": 54, + "language": "typescript", + "explanation": { + "vectorScore": 0.4972989931018104, + "keywordScore": 0, + "rawVectorScore": 0.4972989931018104, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.4911339418628084, + "filePath": "src/eval/token-analysis.ts", + "startLine": 397, + "endLine": 420, + "language": "typescript", + "explanation": { + "vectorScore": 0.4911339418628084, + "keywordScore": 0, + "rawVectorScore": 0.4911339418628084, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.49003999308105267, + "filePath": "src/chunker/fallback.ts", + "startLine": 15, + "endLine": 17, + "language": "typescript", + "explanation": { + "vectorScore": 0.49003999308105267, + "keywordScore": 0, + "rawVectorScore": 0.49003999308105267, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.4799834020632183, + "filePath": "src/eval/token-analysis.ts", + "startLine": 223, + "endLine": 307, + "language": "typescript", + "explanation": { + "vectorScore": 0.4799834020632183, + "keywordScore": 0, + "rawVectorScore": 0.4799834020632183, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.47937757208172055, + "filePath": "src/web/api.ts", + "startLine": 416, + "endLine": 440, + "language": "typescript", + "explanation": { + "vectorScore": 0.47937757208172055, + "keywordScore": 0, + "rawVectorScore": 0.47937757208172055, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How does the TUI settings menu work?", + "queryIndex": 23, + "resultCount": 20, + "latencyMs": 155.6, + "topResults": [ + { + "rank": 0, + "score": 0.5701993660084598, + "filePath": "src/tui.ts", + "startLine": 283, + "endLine": 294, + "language": "typescript", + "explanation": { + "vectorScore": 0.5701993660084598, + "keywordScore": 0, + "rawVectorScore": 0.5701993660084598, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.5677701442097971, + "filePath": "src/tui.ts", + "startLine": 608, + "endLine": 707, + "language": "typescript", + "explanation": { + "vectorScore": 0.5677701442097971, + "keywordScore": 0, + "rawVectorScore": 0.5677701442097971, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.5563343170390304, + "filePath": "src/tui.ts", + "startLine": 297, + "endLine": 306, + "language": "typescript", + "explanation": { + "vectorScore": 0.5563343170390304, + "keywordScore": 0, + "rawVectorScore": 0.5563343170390304, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.531354382301278, + "filePath": "src/tui.ts", + "startLine": 527, + "endLine": 602, + "language": "typescript", + "explanation": { + "vectorScore": 0.531354382301278, + "keywordScore": 0, + "rawVectorScore": 0.531354382301278, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5163395814327083, + "filePath": "src/tui.ts", + "startLine": 427, + "endLine": 526, + "language": "typescript", + "explanation": { + "vectorScore": 0.5163395814327083, + "keywordScore": 0, + "rawVectorScore": 0.5163395814327083, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 8, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "How are image descriptions generated?", + "queryIndex": 24, + "resultCount": 20, + "latencyMs": 135.3, + "topResults": [ + { + "rank": 0, + "score": 0.6276211083278715, + "filePath": "src/chunker/image.ts", + "startLine": 151, + "endLine": 208, + "language": "typescript", + "explanation": { + "vectorScore": 0.6276211083278715, + "keywordScore": 0, + "rawVectorScore": 0.6276211083278715, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 1, + "score": 0.6105379524493967, + "filePath": "src/chunker/image.ts", + "startLine": 231, + "endLine": 292, + "language": "typescript", + "explanation": { + "vectorScore": 0.6105379524493967, + "keywordScore": 0, + "rawVectorScore": 0.6105379524493967, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 2, + "score": 0.6056255124575604, + "filePath": "src/mcp/handlers.ts", + "startLine": 308, + "endLine": 313, + "language": "typescript", + "explanation": { + "vectorScore": 0.6056255124575604, + "keywordScore": 0, + "rawVectorScore": 0.6056255124575604, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 3, + "score": 0.5974183115666772, + "filePath": "src/opencode/tools.ts", + "startLine": 334, + "endLine": 415, + "language": "typescript", + "explanation": { + "vectorScore": 0.5974183115666772, + "keywordScore": 0, + "rawVectorScore": 0.5974183115666772, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + }, + { + "rank": 4, + "score": 0.5939281969631285, + "filePath": "src/indexer/description-stage.ts", + "startLine": 32, + "endLine": 119, + "language": "typescript", + "explanation": { + "vectorScore": 0.5939281969631285, + "keywordScore": 0, + "rawVectorScore": 0.5939281969631285, + "rawKeywordScore": 0, + "keywordWeight": 0.4 + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + } + ] +} \ No newline at end of file diff --git a/doc/eval-results-t1-cosine-l2.json b/doc/eval-results-t1-cosine-l2.json index 8e758ba..fd352ca 100644 --- a/doc/eval-results-t1-cosine-l2.json +++ b/doc/eval-results-t1-cosine-l2.json @@ -1,110 +1,101 @@ { "branch": "t1-cosine-l2", - "commit": "8b9af91", - "timestamp": "2026-07-06T07:36:52.613Z", + "commit": "e922a0b", + "timestamp": "2026-07-06T08:42:12.243Z", "config": { "embeddingProvider": "ollama", "embeddingModel": "qwen3-embedding:0.6b", "topK": 20, "minScore": 0.5, "hybridEnabled": true, - "keywordWeight": 0.1 + "keywordWeight": 0.4 }, - "indexChunkCount": 1180, + "indexChunkCount": 542, "queries": [ { "query": "How does the retrieval pipeline work end-to-end?", "queryIndex": 0, "resultCount": 20, - "latencyMs": 357.1, + "latencyMs": 238.7, "topResults": [ { "rank": 0, - "score": 0.014754098360655738, - "filePath": "opencode-rag.example.json", - "startLine": 46, - "endLine": 53, - "language": "json", + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 343, + "endLine": 367, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009836065573770491, "keywordScore": 0, - "rawVectorScore": 0.8427461385726929, + "rawVectorScore": 0.8168614208698273, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 0 } }, { "rank": 1, - "score": 0.01464374482187241, - "filePath": "doc/retrieval.md", - "startLine": 101, - "endLine": 159, - "language": "markdown", - "explanation": { - "vectorScore": 0.013235294117647059, - "keywordScore": 0.0014084507042253522, - "rawVectorScore": 0.8234953284263611, - "rawKeywordScore": 17.758572049438392, - "keywordWeight": 0.1, - "vectorRank": 7, - "keywordRank": 10, - "matchedTerms": [ - "does", - "the", - "retrieval", - "pipeline", - "pipelin", - "to" - ] + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.806094765663147, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014516129032258065, - "filePath": "opencode-rag.json", - "startLine": 2, - "endLine": 7, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/opencode/read-fallback.ts", + "startLine": 10, + "endLine": 17, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.835597425699234, + "rawVectorScore": 0.7875233888626099, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014285714285714285, - "filePath": "opencode-rag.yaml", - "startLine": 1, - "endLine": 1, - "language": "yaml", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 301, + "endLine": 315, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.8310764133930206, + "rawVectorScore": 0.7825891375541687, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.0140625, - "filePath": "opencode-rag.json", - "startLine": 108, - "endLine": 118, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 71, + "endLine": 80, + "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.827063649892807, + "rawVectorScore": 0.7752973139286041, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 3 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -140,106 +131,86 @@ "query": "How does the plugin interact with chat messages?", "queryIndex": 1, "resultCount": 20, - "latencyMs": 167.9, + "latencyMs": 135.7, "topResults": [ { "rank": 0, - "score": 0.015295429208472686, - "filePath": "src/plugin.ts", - "startLine": 799, - "endLine": 898, + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 460, + "endLine": 484, "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, - "keywordScore": 0.0014492753623188406, - "rawVectorScore": 0.7802304327487946, - "rawKeywordScore": 19.479181718823977, - "keywordWeight": 0.1, - "vectorRank": 4, - "keywordRank": 8, - "matchedTerms": [ - "how", - "does", - "the", - "plugin", - "with", - "chat", - "message" - ] + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.7840714454650879, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.015174825174825176, - "filePath": "doc/plugin.md", - "startLine": 1, - "endLine": 100, - "language": "markdown", - "explanation": { - "vectorScore": 0.013636363636363637, - "keywordScore": 0.0015384615384615385, - "rawVectorScore": 0.7801464796066284, - "rawKeywordScore": 19.479181718823977, - "keywordWeight": 0.1, - "vectorRank": 5, - "keywordRank": 4, - "matchedTerms": [ - "how", - "does", - "the", - "plugin", - "with", - "chat", - "message" - ] + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", + "startLine": 10, + "endLine": 13, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.7757869064807892, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014754098360655738, - "filePath": "src/plugin.ts", - "startLine": 460, - "endLine": 484, + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7988472580909729, + "rawVectorScore": 0.7745556533336639, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014516129032258065, - "filePath": "doc/assets/eval.png", - "startLine": 1, - "endLine": 1, - "language": "image", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/describer/describer.ts", + "startLine": 15, + "endLine": 18, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7970900237560272, + "rawVectorScore": 0.7724447548389435, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.014285714285714285, - "filePath": "opencode-rag.json", - "startLine": 128, - "endLine": 137, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/types/opencode-plugin.d.ts", + "startLine": 25, + "endLine": 53, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7896163761615753, + "rawVectorScore": 0.7691034972667694, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -275,105 +246,86 @@ "query": "How does the keyword index combine with vector search?", "queryIndex": 2, "resultCount": 20, - "latencyMs": 164.5, + "latencyMs": 146.7, "topResults": [ { "rank": 0, - "score": 0.015395833333333334, - "filePath": "src/__tests__/retriever/retriever.test.ts", - "startLine": 141, - "endLine": 240, - "language": "typescript", - "explanation": { - "vectorScore": 0.0140625, - "keywordScore": 0.0013333333333333335, - "rawVectorScore": 0.8250711560249329, - "rawKeywordScore": 19.41557447405785, - "keywordWeight": 0.1, - "vectorRank": 3, - "keywordRank": 14, - "matchedTerms": [ - "keyword", - "index", - "combine", - "combin", - "with", - "vector", - "search" - ] + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.8030349910259247, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.014754098360655738, - "filePath": "opencode-rag.example.json", - "startLine": 46, - "endLine": 53, - "language": "json", + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 184, + "endLine": 236, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.845950573682785, + "rawVectorScore": 0.7983307838439941, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014516129032258065, - "filePath": "opencode-rag.json", - "startLine": 100, - "endLine": 107, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 245, + "endLine": 275, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.8453532159328461, + "rawVectorScore": 0.7938066124916077, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014341926729986432, - "filePath": "src/retriever/retriever.ts", - "startLine": 38, - "endLine": 109, + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 343, + "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.013432835820895522, - "keywordScore": 0.0009090909090909091, - "rawVectorScore": 0.8154186010360718, - "rawKeywordScore": 14.015001406805467, - "keywordWeight": 0.1, - "vectorRank": 6, - "keywordRank": 49, - "matchedTerms": [ - "keyword", - "index", - "combin", - "with", - "vector", - "search" - ] + "vectorScore": 0.009375, + "keywordScore": 0, + "rawVectorScore": 0.7928096354007721, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.014285714285714285, - "filePath": "opencode-rag.example.json", - "startLine": 43, - "endLine": 45, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 1044, + "endLine": 1061, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.8284553587436676, + "rawVectorScore": 0.7910011410713196, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -409,85 +361,85 @@ "query": "Where is the embedder factory defined?", "queryIndex": 3, "resultCount": 20, - "latencyMs": 229.7, + "latencyMs": 135.4, "topResults": [ { "rank": 0, - "score": 0.014754098360655738, - "filePath": "src/embedder/factory.ts", + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", "startLine": 23, "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009836065573770491, "keywordScore": 0, - "rawVectorScore": 0.8163399994373322, + "rawVectorScore": 0.8202718496322632, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 0 } }, { "rank": 1, - "score": 0.014516129032258065, - "filePath": "src/__tests__/embedder/factory.test.ts", - "startLine": 18, - "endLine": 104, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", + "startLine": 56, + "endLine": 66, "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.7862143516540527, + "rawVectorScore": 0.7910988032817841, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 1 } }, { "rank": 2, - "score": 0.014285714285714285, - "filePath": "src/__tests__/embedder/factory.test.ts", - "startLine": 7, - "endLine": 16, + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", + "startLine": 62, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7788006663322449, + "rawVectorScore": 0.7568196654319763, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 2 } }, { "rank": 3, - "score": 0.0140625, - "filePath": "src/indexer/embed-stage.ts", - "startLine": 8, - "endLine": 13, + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", + "startLine": 45, + "endLine": 61, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7775427997112274, + "rawVectorScore": 0.7538323998451233, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "src/core/bootstrap.ts", - "startLine": 56, - "endLine": 66, + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", + "startLine": 397, + "endLine": 404, "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7608658671379089, + "rawVectorScore": 0.7512085735797882, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -524,85 +476,85 @@ "query": "Where is the LanceDB store implementation?", "queryIndex": 4, "resultCount": 20, - "latencyMs": 154.4, + "latencyMs": 131.3, "topResults": [ { "rank": 0, - "score": 0.014754098360655738, - "filePath": "src/vectorstore/lancedb.ts", - "startLine": 70, - "endLine": 79, + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 165, + "endLine": 186, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009836065573770491, "keywordScore": 0, - "rawVectorScore": 0.8301048576831818, + "rawVectorScore": 0.813552737236023, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 0 } }, { "rank": 1, - "score": 0.014516129032258065, - "filePath": "src/vectorstore/lancedb.ts", - "startLine": 122, - "endLine": 190, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 189, + "endLine": 192, "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.8278456628322601, + "rawVectorScore": 0.80718132853508, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 1 } }, { "rank": 2, - "score": 0.014285714285714285, - "filePath": "src/__tests__/vectorstore/lancedb.test.ts", - "startLine": 408, - "endLine": 458, + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/vectorstore/factory.ts", + "startLine": 22, + "endLine": 38, "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.8243442475795746, + "rawVectorScore": 0.799913078546524, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 2 } }, { "rank": 3, - "score": 0.0140625, - "filePath": "src/vectorstore/lancedb.ts", - "startLine": 97, - "endLine": 100, + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 230, + "endLine": 242, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.8228226900100708, + "rawVectorScore": 0.7791714370250702, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "src/vectorstore/lancedb.ts", - "startLine": 396, - "endLine": 413, + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 199, + "endLine": 227, "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.8127427101135254, + "rawVectorScore": 0.7714079320430756, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -639,110 +591,86 @@ "query": "Find all usages of the retrieve function", "queryIndex": 5, "resultCount": 20, - "latencyMs": 157.6, + "latencyMs": 137.1, "topResults": [ { "rank": 0, - "score": 0.01636700158646219, - "filePath": "doc/eval-token-plan.md", - "startLine": 1, - "endLine": 43, - "language": "markdown", - "explanation": { - "vectorScore": 0.014754098360655738, - "keywordScore": 0.0016129032258064516, - "rawVectorScore": 0.7897215187549591, - "rawKeywordScore": 21.775589443671887, - "keywordWeight": 0.1, - "vectorRank": 0, - "keywordRank": 1, - "matchedTerms": [ - "find", - "all", - "usages", - "usage", - "of", - "the", - "retrieve", - "retriev", - "function" - ] + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.7996223568916321, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.01478578892371996, - "filePath": "src/mcp/handlers.ts", - "startLine": 366, - "endLine": 465, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 293, + "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.013636363636363637, - "keywordScore": 0.0011494252873563218, - "rawVectorScore": 0.770317018032074, - "rawKeywordScore": 21.775589443671887, - "keywordWeight": 0.1, - "vectorRank": 5, - "keywordRank": 26, - "matchedTerms": [ - "find", - "all", - "usages", - "usage", - "of", - "the", - "retrieve", - "retriev", - "function" - ] + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.7925383448600769, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014516129032258065, - "filePath": "opencode-rag.example.json", - "startLine": 46, - "endLine": 53, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7881893515586853, + "rawVectorScore": 0.7896517217159271, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014285714285714285, - "filePath": "AGENTS.md", - "startLine": 6, - "endLine": 16, - "language": "markdown", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 290, + "endLine": 299, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7757284939289093, + "rawVectorScore": 0.7816400825977325, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.0140625, - "filePath": "opencode-rag.yaml", - "startLine": 4, - "endLine": 11, - "language": "yaml", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 280, + "endLine": 287, + "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7722410261631012, + "rawVectorScore": 0.7804376780986786, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 3 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -778,97 +706,85 @@ "query": "Find all usages of SearchResult type", "queryIndex": 6, "resultCount": 20, - "latencyMs": 160.8, + "latencyMs": 146.2, "topResults": [ { "rank": 0, - "score": 0.015533088235294118, - "filePath": "src/mcp/handlers.ts", - "startLine": 366, - "endLine": 465, + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 290, + "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, - "keywordScore": 0.0014705882352941176, - "rawVectorScore": 0.7884072363376617, - "rawKeywordScore": 21.261192954073486, - "keywordWeight": 0.1, - "vectorRank": 3, - "keywordRank": 7, - "matchedTerms": [ - "find", - "all", - "usages", - "usage", - "of", - "searchresult", - "search", - "result", - "type" - ] + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.815750241279602, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.014754098360655738, - "filePath": "src/opencode/tools.ts", - "startLine": 528, - "endLine": 627, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.7973710894584656, + "rawVectorScore": 0.8101376593112946, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014516129032258065, - "filePath": "src/mcp/handlers.ts", - "startLine": 290, - "endLine": 299, + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 176, + "endLine": 181, "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7940610945224762, + "rawVectorScore": 0.8084167540073395, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014285714285714285, - "filePath": "opencode-rag.json", - "startLine": 100, - "endLine": 107, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7898558080196381, + "rawVectorScore": 0.805400013923645, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "src/mcp/handlers.ts", - "startLine": 176, - "endLine": 181, + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 280, + "endLine": 287, "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7862828373908997, + "rawVectorScore": 0.8050737380981445, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -905,131 +821,86 @@ "query": "How does the chunker factory register new languages?", "queryIndex": 7, "resultCount": 20, - "latencyMs": 169.7, + "latencyMs": 146.4, "topResults": [ { "rank": 0, - "score": 0.016078629032258065, - "filePath": "doc/chunking.md", - "startLine": 101, - "endLine": 194, - "language": "markdown", - "explanation": { - "vectorScore": 0.014516129032258065, - "keywordScore": 0.0015625, - "rawVectorScore": 0.8264632523059845, - "rawKeywordScore": 27.050321517754146, - "keywordWeight": 0.1, - "vectorRank": 1, - "keywordRank": 3, - "matchedTerms": [ - "the", - "chunker", - "chunk", - "factory", - "register", - "regist", - "new", - "languages", - "language" - ] + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/chunker/factory.ts", + "startLine": 97, + "endLine": 115, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.8382091820240021, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.015435139573070607, - "filePath": "src/__tests__/chunker/pdf.test.ts", - "startLine": 78, - "endLine": 88, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/chunker/base.ts", + "startLine": 57, + "endLine": 64, "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, - "keywordScore": 0.0011494252873563218, - "rawVectorScore": 0.7940249741077423, - "rawKeywordScore": 14.77358961732654, - "keywordWeight": 0.1, - "vectorRank": 2, - "keywordRank": 26, - "matchedTerms": [ - "chunker", - "chunk", - "factory", - "register", - "language" - ] + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.8112517297267914, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.015238970588235295, - "filePath": "src/__tests__/chunker/docx.test.ts", - "startLine": 77, - "endLine": 83, + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/chunker/grammar.ts", + "startLine": 87, + "endLine": 97, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, - "keywordScore": 0.0011764705882352942, - "rawVectorScore": 0.7913006544113159, - "rawKeywordScore": 14.77358961732654, - "keywordWeight": 0.1, - "vectorRank": 3, - "keywordRank": 24, - "matchedTerms": [ - "chunker", - "chunk", - "factory", - "register", - "language" - ] + "vectorScore": 0.009523809523809523, + "keywordScore": 0, + "rawVectorScore": 0.8037641048431396, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.01512820512820513, - "filePath": "doc/chunking.md", - "startLine": 1, - "endLine": 100, - "language": "markdown", - "explanation": { - "vectorScore": 0.013846153846153847, - "keywordScore": 0.001282051282051282, - "rawVectorScore": 0.7867843210697174, - "rawKeywordScore": 16.35401077111984, - "keywordWeight": 0.1, - "vectorRank": 4, - "keywordRank": 17, - "matchedTerms": [ - "how", - "the", - "chunker", - "chunk", - "languages", - "language" - ] + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/chunker/grammar.ts", + "startLine": 110, + "endLine": 123, + "language": "typescript", + "explanation": { + "vectorScore": 0.009375, + "keywordScore": 0, + "rawVectorScore": 0.7917411625385284, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.014826839826839827, - "filePath": "src/__tests__/chunker/doc.test.ts", - "startLine": 67, - "endLine": 73, - "language": "typescript", - "explanation": { - "vectorScore": 0.013636363636363637, - "keywordScore": 0.0011904761904761906, - "rawVectorScore": 0.7864995002746582, - "rawKeywordScore": 14.77358961732654, - "keywordWeight": 0.1, - "vectorRank": 5, - "keywordRank": 23, - "matchedTerms": [ - "chunker", - "chunk", - "factory", - "register", - "language" - ] + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/chunker/factory.ts", + "startLine": 134, + "endLine": 136, + "language": "typescript", + "explanation": { + "vectorScore": 0.00923076923076923, + "keywordScore": 0, + "rawVectorScore": 0.7893357574939728, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -1065,107 +936,86 @@ "query": "What is the default minScore configuration?", "queryIndex": 8, "resultCount": 20, - "latencyMs": 174.9, + "latencyMs": 142.8, "topResults": [ { "rank": 0, - "score": 0.015223665223665224, - "filePath": "doc/evaluation.md", - "startLine": 201, - "endLine": 270, - "language": "markdown", - "explanation": { - "vectorScore": 0.013636363636363637, - "keywordScore": 0.0015873015873015873, - "rawVectorScore": 0.7552255094051361, - "rawKeywordScore": 24.24757791165203, - "keywordWeight": 0.1, - "vectorRank": 5, - "keywordRank": 2, - "matchedTerms": [ - "what", - "is", - "the", - "default", - "minscore", - "minscor", - "min", - "score", - "configuration" - ] + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/chunker/fallback.ts", + "startLine": 15, + "endLine": 17, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.7386708855628967, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.015147783251231527, - "filePath": "src/__tests__/retriever/retriever.test.ts", - "startLine": 141, - "endLine": 240, - "language": "typescript", - "explanation": { - "vectorScore": 0.014285714285714285, - "keywordScore": 0.0008620689655172415, - "rawVectorScore": 0.7666915357112885, - "rawKeywordScore": 14.352532583513808, - "keywordWeight": 0.1, - "vectorRank": 2, - "keywordRank": 55, - "matchedTerms": [ - "is", - "default", - "minscore", - "minscor", - "min", - "score" - ] + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/retriever/context-optimizer.ts", + "startLine": 49, + "endLine": 51, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.7336792945861816, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014754098360655738, - "filePath": "opencode-rag.json", - "startLine": 100, - "endLine": 107, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", + "startLine": 34, + "endLine": 36, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7759099304676056, + "rawVectorScore": 0.7315484285354614, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014516129032258065, - "filePath": "opencode-rag.example.json", - "startLine": 46, - "endLine": 53, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/embedder/cohere.ts", + "startLine": 26, + "endLine": 32, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7738143503665924, + "rawVectorScore": 0.72625333070755, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.0140625, - "filePath": "opencode.json", - "startLine": 2, - "endLine": 2, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 412, + "endLine": 448, + "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7616708278656006, + "rawVectorScore": 0.7257089614868164, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 3 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -1201,112 +1051,86 @@ "query": "How does the session logger capture token usage?", "queryIndex": 9, "resultCount": 20, - "latencyMs": 163.3, + "latencyMs": 145.5, "topResults": [ { "rank": 0, - "score": 0.016078629032258065, - "filePath": "doc/evaluation.md", - "startLine": 1, - "endLine": 100, - "language": "markdown", - "explanation": { - "vectorScore": 0.014516129032258065, - "keywordScore": 0.0015625, - "rawVectorScore": 0.8386000990867615, - "rawKeywordScore": 28.9714043366769, - "keywordWeight": 0.1, - "vectorRank": 1, - "keywordRank": 3, - "matchedTerms": [ - "how", - "does", - "the", - "session", - "logger", - "logg", - "capture", - "token", - "usage" - ] + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 26, + "endLine": 40, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.8653715550899506, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.014754098360655738, - "filePath": "src/eval/session-logger.ts", - "startLine": 26, - "endLine": 40, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 12, + "endLine": 24, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.850882351398468, + "rawVectorScore": 0.8495024740695953, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014693611473272491, - "filePath": "doc/webui.md", - "startLine": 101, - "endLine": 188, - "language": "markdown", - "explanation": { - "vectorScore": 0.013846153846153847, - "keywordScore": 0.0008474576271186442, - "rawVectorScore": 0.8151412010192871, - "rawKeywordScore": 10.510117667381786, - "keywordWeight": 0.1, - "vectorRank": 4, - "keywordRank": 57, - "matchedTerms": [ - "the", - "session", - "token", - "usage" - ] + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 43, + "endLine": 52, + "language": "typescript", + "explanation": { + "vectorScore": 0.009523809523809523, + "keywordScore": 0, + "rawVectorScore": 0.8369814157485962, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014636363636363638, - "filePath": "src/eval/session-logger.ts", - "startLine": 43, - "endLine": 52, + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", + "startLine": 83, + "endLine": 182, "language": "typescript", "explanation": { - "vectorScore": 0.013636363636363637, - "keywordScore": 0.001, - "rawVectorScore": 0.8138251900672913, - "rawKeywordScore": 12.181645640785014, - "keywordWeight": 0.1, - "vectorRank": 5, - "keywordRank": 39, - "matchedTerms": [ - "session", - "logger", - "logg", - "token" - ] + "vectorScore": 0.009375, + "keywordScore": 0, + "rawVectorScore": 0.8313508629798889, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.014285714285714285, - "filePath": "src/eval/session-logger.ts", - "startLine": 12, - "endLine": 24, + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 385, + "endLine": 407, "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.8287589848041534, + "rawVectorScore": 0.8137838542461395, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -1342,95 +1166,86 @@ "query": "How does L2 normalization affect vector search scores?", "queryIndex": 10, "resultCount": 20, - "latencyMs": 157.5, + "latencyMs": 142.6, "topResults": [ { "rank": 0, - "score": 0.014754098360655738, - "filePath": "opencode-rag.json", - "startLine": 100, - "endLine": 107, - "language": "json", + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/retriever/context-optimizer.ts", + "startLine": 49, + "endLine": 51, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009836065573770491, "keywordScore": 0, - "rawVectorScore": 0.817032665014267, + "rawVectorScore": 0.7815871834754944, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 0 } }, { "rank": 1, - "score": 0.014516129032258065, - "filePath": "opencode-rag.example.json", - "startLine": 46, - "endLine": 53, - "language": "json", + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 343, + "endLine": 367, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.8085566163063049, + "rawVectorScore": 0.7660261392593384, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 1 } }, { "rank": 2, - "score": 0.014444444444444444, - "filePath": "doc/evaluation.md", - "startLine": 201, - "endLine": 270, - "language": "markdown", - "explanation": { - "vectorScore": 0.012857142857142857, - "keywordScore": 0.0015873015873015873, - "rawVectorScore": 0.7841782867908478, - "rawKeywordScore": 17.190573334377124, - "keywordWeight": 0.1, - "vectorRank": 9, - "keywordRank": 2, - "matchedTerms": [ - "how", - "does", - "vector", - "search", - "scores", - "score" - ] + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.009523809523809523, + "keywordScore": 0, + "rawVectorScore": 0.7581153213977814, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014285714285714285, - "filePath": "opencode-rag.json", - "startLine": 2, - "endLine": 7, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/embedder/ollama.ts", + "startLine": 51, + "endLine": 97, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.8067222833633423, + "rawVectorScore": 0.752647191286087, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.0140625, - "filePath": "src/vectorstore/lancedb.ts", - "startLine": 18, - "endLine": 24, + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", + "startLine": 223, + "endLine": 307, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.8061452209949493, + "rawVectorScore": 0.748416930437088, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 3 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -1466,107 +1281,86 @@ "query": "What is the MetadataFilter interface used for?", "queryIndex": 11, "resultCount": 20, - "latencyMs": 162, + "latencyMs": 136.3, "topResults": [ { "rank": 0, - "score": 0.015197505197505198, - "filePath": "src/core/interfaces.ts", - "startLine": 141, - "endLine": 146, - "language": "typescript", - "explanation": { - "vectorScore": 0.013846153846153847, - "keywordScore": 0.0013513513513513514, - "rawVectorScore": 0.7834407091140747, - "rawKeywordScore": 20.45902043523328, - "keywordWeight": 0.1, - "vectorRank": 4, - "keywordRank": 13, - "matchedTerms": [ - "metadatafilter", - "metadatafilt", - "metadata", - "filter", - "filt", - "interface", - "interfac" - ] + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 308, + "endLine": 313, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.7521616518497467, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.01490342405618964, - "filePath": "src/retriever/retriever.ts", - "startLine": 13, - "endLine": 23, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 71, + "endLine": 80, "language": "typescript", "explanation": { - "vectorScore": 0.013432835820895522, - "keywordScore": 0.0014705882352941176, - "rawVectorScore": 0.7768649458885193, - "rawKeywordScore": 22.181936038363684, - "keywordWeight": 0.1, - "vectorRank": 6, - "keywordRank": 7, - "matchedTerms": [ - "is", - "metadatafilter", - "metadatafilt", - "metadata", - "filter", - "filt", - "interface", - "interfac" - ] + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.7493048906326294, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014754098360655738, - "filePath": "opencode-rag.example.json", - "startLine": 46, - "endLine": 53, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/indexer/metadata.ts", + "startLine": 88, + "endLine": 105, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7963960766792297, + "rawVectorScore": 0.7431941628456116, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014516129032258065, - "filePath": "opencode-rag.json", - "startLine": 100, - "endLine": 107, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 293, + "endLine": 299, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7859067916870117, + "rawVectorScore": 0.741024911403656, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.014285714285714285, - "filePath": "opencode-rag.json", - "startLine": 108, - "endLine": 118, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/opencode/create-read-tool.ts", + "startLine": 261, + "endLine": 264, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7849999964237213, + "rawVectorScore": 0.7397536337375641, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -1602,114 +1396,86 @@ "query": "How does the background indexer handle file changes?", "queryIndex": 12, "resultCount": 20, - "latencyMs": 161.5, + "latencyMs": 139.7, "topResults": [ { "rank": 0, - "score": 0.01570184426229508, - "filePath": "src/watcher.ts", + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/watcher.ts", "startLine": 78, "endLine": 177, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, - "keywordScore": 0.001639344262295082, - "rawVectorScore": 0.809533566236496, - "rawKeywordScore": 21.61063651171747, - "keywordWeight": 0.1, - "vectorRank": 3, - "keywordRank": 0, - "matchedTerms": [ - "background", - "indexer", - "index", - "handle", - "handl", - "file", - "change" - ] + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.834298312664032, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.014995335820895522, - "filePath": "src/watcher.ts", - "startLine": 27, - "endLine": 46, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/watcher.ts", + "startLine": 21, + "endLine": 24, "language": "typescript", "explanation": { - "vectorScore": 0.013432835820895522, - "keywordScore": 0.0015625, - "rawVectorScore": 0.797376424074173, - "rawKeywordScore": 21.547132576424417, - "keywordWeight": 0.1, - "vectorRank": 6, - "keywordRank": 3, - "matchedTerms": [ - "the", - "background", - "indexer", - "index", - "file", - "changes", - "change" - ] + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.8222635090351105, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014754098360655738, - "filePath": "opencode-rag.example.json", - "startLine": 54, - "endLine": 64, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/watcher.ts", + "startLine": 27, + "endLine": 46, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.8205663859844208, + "rawVectorScore": 0.8211431503295898, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014516129032258065, - "filePath": "opencode-rag.json", - "startLine": 8, - "endLine": 96, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", + "startLine": 120, + "endLine": 125, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.8194581270217896, + "rawVectorScore": 0.8077379763126373, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.014513556618819777, - "filePath": "src/__tests__/watcher/integration.test.ts", - "startLine": 49, - "endLine": 92, - "language": "typescript", - "explanation": { - "vectorScore": 0.013636363636363637, - "keywordScore": 0.0008771929824561404, - "rawVectorScore": 0.8071028888225555, - "rawKeywordScore": 13.083250206130188, - "keywordWeight": 0.1, - "vectorRank": 5, - "keywordRank": 53, - "matchedTerms": [ - "the", - "background", - "indexer", - "index", - "file" - ] + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/watcher.ts", + "startLine": 178, + "endLine": 189, + "language": "typescript", + "explanation": { + "vectorScore": 0.00923076923076923, + "keywordScore": 0, + "rawVectorScore": 0.7950503528118134, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -1745,98 +1511,85 @@ "query": "Where is the config validation logic?", "queryIndex": 13, "resultCount": 20, - "latencyMs": 155.6, + "latencyMs": 137.3, "topResults": [ { "rank": 0, - "score": 0.015764199370756748, - "filePath": "src/core/config.ts", - "startLine": 519, - "endLine": 618, + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/eval/run-token-test.ts", + "startLine": 40, + "endLine": 48, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, - "keywordScore": 0.00101010101010101, - "rawVectorScore": 0.8152535855770111, - "rawKeywordScore": 8.709803050743009, - "keywordWeight": 0.1, - "vectorRank": 0, - "keywordRank": 38, - "matchedTerms": [ - "is", - "config", - "validation" - ] + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.7609131038188934, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.01543236301369863, - "filePath": "src/core/config.ts", - "startLine": 511, - "endLine": 516, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 265, + "endLine": 271, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, - "keywordScore": 0.0013698630136986301, - "rawVectorScore": 0.7841500341892242, - "rawKeywordScore": 10.557328832636422, - "keywordWeight": 0.1, - "vectorRank": 3, - "keywordRank": 12, - "matchedTerms": [ - "is", - "the", - "config", - "validation" - ] + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.7607740163803101, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014516129032258065, - "filePath": "src/__tests__/core/config.test.ts", - "startLine": 168, - "endLine": 243, + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/cli/format.ts", + "startLine": 130, + "endLine": 134, "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.8064544796943665, + "rawVectorScore": 0.7549314498901367, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014285714285714285, - "filePath": "src/__tests__/_images/aa_configuration1.png", - "startLine": 1, - "endLine": 1, - "language": "image", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 193, + "endLine": 215, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7884787619113922, + "rawVectorScore": 0.7490440607070923, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "src/core/config.ts", - "startLine": 647, - "endLine": 746, + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 361, + "endLine": 376, "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7797802984714508, + "rawVectorScore": 0.7405577898025513, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -1873,97 +1626,85 @@ "query": "How are PDF documents chunked and indexed?", "queryIndex": 14, "resultCount": 20, - "latencyMs": 167.8, + "latencyMs": 136.7, "topResults": [ { "rank": 0, - "score": 0.01570184426229508, - "filePath": "doc/chunking.md", - "startLine": 1, - "endLine": 100, - "language": "markdown", - "explanation": { - "vectorScore": 0.0140625, - "keywordScore": 0.001639344262295082, - "rawVectorScore": 0.8490744233131409, - "rawKeywordScore": 29.35721047632773, - "keywordWeight": 0.1, - "vectorRank": 3, - "keywordRank": 0, - "matchedTerms": [ - "how", - "are", - "pdf", - "documents", - "document", - "chunk", - "and", - "indexed", - "index" - ] + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/chunker/docx.ts", + "startLine": 39, + "endLine": 108, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.8325012028217316, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.014754098360655738, - "filePath": "opencode-rag.json", - "startLine": 8, - "endLine": 96, - "language": "json", + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/chunker/doc.ts", + "startLine": 40, + "endLine": 109, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.8706968128681183, + "rawVectorScore": 0.8193139731884003, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014516129032258065, - "filePath": "opencode-rag.example.json", - "startLine": 10, - "endLine": 42, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", + "startLine": 120, + "endLine": 125, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.8565496206283569, + "rawVectorScore": 0.8003702461719513, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014285714285714285, - "filePath": "src/chunker/pdf.ts", - "startLine": 86, - "endLine": 155, + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/chunker/excel.ts", + "startLine": 49, + "endLine": 108, "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.851568341255188, + "rawVectorScore": 0.7956143319606781, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "opencode-rag.json", - "startLine": 108, - "endLine": 118, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/content/pdf.ts", + "startLine": 15, + "endLine": 23, + "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.8429512679576874, + "rawVectorScore": 0.7940729856491089, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -2000,102 +1741,85 @@ "query": "What embedding providers are supported?", "queryIndex": 15, "resultCount": 20, - "latencyMs": 156.5, + "latencyMs": 133.1, "topResults": [ { "rank": 0, - "score": 0.015924579736483417, - "filePath": "doc/embedding.md", - "startLine": 101, - "endLine": 177, - "language": "markdown", - "explanation": { - "vectorScore": 0.014516129032258065, - "keywordScore": 0.0014084507042253522, - "rawVectorScore": 0.861149400472641, - "rawKeywordScore": 17.470580330681912, - "keywordWeight": 0.1, - "vectorRank": 1, - "keywordRank": 10, - "matchedTerms": [ - "embedding", - "embedd", - "providers", - "provider", - "are", - "support" - ] + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/embedder/ollama.ts", + "startLine": 51, + "endLine": 97, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.8716892302036285, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.015267319277108435, - "filePath": "doc/embedding.md", - "startLine": 1, - "endLine": 100, - "language": "markdown", - "explanation": { - "vectorScore": 0.0140625, - "keywordScore": 0.0012048192771084338, - "rawVectorScore": 0.8509677648544312, - "rawKeywordScore": 14.376358224406216, - "keywordWeight": 0.1, - "vectorRank": 3, - "keywordRank": 22, - "matchedTerms": [ - "embedding", - "embedd", - "providers", - "provider", - "support" - ] + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/embedder/openai.ts", + "startLine": 60, + "endLine": 89, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.8623208105564117, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014754098360655738, - "filePath": "opencode-rag.json", - "startLine": 2, - "endLine": 7, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", + "startLine": 45, + "endLine": 61, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.8729893863201141, + "rawVectorScore": 0.862164169549942, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014285714285714285, - "filePath": "src/embedder/ollama.ts", - "startLine": 51, - "endLine": 97, + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", + "startLine": 23, + "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.8556520640850067, + "rawVectorScore": 0.8614892065525055, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "opencode-rag.json", - "startLine": 119, - "endLine": 127, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", + "startLine": 56, + "endLine": 66, + "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.8397506773471832, + "rawVectorScore": 0.8396036028862, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -2132,92 +1856,85 @@ "query": "How does the CLI parse and dispatch commands?", "queryIndex": 16, "resultCount": 20, - "latencyMs": 160.2, + "latencyMs": 189.2, "topResults": [ { "rank": 0, - "score": 0.015817928147889782, - "filePath": "src/cli/commands/query.ts", + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, - "keywordScore": 0.0010638297872340426, - "rawVectorScore": 0.780185878276825, - "rawKeywordScore": 12.346213527527617, - "keywordWeight": 0.1, - "vectorRank": 0, - "keywordRank": 33, - "matchedTerms": [ - "the", - "cli", - "parse", - "command" - ] + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.7968338131904602, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.014516129032258065, - "filePath": "doc/cli.md", - "startLine": 301, - "endLine": 326, - "language": "markdown", + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/cli/commands/eval.ts", + "startLine": 71, + "endLine": 134, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.7749454081058502, + "rawVectorScore": 0.7839367687702179, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 1 } }, { "rank": 2, - "score": 0.014285714285714285, - "filePath": "doc/cli.md", - "startLine": 1, - "endLine": 100, - "language": "markdown", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/cli/format.ts", + "startLine": 110, + "endLine": 122, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7710533440113068, + "rawVectorScore": 0.7711082994937897, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 2 } }, { "rank": 3, - "score": 0.0140625, - "filePath": "opencode-rag.example.json", - "startLine": 76, - "endLine": 88, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/cli/commands/index.ts", + "startLine": 1, + "endLine": 18, + "language": "text", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7686161696910858, + "rawVectorScore": 0.7682340741157532, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "opencode-rag.yaml", - "startLine": 4, - "endLine": 11, - "language": "yaml", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/cli/commands/show.ts", + "startLine": 22, + "endLine": 59, + "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7647121846675873, + "rawVectorScore": 0.7663054168224335, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -2254,116 +1971,86 @@ "query": "How does the session logger persist events?", "queryIndex": 17, "resultCount": 20, - "latencyMs": 151.3, + "latencyMs": 134.7, "topResults": [ { "rank": 0, - "score": 0.015536537195523371, - "filePath": "src/eval/session-logger.ts", + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 43, "endLine": 52, "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, - "keywordScore": 0.0010204081632653062, - "rawVectorScore": 0.8493432104587555, - "rawKeywordScore": 13.060379719854602, - "keywordWeight": 0.1, - "vectorRank": 1, - "keywordRank": 37, - "matchedTerms": [ - "session", - "logger", - "logg", - "event" - ] + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.8729149699211121, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.015295815295815295, - "filePath": "src/eval/session-logger.ts", + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 58, "endLine": 157, "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, - "keywordScore": 0.00101010101010101, - "rawVectorScore": 0.8436324000358582, - "rawKeywordScore": 13.060379719854602, - "keywordWeight": 0.1, - "vectorRank": 2, - "keywordRank": 38, - "matchedTerms": [ - "session", - "logger", - "logg", - "event" - ] + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.866875559091568, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014987714987714989, - "filePath": "src/__tests__/eval/session-logger.test.ts", - "startLine": 243, - "endLine": 317, - "language": "typescript", - "explanation": { - "vectorScore": 0.013636363636363637, - "keywordScore": 0.0013513513513513514, - "rawVectorScore": 0.821203887462616, - "rawKeywordScore": 20.948872557602602, - "keywordWeight": 0.1, - "vectorRank": 5, - "keywordRank": 13, - "matchedTerms": [ - "does", - "session", - "logger", - "logg", - "events", - "event" - ] + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 158, + "endLine": 183, + "language": "typescript", + "explanation": { + "vectorScore": 0.009523809523809523, + "keywordScore": 0, + "rawVectorScore": 0.8487854301929474, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014921422663358148, - "filePath": "src/__tests__/eval/session-logger.test.ts", - "startLine": 14, - "endLine": 69, + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 26, + "endLine": 40, "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, - "keywordScore": 0.001075268817204301, - "rawVectorScore": 0.8220250904560089, - "rawKeywordScore": 14.400145295323934, - "keywordWeight": 0.1, - "vectorRank": 4, - "keywordRank": 32, - "matchedTerms": [ - "does", - "session", - "events", - "event" - ] + "vectorScore": 0.009375, + "keywordScore": 0, + "rawVectorScore": 0.8466207087039948, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.014754098360655738, - "filePath": "src/eval/session-logger.ts", - "startLine": 158, - "endLine": 183, + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/eval/storage.ts", + "startLine": 26, + "endLine": 35, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.8558421730995178, + "rawVectorScore": 0.8365089297294617, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -2399,94 +2086,85 @@ "query": "What is the manifest schema version used for?", "queryIndex": 18, "resultCount": 20, - "latencyMs": 161.1, + "latencyMs": 150, "topResults": [ { "rank": 0, - "score": 0.015848214285714285, - "filePath": "src/core/manifest.ts", - "startLine": 44, - "endLine": 53, + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 308, + "endLine": 313, "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, - "keywordScore": 0.0015625, - "rawVectorScore": 0.7973486483097076, - "rawKeywordScore": 17.080199086744877, - "keywordWeight": 0.1, - "vectorRank": 2, - "keywordRank": 3, - "matchedTerms": [ - "the", - "manifest", - "schema", - "version", - "used", - "for" - ] + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.7399376928806305, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.014754098360655738, - "filePath": "src/core/manifest.ts", - "startLine": 69, - "endLine": 71, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/core/version-check.ts", + "startLine": 1, + "endLine": 7, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.8144239783287048, + "rawVectorScore": 0.7395970225334167, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014516129032258065, - "filePath": "opencode-rag.example.json", - "startLine": 98, - "endLine": 100, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", + "startLine": 15, + "endLine": 17, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.8012023866176605, + "rawVectorScore": 0.7377591729164124, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.0140625, - "filePath": "opencode-rag.example.json", - "startLine": 95, - "endLine": 97, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/indexer/pipeline.ts", + "startLine": 749, + "endLine": 819, + "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7942595481872559, + "rawVectorScore": 0.7363853752613068, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "opencode.json", - "startLine": 2, - "endLine": 2, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/eval/types.ts", + "startLine": 68, + "endLine": 93, + "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7845654487609863, + "rawVectorScore": 0.7348621487617493, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -2523,122 +2201,86 @@ "query": "How does the OpenCode plugin register tools?", "queryIndex": 19, "resultCount": 20, - "latencyMs": 156.5, + "latencyMs": 149.5, "topResults": [ { "rank": 0, - "score": 0.01639344262295082, - "filePath": "doc/plugin.md", - "startLine": 1, - "endLine": 100, - "language": "markdown", - "explanation": { - "vectorScore": 0.014754098360655738, - "keywordScore": 0.001639344262295082, - "rawVectorScore": 0.8655109405517578, - "rawKeywordScore": 28.207124918352243, - "keywordWeight": 0.1, - "vectorRank": 0, - "keywordRank": 0, - "matchedTerms": [ - "how", - "does", - "the", - "opencode", - "opencod", - "open", - "code", - "plugin", - "register", - "tools" - ] + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 1213, + "endLine": 1312, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.8483277261257172, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.015282012195121951, - "filePath": "doc/plugin.md", - "startLine": 201, - "endLine": 300, - "language": "markdown", - "explanation": { - "vectorScore": 0.0140625, - "keywordScore": 0.0012195121951219512, - "rawVectorScore": 0.8423999845981598, - "rawKeywordScore": 20.989464751071853, - "keywordWeight": 0.1, - "vectorRank": 3, - "keywordRank": 21, - "matchedTerms": [ - "the", - "opencode", - "opencod", - "open", - "code", - "plugin", - "register", - "regist" - ] + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 699, + "endLine": 798, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.8436833918094635, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.01464374482187241, - "filePath": "doc/plugin.md", - "startLine": 101, - "endLine": 200, - "language": "markdown", - "explanation": { - "vectorScore": 0.013235294117647059, - "keywordScore": 0.0014084507042253522, - "rawVectorScore": 0.837580680847168, - "rawKeywordScore": 24.607899626498302, - "keywordWeight": 0.1, - "vectorRank": 7, - "keywordRank": 10, - "matchedTerms": [ - "how", - "the", - "opencode", - "opencod", - "open", - "code", - "plugin", - "register", - "tools" - ] + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/plugin-entry.ts", + "startLine": 1, + "endLine": 19, + "language": "text", + "explanation": { + "vectorScore": 0.009523809523809523, + "keywordScore": 0, + "rawVectorScore": 0.8296231329441071, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014516129032258065, - "filePath": "doc/plugin.md", - "startLine": 301, - "endLine": 317, - "language": "markdown", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/cli/commands/setup.ts", + "startLine": 28, + "endLine": 40, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.8536486327648163, + "rawVectorScore": 0.8233766853809357, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.014285714285714285, - "filePath": "package.json", - "startLine": 4, - "endLine": 4, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 499, + "endLine": 598, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.8469464778900146, + "rawVectorScore": 0.8075522482395172, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -2674,99 +2316,85 @@ "query": "Where is the globMatch function defined?", "queryIndex": 20, "resultCount": 20, - "latencyMs": 151.5, + "latencyMs": 150.5, "topResults": [ { "rank": 0, - "score": 0.015798180314309348, - "filePath": "src/vectorstore/memory.ts", - "startLine": 67, - "endLine": 75, + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/chunker/ssl.ts", + "startLine": 145, + "endLine": 165, "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, - "keywordScore": 0.001282051282051282, - "rawVectorScore": 0.7614469528198242, - "rawKeywordScore": 13.927089960969257, - "keywordWeight": 0.1, - "vectorRank": 1, - "keywordRank": 17, - "matchedTerms": [ - "globmatch", - "glob", - "match", - "function" - ] + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.7408466041088104, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.0153125, - "filePath": "src/retriever/keyword-index.ts", - "startLine": 292, - "endLine": 300, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 290, + "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, - "keywordScore": 0.00125, - "rawVectorScore": 0.7540619969367981, - "rawKeywordScore": 13.927089960969257, - "keywordWeight": 0.1, - "vectorRank": 3, - "keywordRank": 19, - "matchedTerms": [ - "globmatch", - "glob", - "match", - "function" - ] + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.73261958360672, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014754098360655738, - "filePath": "src/web/ui/highlight.min.js", - "startLine": 12, - "endLine": 13, - "language": "javascript", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 628, + "endLine": 642, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7684441804885864, + "rawVectorScore": 0.7154453098773956, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 0 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014285714285714285, - "filePath": "src/web/ui/highlight.min.js", - "startLine": 90, - "endLine": 93, - "language": "javascript", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 159, + "endLine": 161, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7582259476184845, + "rawVectorScore": 0.7147655487060547, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "src/web/ui/highlight.min.js", - "startLine": 404, - "endLine": 404, - "language": "javascript", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/core/provider-defaults.ts", + "startLine": 100, + "endLine": 105, + "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7536023259162903, + "rawVectorScore": 0.7120298743247986, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -2803,85 +2431,85 @@ "query": "How does the proxy-aware HTTP client work?", "queryIndex": 21, "resultCount": 20, - "latencyMs": 155.4, + "latencyMs": 155.8, "topResults": [ { "rank": 0, - "score": 0.014754098360655738, - "filePath": "src/embedder/http.ts", - "startLine": 484, - "endLine": 501, + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", + "startLine": 152, + "endLine": 164, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009836065573770491, "keywordScore": 0, - "rawVectorScore": 0.781366229057312, + "rawVectorScore": 0.7926509976387024, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 0 } }, { "rank": 1, - "score": 0.014516129032258065, - "filePath": "src/embedder/http.ts", - "startLine": 143, - "endLine": 149, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", + "startLine": 484, + "endLine": 501, "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.7775079607963562, + "rawVectorScore": 0.7897729575634003, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 1 } }, { "rank": 2, - "score": 0.014285714285714285, - "filePath": "src/embedder/http.ts", - "startLine": 152, - "endLine": 164, + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", + "startLine": 143, + "endLine": 149, "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7714857459068298, + "rawVectorScore": 0.7867366969585419, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 2 } }, { "rank": 3, - "score": 0.0140625, - "filePath": "src/embedder/http.ts", - "startLine": 126, - "endLine": 140, + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", + "startLine": 504, + "endLine": 557, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7665490210056305, + "rawVectorScore": 0.7809644043445587, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "src/embedder/http.ts", - "startLine": 504, - "endLine": 557, + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/embedder/cohere.ts", + "startLine": 26, + "endLine": 32, "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7620988488197327, + "rawVectorScore": 0.7768464982509613, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -2918,85 +2546,85 @@ "query": "What is the FETCH_OVERFETCH_FACTOR constant?", "queryIndex": 22, "resultCount": 20, - "latencyMs": 159.3, + "latencyMs": 146.1, "topResults": [ { "rank": 0, - "score": 0.014754098360655738, - "filePath": "opencode-rag.example.json", - "startLine": 98, - "endLine": 100, - "language": "json", + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/core/runtime-overrides.ts", + "startLine": 12, + "endLine": 54, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009836065573770491, "keywordScore": 0, - "rawVectorScore": 0.779962420463562, + "rawVectorScore": 0.7472843527793884, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 0 } }, { "rank": 1, - "score": 0.014516129032258065, - "filePath": "opencode-rag.example.json", - "startLine": 95, - "endLine": 97, - "language": "json", + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", + "startLine": 397, + "endLine": 420, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.7755001187324524, + "rawVectorScore": 0.7409740090370178, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 1 } }, { "rank": 2, - "score": 0.014285714285714285, - "filePath": "opencode-rag.json", - "startLine": 108, - "endLine": 118, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/chunker/fallback.ts", + "startLine": 15, + "endLine": 17, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7711337506771088, + "rawVectorScore": 0.7398375868797302, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 2 } }, { "rank": 3, - "score": 0.0140625, - "filePath": "opencode-rag.example.json", - "startLine": 46, - "endLine": 53, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", + "startLine": 223, + "endLine": 307, + "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.768333375453949, + "rawVectorScore": 0.7291486859321594, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "opencode-rag.example.json", - "startLine": 54, - "endLine": 64, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 416, + "endLine": 440, + "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7682041823863983, + "rawVectorScore": 0.7284904420375824, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } @@ -3033,100 +2661,86 @@ "query": "How does the TUI settings menu work?", "queryIndex": 23, "resultCount": 20, - "latencyMs": 152.7, + "latencyMs": 133.5, "topResults": [ { "rank": 0, - "score": 0.01631659836065574, - "filePath": "src/tui.ts", - "startLine": 608, - "endLine": 707, + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 283, + "endLine": 294, "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, - "keywordScore": 0.0015625, - "rawVectorScore": 0.7985324859619141, - "rawKeywordScore": 18.51390782180293, - "keywordWeight": 0.1, - "vectorRank": 0, - "keywordRank": 3, - "matchedTerms": [ - "tui", - "settings", - "setting", - "menu" - ] + "vectorScore": 0.009836065573770491, + "keywordScore": 0, + "rawVectorScore": 0.8115568161010742, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 0 } }, { "rank": 1, - "score": 0.014799154334038056, - "filePath": "src/tui.ts", - "startLine": 427, - "endLine": 526, + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 608, + "endLine": 707, "language": "typescript", "explanation": { - "vectorScore": 0.013636363636363637, - "keywordScore": 0.0011627906976744186, - "rawVectorScore": 0.7671421766281128, - "rawKeywordScore": 13.712315698485432, - "keywordWeight": 0.1, - "vectorRank": 5, - "keywordRank": 25, - "matchedTerms": [ - "the", - "tui", - "setting", - "work" - ] + "vectorScore": 0.00967741935483871, + "keywordScore": 0, + "rawVectorScore": 0.8096809387207031, + "rawKeywordScore": 0, + "keywordWeight": 0.4, + "vectorRank": 1 } }, { "rank": 2, - "score": 0.014516129032258065, - "filePath": "opencode-rag.example.json", - "startLine": 105, - "endLine": 108, - "language": "json", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 297, + "endLine": 306, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.7976454794406891, + "rawVectorScore": 0.8006298840045929, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 1 + "keywordWeight": 0.4, + "vectorRank": 2 } }, { "rank": 3, - "score": 0.014285714285714285, - "filePath": "opencode-rag.example.json", - "startLine": 98, - "endLine": 100, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 527, + "endLine": 602, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.7935173511505127, + "rawVectorScore": 0.779504120349884, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 2 + "keywordWeight": 0.4, + "vectorRank": 3 } }, { "rank": 4, - "score": 0.0140625, - "filePath": "src/tui.ts", - "startLine": 283, - "endLine": 294, + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 427, + "endLine": 526, "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.7797922194004059, + "rawVectorScore": 0.7658225297927856, "rawKeywordScore": 0, - "keywordWeight": 0.1, - "vectorRank": 3 + "keywordWeight": 0.4, + "vectorRank": 4 } } ], @@ -3162,85 +2776,85 @@ "query": "How are image descriptions generated?", "queryIndex": 24, "resultCount": 20, - "latencyMs": 166.6, + "latencyMs": 136.2, "topResults": [ { "rank": 0, - "score": 0.014754098360655738, - "filePath": "opencode-rag.example.json", - "startLine": 65, - "endLine": 75, - "language": "json", + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/chunker/image.ts", + "startLine": 151, + "endLine": 208, + "language": "typescript", "explanation": { - "vectorScore": 0.014754098360655738, + "vectorScore": 0.009836065573770491, "keywordScore": 0, - "rawVectorScore": 0.9295038282871246, + "rawVectorScore": 0.8516704440116882, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 0 } }, { "rank": 1, - "score": 0.014516129032258065, - "filePath": "opencode-rag.json", - "startLine": 119, - "endLine": 127, - "language": "json", + "score": 0.00967741935483871, + "filePath": "../OpenCodeRAG-main/src/chunker/image.ts", + "startLine": 231, + "endLine": 292, + "language": "typescript", "explanation": { - "vectorScore": 0.014516129032258065, + "vectorScore": 0.00967741935483871, "keywordScore": 0, - "rawVectorScore": 0.9003736972808838, + "rawVectorScore": 0.8405250906944275, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 1 } }, { "rank": 2, - "score": 0.014285714285714285, - "filePath": "doc/retrieval.md", - "startLine": 101, - "endLine": 159, - "language": "markdown", + "score": 0.009523809523809523, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 308, + "endLine": 313, + "language": "typescript", "explanation": { - "vectorScore": 0.014285714285714285, + "vectorScore": 0.009523809523809523, "keywordScore": 0, - "rawVectorScore": 0.8528095781803131, + "rawVectorScore": 0.8372036814689636, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 2 } }, { "rank": 3, - "score": 0.0140625, - "filePath": "opencode-rag.json", - "startLine": 2, - "endLine": 7, - "language": "json", + "score": 0.009375, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 334, + "endLine": 415, + "language": "typescript", "explanation": { - "vectorScore": 0.0140625, + "vectorScore": 0.009375, "keywordScore": 0, - "rawVectorScore": 0.845047801733017, + "rawVectorScore": 0.8315328061580658, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 3 } }, { "rank": 4, - "score": 0.013846153846153847, - "filePath": "opencode-rag.example.json", - "startLine": 76, - "endLine": 88, - "language": "json", + "score": 0.00923076923076923, + "filePath": "../OpenCodeRAG-main/src/indexer/description-stage.ts", + "startLine": 32, + "endLine": 119, + "language": "typescript", "explanation": { - "vectorScore": 0.013846153846153847, + "vectorScore": 0.00923076923076923, "keywordScore": 0, - "rawVectorScore": 0.8441265523433685, + "rawVectorScore": 0.8290737271308899, "rawKeywordScore": 0, - "keywordWeight": 0.1, + "keywordWeight": 0.4, "vectorRank": 4 } } diff --git a/src/eval/compare-rankings.ts b/src/eval/compare-rankings.ts new file mode 100644 index 0000000..04710ac --- /dev/null +++ b/src/eval/compare-rankings.ts @@ -0,0 +1,310 @@ +/** + * @fileoverview Ranking order comparison between two branch benchmark runs. + * Focuses on rank agreement rather than absolute scores. + * + * Usage: node --import tsx src/eval/compare-rankings.ts + * --main doc/eval-results-main.json + * --branch doc/eval-results-t1-cosine-l2.json + * --output doc/eval-ranking-report.md + */ + +import { readFileSync, writeFileSync, mkdirSync } from "node:fs"; +import path from "node:path"; + +interface TopResultEntry { + rank: number; + score: number; + filePath: string; + startLine: number; + endLine: number; + language: string; + explanation?: { + vectorScore: number; + keywordScore: number; + rawVectorScore: number; + rawKeywordScore: number; + keywordWeight: number; + vectorRank?: number; + keywordRank?: number; + matchedTerms?: string[]; + }; +} + +interface QueryResult { + query: string; + queryIndex: number; + resultCount: number; + latencyMs: number; + topResults: TopResultEntry[]; + thresholdAnalysis: { threshold: number; passedCount: number; wouldInject: boolean }[]; +} + +interface BenchmarkOutput { + branch: string; + commit: string; + timestamp: string; + config: { embeddingProvider: string; embeddingModel: string; topK: number; minScore: number; hybridEnabled: boolean; keywordWeight: number }; + indexChunkCount: number; + queries: QueryResult[]; +} + +function parseArgs() { + const args = process.argv.slice(2); + let main = "", branch = "", output = "doc/eval-ranking-report.md"; + for (let i = 0; i < args.length; i++) { + if (args[i] === "--main" && args[i + 1]) { main = path.resolve(args[i + 1]!); i++; } + else if (args[i] === "--branch" && args[i + 1]) { branch = path.resolve(args[i + 1]!); i++; } + else if (args[i] === "--output" && args[i + 1]) { output = path.resolve(args[i + 1]!); i++; } + } + if (!main || !branch) { + console.error("Usage: node --import tsx src/eval/compare-rankings.ts --main --branch [--output ]"); + process.exit(1); + } + return { main, branch, output }; +} + +function normalizePath(fp: string): string { + // Strip clone-directory prefix from paths like "../OpenCodeRAG-main/src/foo.ts" + return fp.replace(/^\.\.[\/\\][^\/\\]+[\/\\]/, ""); +} + +function identityKey(r: TopResultEntry): string { + return normalizePath(r.filePath) + ":" + r.startLine; +} + +/** Kendall's tau-b rank correlation for two orderings of the same set. */ +function kendallTau(rankA: Map, rankB: Map): number { + const ids = [...rankA.keys()]; + let concordant = 0, discordant = 0; + for (let i = 0; i < ids.length; i++) { + for (let j = i + 1; j < ids.length; j++) { + const aI = rankA.get(ids[i]!)!, aJ = rankA.get(ids[j]!)!; + const bI = rankB.get(ids[i]!)!, bJ = rankB.get(ids[j]!)!; + const diffA = aI - aJ, diffB = bI - bJ; + if (diffA * diffB > 0) concordant++; + else if (diffA * diffB < 0) discordant++; + } + } + const total = concordant + discordant; + return total === 0 ? 1 : (concordant - discordant) / total; +} + +function avg(arr: number[]): number { + return arr.length === 0 ? 0 : arr.reduce((s, v) => s + v, 0) / arr.length; +} + +async function main() { + const { main: mainPath, branch: branchPath, output } = parseArgs(); + + const mainData: BenchmarkOutput = JSON.parse(readFileSync(mainPath, "utf-8")); + const branchData: BenchmarkOutput = JSON.parse(readFileSync(branchPath, "utf-8")); + + const mBranch = mainData.branch + " (" + mainData.commit + ")"; + const bBranch = branchData.branch + " (" + branchData.commit + ")"; + + const perQuery: { + query: string; + top1Same: boolean; + top3Same: boolean; + top5Same: boolean; + topKFullSame: boolean; + overlapTop5: number; + overlapTop20: number; + kendallTau: number; + mTopScore: number; + bTopScore: number; + }[] = []; + + let totalTop1Same = 0, totalTop3Same = 0, totalTop5Same = 0, totalFullSame = 0; + let totalOverlap5 = 0, totalOverlap20 = 0; + const kendalls: number[] = []; + + const maxQ = Math.min(mainData.queries.length, branchData.queries.length); + for (let i = 0; i < maxQ; i++) { + const mq = mainData.queries[i]!, bq = branchData.queries[i]!; + const mTop = mq.topResults, bTop = bq.topResults; + const mKey = mTop.map(identityKey); + const bKey = bTop.map(identityKey); + + const top1Same = mKey[0] === bKey[0]; + const top3Same = mKey[0] === bKey[0] && mKey[1] === bKey[1] && mKey[2] === bKey[2]; + const top5Same = mKey.slice(0, 5).every((k, j) => k === bKey[j]); + const topKFullSame = mKey.every((k, j) => k === bKey[j]); + + const set5 = new Set(bKey.slice(0, 5)); + const overlapTop5 = mKey.slice(0, 5).filter((k) => set5.has(k)).length; + const set20 = new Set(bKey); + const overlapTop20 = mKey.filter((k) => set20.has(k)).length; + + const aRank = new Map(mKey.map((k, j) => [k, j])); + const bRank = new Map(bKey.map((k, j) => [k, j])); + const sharedIds = [...aRank.keys()].filter((k) => bRank.has(k)); + const sharedRankA = new Map(sharedIds.map((k) => [k, aRank.get(k)!])); + const sharedRankB = new Map(sharedIds.map((k) => [k, bRank.get(k)!])); + const tau = kendallTau(sharedRankA, sharedRankB); + + if (top1Same) totalTop1Same++; + if (top3Same) totalTop3Same++; + if (top5Same) totalTop5Same++; + if (topKFullSame) totalFullSame++; + totalOverlap5 += overlapTop5; + totalOverlap20 += overlapTop20; + kendalls.push(tau); + + perQuery.push({ + query: mq.query, + top1Same, + top3Same, + top5Same, + topKFullSame, + overlapTop5, + overlapTop20, + kendallTau: tau, + mTopScore: mTop[0]?.score ?? 0, + bTopScore: bTop[0]?.score ?? 0, + }); + } + + // Print console output + const SEP = "─"; + console.log("\n" + SEP.repeat(80)); + console.log(" RANKING ORDER COMPARISON"); + console.log(" " + mBranch + " vs " + bBranch); + console.log(SEP.repeat(80) + "\n"); + + const w = [38, 14]; + const a: ("left" | "right")[] = ["left", "right"]; + const top = "┌─" + w.map((x) => SEP.repeat(x)).join("─┬─") + "─┐"; + const sep = "├─" + w.map((x) => SEP.repeat(x)).join("─┼─") + "─┤"; + const bot = "└─" + w.map((x) => SEP.repeat(x)).join("─┴─") + "─┘"; + const cell = (s: string, i: number) => s.length >= w[i]! ? s.slice(0, w[i]!) : s + " ".repeat(w[i]! - s.length); + + console.log(" Overlap Summary:"); + console.log(" " + top); + console.log(" │ " + cell("Metric", 0) + " │ " + cell("Value", 1) + " │"); + console.log(" " + sep); + console.log(" │ " + cell("Top-1 match", 0) + " │ " + cell(totalTop1Same + "/" + maxQ, 1) + " │"); + console.log(" │ " + cell("Top-3 identical", 0) + " │ " + cell(totalTop3Same + "/" + maxQ, 1) + " │"); + console.log(" │ " + cell("Top-5 identical", 0) + " │ " + cell(totalTop5Same + "/" + maxQ, 1) + " │"); + console.log(" │ " + cell("Full top-K identical", 0) + " │ " + cell(totalFullSame + "/" + maxQ, 1) + " │"); + console.log(" │ " + cell("Avg overlap in top-5", 0) + " │ " + cell((totalOverlap5 / maxQ).toFixed(1), 1) + " │"); + console.log(" │ " + cell("Avg overlap in top-K", 0) + " │ " + cell((totalOverlap20 / maxQ).toFixed(1), 1) + " │"); + console.log(" │ " + cell("Kendall's τ (avg)", 0) + " │ " + cell(avg(kendalls).toFixed(4), 1) + " │"); + console.log(" " + bot + "\n"); + + if (totalFullSame === maxQ) { + console.log(" ▲ Ranking is IDENTICAL across all " + maxQ + " queries."); + console.log(" RRF and linear fusion produce the same rank order\n"); + } else if (totalTop5Same === maxQ) { + console.log(" ▲ Top-5 ranking is IDENTICAL across all queries."); + console.log(" Minor differences exist beyond position 5.\n"); + } else { + console.log(" ◆ Ranking order differs between branches.\n"); + } + + if (avg(kendalls) > 0.999) { + console.log(" Explanation:"); + console.log(" Both scoring methods are monotonic transforms of the same"); + console.log(" raw vector similarity scores. When only one signal (vector)"); + console.log(" contributes, rank order is preserved.\n"); + } + + // Also show queries where keyword matched + const queriesWithKeyword = mainData.queries.filter((q) => + q.topResults.some((r) => r.explanation && r.explanation.rawKeywordScore > 0), + ); + console.log(" Queries with keyword contributions: " + queriesWithKeyword.length + "/" + maxQ); + if (queriesWithKeyword.length === 0) { + console.log(" (No keyword index matches found in this index)\n"); + } + + // Write markdown report + const report: string[] = []; + report.push("# Ranking Order Comparison"); + report.push(""); + report.push("**" + mBranch + "** vs **" + bBranch + "**"); + report.push("**Generated:** " + new Date().toISOString()); + report.push(""); + report.push("## Config"); + report.push(""); + report.push("| Setting | `" + mainData.branch + "` | `" + branchData.branch + "` |"); + report.push("|---|---|---|"); + report.push("| Embedding | " + mainData.config.embeddingModel + " | " + branchData.config.embeddingModel + " |"); + report.push("| topK | " + mainData.config.topK + " | " + branchData.config.topK + " |"); + report.push("| minScore | " + mainData.config.minScore + " | " + branchData.config.minScore + " |"); + report.push("| Hybrid | " + mainData.config.hybridEnabled + " | " + branchData.config.hybridEnabled + " |"); + report.push("| keywordWeight | " + mainData.config.keywordWeight + " | " + branchData.config.keywordWeight + " |"); + report.push("| Index chunks | " + mainData.indexChunkCount + " | " + branchData.indexChunkCount + " |"); + report.push(""); + + report.push("## Ranking Agreement"); + report.push(""); + report.push("| Metric | Value |"); + report.push("|---|---|"); + report.push("| Top-1 match | " + totalTop1Same + "/" + maxQ + " |"); + report.push("| Top-3 identical | " + totalTop3Same + "/" + maxQ + " |"); + report.push("| Top-5 identical | " + totalTop5Same + "/" + maxQ + " |"); + report.push("| Full top-K identical | " + totalFullSame + "/" + maxQ + " |"); + report.push("| Avg overlap in top-5 | " + (totalOverlap5 / maxQ).toFixed(1) + " |"); + report.push("| Avg overlap in top-K | " + (totalOverlap20 / maxQ).toFixed(1) + " |"); + report.push("| Kendall's τ (avg) | " + avg(kendalls).toFixed(4) + " |"); + report.push("| Queries with keyword contribution | " + queriesWithKeyword.length + "/" + maxQ + " |"); + report.push(""); + + if (totalFullSame === maxQ) { + report.push("## Verdict"); + report.push(""); + report.push("**Ranking is 100% identical across all queries.**"); + report.push(""); + report.push("The `t1-cosine-l2` branch changes two things simultaneously:"); + report.push("- Vector scoring: L2 distance → cosine similarity"); + report.push("- Hybrid fusion: Weighted linear combination → RRF (K=60)"); + report.push(""); + report.push("However, in this benchmark, **keyword scores are zero on every query**"); + report.push("because the keyword index doesn't match any query terms. When only one signal"); + report.push("(vector similarity) contributes, both fusion methods produce the same"); + report.push("rank order. This is because both are **monotonically decreasing functions**"); + report.push("of the vector rank:"); + report.push(""); + report.push("- **Linear**: `score = (1-kw) · normVectorScore` (monotonic in vector score)"); + report.push("- **RRF**: `score = (1-kw) / (K + rank + 1)` (monotonic in vector rank)"); + report.push(""); + report.push("Since vector rank is itself monotonic with vector score, the final ordering"); + report.push("is identical regardless of which formula is used."); + report.push(""); + report.push("### When would RRF make a difference?"); + report.push(""); + report.push("RRF excels when **both vector AND keyword signals contribute** to a query."); + report.push("It can boost results that rank highly in both sources while demoting results"); + report.push("that only rank well in one. To see this effect:"); + report.push("- Index more files (including docs with token-rich content)"); + report.push("- Use queries with specific identifier/keyword terms that match the keyword index"); + report.push("- Increase keywordWeight to amplify keyword contributions"); + report.push(""); + } + + report.push("## Per-Query Detail"); + report.push(""); + report.push("| # | Query | Top-1 same | Top-5 same | Full same | τ | main score | branch score |"); + report.push("|---|---|:---:|:---:|:---:|:---:|:---:|:---:|"); + for (const pq of perQuery) { + const q = pq.query.length > 48 ? pq.query.substring(0, 45) + "..." : pq.query; + report.push( + "| " + (pq.queryIndex + 1) + " | " + q + + " | " + (pq.top1Same ? "✓" : "✗") + + " | " + (pq.top5Same ? "✓" : "✗") + + " | " + (pq.topKFullSame ? "✓" : "✗") + + " | " + pq.kendallTau.toFixed(3) + + " | " + pq.mTopScore.toFixed(3) + + " | " + pq.bTopScore.toFixed(3) + + " |", + ); + } + report.push(""); + + mkdirSync(path.dirname(output), { recursive: true }); + writeFileSync(output, report.join("\n"), "utf-8"); + console.log(" Report written to: " + output + "\n"); +} + +main().catch((err) => { console.error("Ranking comparison failed:", err); process.exit(1); }); diff --git a/src/eval/dump-descriptions.ts b/src/eval/dump-descriptions.ts new file mode 100644 index 0000000..9501ca5 --- /dev/null +++ b/src/eval/dump-descriptions.ts @@ -0,0 +1,69 @@ +/** + * @fileoverview Dump all chunk descriptions from a LanceDB index to a JSON file. + * Used to copy descriptions from one branch to another for fair comparison. + * + * Usage: node --import tsx src/eval/dump-descriptions.ts --output doc/chunk-descriptions.json + */ + +import { writeFileSync, mkdirSync } from "node:fs"; +import path from "node:path"; + +const WORKTREE = process.cwd(); +const STORE_PATH = path.join(WORKTREE, ".opencode", "rag_db"); + +async function main() { + const args = process.argv.slice(2); + let outputPath = path.join(WORKTREE, "doc", "chunk-descriptions.json"); + for (let i = 0; i < args.length; i++) { + if (args[i] === "--output" && args[i + 1]) { + outputPath = path.resolve(WORKTREE, args[i + 1]!); + break; + } + } + + console.log(` Dumping descriptions from: ${STORE_PATH}`); + console.log(` Output: ${outputPath}`); + + const lancedb = await import("@lancedb/lancedb"); + const db = await lancedb.connect(STORE_PATH); + const tableNames = await db.tableNames(); + + if (!tableNames.includes("chunks")) { + console.error(" No chunks table found in the store."); + await db.close(); + process.exit(1); + } + + const table = await db.openTable("chunks"); + const count = await table.countRows(); + console.log(` Total rows: ${count}`); + + const rows = await table.query().select(["id", "description", "filePath", "startLine", "endLine"]).limit(count).toArray() as Record[]; + + const descriptions: Record = {}; + let hasDesc = 0; + for (const row of rows) { + const filePath = (row.filePath as string).replace(/\\/g, "/"); + const startLine = row.startLine as number; + const endLine = row.endLine as number; + const desc = row.description as string ?? ""; + const key = `${filePath}:${startLine}:${endLine}`; + descriptions[key] = desc; + if (desc) hasDesc++; + } + + const dir = path.dirname(outputPath); + mkdirSync(dir, { recursive: true }); + writeFileSync(outputPath, JSON.stringify(descriptions, null, 2), "utf-8"); + + console.log(` Dumped ${Object.keys(descriptions).length} chunks`); + console.log(` ${hasDesc} have non-empty descriptions`); + console.log(` Written to: ${outputPath}`); + + await db.close(); +} + +main().catch((err) => { + console.error("Dump failed:", err); + process.exit(1); +}); diff --git a/src/eval/fast-index.ts b/src/eval/fast-index.ts new file mode 100644 index 0000000..6f2e1d4 --- /dev/null +++ b/src/eval/fast-index.ts @@ -0,0 +1,318 @@ +/** + * @fileoverview Fast indexer that uses pre-dumped descriptions instead of LLM generation. + * Indexes only files unchanged between the current branch and main. + * Run on the main branch after copying chunk-descriptions.json from t1-cosine-l2. + * + * Usage: node --import tsx src/eval/fast-index.ts --descriptions doc/chunk-descriptions.json + */ + +import { readFileSync, readdirSync, statSync } from "node:fs"; +import fs from "node:fs/promises"; +import path from "node:path"; +import { loadConfig, DEFAULT_CONFIG } from "../core/config.js"; +import { createEmbedder } from "../embedder/factory.js"; +import { createVectorStore } from "../vectorstore/factory.js"; +import { + loadRuntimeOverrides, + applyRuntimeOverrides, +} from "../core/runtime-overrides.js"; +import { resolveApiKey } from "../core/resolve-api-key.js"; +import { chunkFile } from "../chunker/factory.js"; +import { embedBatch } from "../embedder/factory.js"; +import { normalizeFilePath } from "../core/manifest.js"; +import { KeywordIndex } from "../retriever/keyword-index.js"; +import type { Chunk } from "../core/interfaces.js"; + +const WORKTREE = process.cwd(); +const STORE_PATH = path.join(WORKTREE, ".opencode", "rag_db"); + +/** Directories to skip entirely when scanning for files. */ +const SKIP_DIRS = new Set([ + "node_modules", + ".git", + ".opencode", + "dist", + "build", + "__pycache__", + ".venv", + ".claude", + ".github", + "memory:", + "wasm", + ".commandcode", + ".agents", + "graphify-out", + "__tests__", +]); + +/** File extensions to include. */ +const INCLUDE_EXTS = new Set([".ts", ".tsx"]); + +/** Changed files between main and t1-cosine-l2 (relative paths, / separators). */ +const CHANGED_FILES = new Set([ + "src/api.ts", + "src/chunker/pdf.ts", + "src/cli/commands/init-helpers.ts", + "src/core/config.ts", + "src/core/interfaces.ts", + "src/core/manifest.ts", + "src/core/setup-runtime.ts", + "src/indexer/embed-stage.ts", + "src/retriever/keyword-index.ts", + "src/retriever/retriever.ts", + "src/vectorstore/lancedb.ts", + "src/vectorstore/memory.ts", +]); + +/** Our own eval scripts (not part of the index). */ +const EVAL_FILES = new Set([ + "src/eval/run-branch-compare.ts", + "src/eval/compare-merge.ts", + "src/eval/dump-descriptions.ts", + "src/eval/update-descriptions.ts", + "src/eval/fast-index.ts", +]); + +function isChangedFile(relPath: string): boolean { + return CHANGED_FILES.has(relPath) || EVAL_FILES.has(relPath); +} + +function walkFiles(dir: string): string[] { + const results: string[] = []; + try { + const entries = readdirSync(dir, { withFileTypes: true }); + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + if (!SKIP_DIRS.has(entry.name) && !entry.name.startsWith(".")) { + results.push(...walkFiles(fullPath)); + } + } else if (entry.isFile()) { + const ext = path.extname(entry.name).toLowerCase(); + if (INCLUDE_EXTS.has(ext)) { + results.push(fullPath); + } + } + } + } catch { + // directory not found or no permissions + } + return results; +} + +function parseArgs(): { descriptionsPath: string } { + const args = process.argv.slice(2); + let descriptionsPath = path.join(WORKTREE, "doc", "chunk-descriptions.json"); + for (let i = 0; i < args.length; i++) { + if (args[i] === "--descriptions" && args[i + 1]) { + descriptionsPath = path.resolve(WORKTREE, args[i + 1]!); + break; + } + } + return { descriptionsPath }; +} + +function getConfig() { + const configPath = path.join(WORKTREE, "opencode-rag.json"); + let cfg; + try { + cfg = loadConfig(configPath); + } catch { + cfg = DEFAULT_CONFIG; + } + const overrides = loadRuntimeOverrides(STORE_PATH); + cfg = applyRuntimeOverrides(cfg, overrides); + resolveApiKey(cfg, WORKTREE); + return cfg; +} + +async function main() { + const { descriptionsPath } = parseArgs(); + console.log(`\n Fast Indexer — skipping description generation`); + console.log(` Descriptions: ${descriptionsPath}\n`); + + // Helper: split "absPath:startLine:endLine" key (handles Windows drive letters) + function splitLocationKey(k: string): { absPath: string; startLine: number; endLine: number } { + const lastColon = k.lastIndexOf(":"); + const secondLastColon = k.lastIndexOf(":", lastColon - 1); + return { + absPath: k.substring(0, secondLastColon), + startLine: parseInt(k.substring(secondLastColon + 1, lastColon), 10), + endLine: parseInt(k.substring(lastColon + 1), 10), + }; + } + + // Load pre-dumped descriptions and remap paths to this worktree + const rawDescs: Record = JSON.parse( + readFileSync(descriptionsPath, "utf-8"), + ); + // Detect source worktree from first key + const sampleKey = Object.keys(rawDescs)[0] ?? ""; + const sampleParts = splitLocationKey(sampleKey); + const samplePath = sampleParts.absPath; + const srcIdx = samplePath.lastIndexOf("/src/"); + const docIdx = samplePath.lastIndexOf("/doc/"); + const cutIdx = Math.max(srcIdx, docIdx); + const sourceWorktree = cutIdx > 0 ? samplePath.substring(0, cutIdx) : ""; + + const thisWorktree = WORKTREE.replace(/\\/g, "/"); + const descriptions: Record = {}; + + for (const [key, desc] of Object.entries(rawDescs)) { + if (!sourceWorktree) { + descriptions[key] = desc; + continue; + } + const { absPath, startLine, endLine } = splitLocationKey(key); + if (!absPath.startsWith(sourceWorktree + "/")) { + descriptions[key] = desc; + continue; + } + const relativePath = absPath.substring(sourceWorktree.length); + const newKey = `${thisWorktree}${relativePath}:${startLine}:${endLine}`; + descriptions[newKey] = desc; + } + + console.log(` Loaded ${Object.keys(rawDescs).length} descriptions from dump`); + console.log(` Source worktree: ${sourceWorktree}`); + console.log(` This worktree: ${thisWorktree}`); + + // Set up config, embedder, store + const cfg = getConfig(); + const embedder = createEmbedder(cfg); + + // Probe dimension + const probe = await embedder.embed(["dimension-probe"], "query"); + const dimension = probe[0]?.length ?? 384; + console.log(` Embedding dimension: ${dimension}\n`); + + // Clear existing store + const store = createVectorStore(cfg, STORE_PATH, dimension); + await store.clear(); + console.log(" Cleared existing store\n"); + + // Walk files + const srcDir = path.join(WORKTREE, "src"); + const allFiles = walkFiles(srcDir); + const filteredFiles = allFiles + .map((f) => path.relative(WORKTREE, f).replace(/\\/g, "/")) + .filter((f) => !isChangedFile(f)); + console.log(` Found ${allFiles.length} .ts files in src/`); + console.log(` After filtering out changed files: ${filteredFiles.length}\n`); + + // Process files sequentially (chunking + description lookup) + const allChunks: Chunk[] = []; + let skippedNoDesc = 0; + + for (let i = 0; i < filteredFiles.length; i++) { + const relPath = filteredFiles[i]!; + const absPath = path.join(WORKTREE, relPath); + process.stdout.write( + ` [${i + 1}/${filteredFiles.length}] ${relPath}...`, + ); + + try { + const content = await fs.readFile(absPath, "utf-8"); + if (!content.trim()) { + console.log(" empty"); + continue; + } + + const chunks = await chunkFile(absPath, content); + if (!chunks || chunks.length === 0) { + console.log(" no chunks"); + continue; + } + + // Attach descriptions from dump + const normalizedPath = normalizeFilePath(absPath); + let attached = 0; + for (const chunk of chunks) { + const key = `${normalizedPath}:${chunk.metadata.startLine}:${chunk.metadata.endLine}`; + const desc = descriptions[key]; + if (desc) { + chunk.description = desc; + attached++; + } else { + // Try alternate key ending (some chunkers add +1 to endLine) + const altKey = `${normalizedPath}:${chunk.metadata.startLine}:${chunk.metadata.startLine + (chunk.metadata.endLine - chunk.metadata.startLine) + 1}`; + const altDesc = descriptions[altKey]; + if (altDesc) { + chunk.description = altDesc; + attached++; + } + } + } + + if (attached === 0) { + skippedNoDesc++; + } + + allChunks.push(...chunks); + console.log(` ${chunks.length} chunks, ${attached} descriptions`); + } catch (err) { + console.log(` error: ${(err as Error).message}`); + } + } + + console.log(`\n Total chunks to embed: ${allChunks.length}`); + console.log(` Files with no description match: ${skippedNoDesc}`); + + // Build texts to embed and batch-embed + const textsToEmbed: string[] = []; + for (const chunk of allChunks) { + const desc = chunk.description ?? ""; + if (desc.trim()) { + textsToEmbed.push( + `${path.relative(WORKTREE, chunk.metadata.filePath).replace(/\\/g, "/")}\n\n${desc}\n\n${chunk.content}`, + ); + } else { + textsToEmbed.push( + `${path.relative(WORKTREE, chunk.metadata.filePath).replace(/\\/g, "/")}\n\n${chunk.content}`, + ); + } + } + + console.log(` Embedding ${textsToEmbed.length} texts...`); + const embeddings = await embedBatch( + embedder, + textsToEmbed, + cfg.indexing.embedBatchSize ?? 100, + "document", + cfg.indexing.embedConcurrency ?? 3, + ); + console.log(` Got ${embeddings.length} embeddings`); + + // Attach embeddings to chunks and store + for (let i = 0; i < allChunks.length; i++) { + const emb = embeddings[i]; + if (emb && emb.length > 0 && typeof emb[0] === "number") { + allChunks[i]!.embedding = emb as number[]; + } + } + + const validChunks = allChunks.filter( + (c) => c.embedding && c.embedding.length > 0, + ); + console.log(` Storing ${validChunks.length} chunks...`); + + await store.addChunks(validChunks); + const count = await store.count(); + console.log(` Store now has ${count} chunks`); + + await store.close(); + + // Build keyword index from the same chunks + console.log(" Building keyword index..."); + const ki = new KeywordIndex(); + ki.addChunks(validChunks); + await ki.save(path.join(STORE_PATH, "keyword-index.json")); + console.log(` Keyword index saved (${ki.count()} entries)`); + + console.log("\n Fast indexing complete!\n"); +} + +main().catch((err) => { + console.error("Fast index failed:", err); + process.exit(1); +}); diff --git a/src/eval/update-descriptions.ts b/src/eval/update-descriptions.ts new file mode 100644 index 0000000..bb949dc --- /dev/null +++ b/src/eval/update-descriptions.ts @@ -0,0 +1,99 @@ +/** + * @fileoverview Update a LanceDB index's chunk descriptions from a JSON dump file. + * Run AFTER normal indexing to replace descriptions with ones from another branch. + * + * Usage: node --import tsx src/eval/update-descriptions.ts --input doc/chunk-descriptions.json + */ + +import { readFileSync } from "node:fs"; +import path from "node:path"; + +async function main() { + const args = process.argv.slice(2); + const storePath = path.join(process.cwd(), ".opencode", "rag_db"); + let inputPath = ""; + + for (let i = 0; i < args.length; i++) { + if (args[i] === "--input" && args[i + 1]) { + inputPath = path.resolve(args[i + 1]!); + break; + } + } + + if (!inputPath) { + console.error("Usage: node --import tsx src/eval/update-descriptions.ts --input "); + process.exit(1); + } + + console.log(` Loading descriptions from: ${inputPath}`); + const sourceDescs: Record = JSON.parse(readFileSync(inputPath, "utf-8")); + console.log(` Loaded ${Object.keys(sourceDescs).length} descriptions`); + + console.log(` Connecting to store: ${storePath}`); + const lancedb = await import("@lancedb/lancedb"); + const db = await lancedb.connect(storePath); + const tableNames = await db.tableNames(); + + if (!tableNames.includes("chunks")) { + console.error(" No chunks table found."); + await db.close(); + process.exit(1); + } + + const table = await db.openTable("chunks"); + const count = await table.countRows(); + console.log(` Total rows: ${count}`); + + // Read all rows + const rows = await table.query().select(["id", "description"]).limit(count).toArray() as Record[]; + + let updated = 0; + let notFound = 0; + let batch: { id: string; description: string }[] = []; + + for (const row of rows) { + const id = row.id as string; + const sourceDesc = sourceDescs[id]; + if (sourceDesc === undefined) { + notFound++; + continue; + } + batch.push({ id, description: sourceDesc }); + updated++; + + // Update in batches of 100 + if (batch.length >= 100) { + console.log(` Updating batch of ${batch.length}...`); + for (const b of batch) { + await table.update( + { description: b.description }, + `id = '${b.id.replace(/'/g, "''")}'`, + ); + } + batch = []; + } + } + + // Final batch + if (batch.length > 0) { + console.log(` Updating final batch of ${batch.length}...`); + for (const b of batch) { + await table.update( + { description: b.description }, + `id = '${b.id.replace(/'/g, "''")}'`, + ); + } + } + + console.log(`\n Done:`); + console.log(` Updated: ${updated}`); + console.log(` Not found in dump: ${notFound}`); + console.log(` Source dump had ${Object.keys(sourceDescs).length} entries`); + + await db.close(); +} + +main().catch((err) => { + console.error("Update failed:", err); + process.exit(1); +}); From 95fd5961a9bd86245b60bd6d909f0d3f947b7b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Mon, 6 Jul 2026 11:31:10 +0200 Subject: [PATCH 13/15] Refactor ranking comparison output and improve keyword index saving - Updated the ranking comparison logic to clarify differences in rank order when keyword contributions are active. - Changed the report generation to use the index of the loop instead of the query index for consistency. - Modified the keyword index saving process to save directly to the store path instead of a specific filename. - Added additional code-identifier queries to enhance hybrid search testing with keyword contributions. --- doc/eval-ranking-report.md | 111 +- doc/eval-results-main.json | 4790 ++++++++++++++++++++-------- doc/eval-results-t1-cosine-l2.json | 4332 +++++++++++++++++++------ src/eval/compare-rankings.ts | 16 +- src/eval/fast-index.ts | 4 +- src/eval/run-branch-compare.ts | 11 + 6 files changed, 6893 insertions(+), 2371 deletions(-) diff --git a/doc/eval-ranking-report.md b/doc/eval-ranking-report.md index 83bc6ff..a28713d 100644 --- a/doc/eval-ranking-report.md +++ b/doc/eval-ranking-report.md @@ -1,7 +1,7 @@ # Ranking Order Comparison -**main (734fc60)** vs **t1-cosine-l2 (e922a0b)** -**Generated:** 2026-07-06T08:52:29.409Z +**main (734fc60)** vs **t1-cosine-l2 (2fd954d)** +**Generated:** 2026-07-06T09:25:32.375Z ## Config @@ -9,7 +9,7 @@ |---|---|---| | Embedding | qwen3-embedding:0.6b | qwen3-embedding:0.6b | | topK | 20 | 20 | -| minScore | 0.5 | 0.5 | +| minScore | 0.5 | 0.35 | | Hybrid | true | true | | keywordWeight | 0.4 | 0.4 | | Index chunks | 542 | 542 | @@ -18,70 +18,51 @@ | Metric | Value | |---|---| -| Top-1 match | 25/25 | -| Top-3 identical | 25/25 | -| Top-5 identical | 25/25 | -| Full top-K identical | 25/25 | -| Avg overlap in top-5 | 5.0 | -| Avg overlap in top-K | 5.0 | -| Kendall's τ (avg) | 1.0000 | -| Queries with keyword contribution | 0/25 | - -## Verdict - -**Ranking is 100% identical across all queries.** - -The `t1-cosine-l2` branch changes two things simultaneously: -- Vector scoring: L2 distance → cosine similarity -- Hybrid fusion: Weighted linear combination → RRF (K=60) - -However, in this benchmark, **keyword scores are zero on every query** -because the keyword index doesn't match any query terms. When only one signal -(vector similarity) contributes, both fusion methods produce the same -rank order. This is because both are **monotonically decreasing functions** -of the vector rank: - -- **Linear**: `score = (1-kw) · normVectorScore` (monotonic in vector score) -- **RRF**: `score = (1-kw) / (K + rank + 1)` (monotonic in vector rank) - -Since vector rank is itself monotonic with vector score, the final ordering -is identical regardless of which formula is used. - -### When would RRF make a difference? - -RRF excels when **both vector AND keyword signals contribute** to a query. -It can boost results that rank highly in both sources while demoting results -that only rank well in one. To see this effect: -- Index more files (including docs with token-rich content) -- Use queries with specific identifier/keyword terms that match the keyword index -- Increase keywordWeight to amplify keyword contributions +| Top-1 match | 13/35 | +| Top-3 identical | 1/35 | +| Top-5 identical | 0/35 | +| Full top-K identical | 0/35 | +| Avg overlap in top-5 | 2.9 | +| Avg overlap in top-K | 2.9 | +| Kendall's τ (avg) | 0.3619 | +| Queries with keyword contribution | 35/35 | ## Per-Query Detail | # | Query | Top-1 same | Top-5 same | Full same | τ | main score | branch score | |---|---|:---:|:---:|:---:|:---:|:---:|:---:| -| NaN | How does the retrieval pipeline work end-to-end? | ✓ | ✓ | ✓ | 1.000 | 0.577 | 0.010 | -| NaN | How does the plugin interact with chat messages? | ✓ | ✓ | ✓ | 1.000 | 0.537 | 0.010 | -| NaN | How does the keyword index combine with vecto... | ✓ | ✓ | ✓ | 1.000 | 0.559 | 0.010 | -| NaN | Where is the embedder factory defined? | ✓ | ✓ | ✓ | 1.000 | 0.582 | 0.010 | -| NaN | Where is the LanceDB store implementation? | ✓ | ✓ | ✓ | 1.000 | 0.573 | 0.010 | -| NaN | Find all usages of the retrieve function | ✓ | ✓ | ✓ | 1.000 | 0.555 | 0.010 | -| NaN | Find all usages of SearchResult type | ✓ | ✓ | ✓ | 1.000 | 0.576 | 0.010 | -| NaN | How does the chunker factory register new lan... | ✓ | ✓ | ✓ | 1.000 | 0.607 | 0.010 | -| NaN | What is the default minScore configuration? | ✓ | ✓ | ✓ | 1.000 | 0.489 | 0.010 | -| NaN | How does the session logger capture token usage? | ✓ | ✓ | ✓ | 1.000 | 0.650 | 0.010 | -| NaN | How does L2 normalization affect vector searc... | ✓ | ✓ | ✓ | 1.000 | 0.534 | 0.010 | -| NaN | What is the MetadataFilter interface used for? | ✓ | ✓ | ✓ | 1.000 | 0.502 | 0.010 | -| NaN | How does the background indexer handle file c... | ✓ | ✓ | ✓ | 1.000 | 0.601 | 0.010 | -| NaN | Where is the config validation logic? | ✓ | ✓ | ✓ | 1.000 | 0.511 | 0.010 | -| NaN | How are PDF documents chunked and indexed? | ✓ | ✓ | ✓ | 1.000 | 0.599 | 0.010 | -| NaN | What embedding providers are supported? | ✓ | ✓ | ✓ | 1.000 | 0.661 | 0.010 | -| NaN | How does the CLI parse and dispatch commands? | ✓ | ✓ | ✓ | 1.000 | 0.552 | 0.010 | -| NaN | How does the session logger persist events? | ✓ | ✓ | ✓ | 1.000 | 0.663 | 0.010 | -| NaN | What is the manifest schema version used for? | ✓ | ✓ | ✓ | 1.000 | 0.490 | 0.010 | -| NaN | How does the OpenCode plugin register tools? | ✓ | ✓ | ✓ | 1.000 | 0.622 | 0.010 | -| NaN | Where is the globMatch function defined? | ✓ | ✓ | ✓ | 1.000 | 0.491 | 0.010 | -| NaN | How does the proxy-aware HTTP client work? | ✓ | ✓ | ✓ | 1.000 | 0.547 | 0.010 | -| NaN | What is the FETCH_OVERFETCH_FACTOR constant? | ✓ | ✓ | ✓ | 1.000 | 0.497 | 0.010 | -| NaN | How does the TUI settings menu work? | ✓ | ✓ | ✓ | 1.000 | 0.570 | 0.010 | -| NaN | How are image descriptions generated? | ✓ | ✓ | ✓ | 1.000 | 0.628 | 0.010 | +| 1 | How does the retrieval pipeline work end-to-end? | ✗ | ✗ | ✗ | -0.333 | 0.896 | 0.015 | +| 2 | How does the plugin interact with chat messages? | ✓ | ✗ | ✗ | 0.333 | 0.988 | 0.016 | +| 3 | How does the keyword index combine with vecto... | ✗ | ✗ | ✗ | -1.000 | 0.897 | 0.016 | +| 4 | Where is the embedder factory defined? | ✗ | ✗ | ✗ | 0.333 | 0.900 | 0.014 | +| 5 | Where is the LanceDB store implementation? | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.016 | +| 6 | Find all usages of the retrieve function | ✓ | ✗ | ✗ | 1.000 | 1.000 | 0.016 | +| 7 | Find all usages of SearchResult type | ✓ | ✗ | ✗ | 1.000 | 0.992 | 0.016 | +| 8 | How does the chunker factory register new lan... | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.016 | +| 9 | What is the default minScore configuration? | ✗ | ✗ | ✗ | -1.000 | 0.914 | 0.014 | +| 10 | How does the session logger capture token usage? | ✗ | ✗ | ✗ | -0.333 | 0.919 | 0.016 | +| 11 | How does L2 normalization affect vector searc... | ✗ | ✗ | ✗ | 0.333 | 0.900 | 0.015 | +| 12 | What is the MetadataFilter interface used for? | ✗ | ✗ | ✗ | 1.000 | 0.921 | 0.014 | +| 13 | How does the background indexer handle file c... | ✓ | ✗ | ✗ | 1.000 | 0.995 | 0.016 | +| 14 | Where is the config validation logic? | ✗ | ✗ | ✗ | -1.000 | 0.900 | 0.013 | +| 15 | How are PDF documents chunked and indexed? | ✗ | ✗ | ✗ | -1.000 | 0.900 | 0.014 | +| 16 | What embedding providers are supported? | ✗ | ✗ | ✗ | 0.333 | 0.882 | 0.015 | +| 17 | How does the CLI parse and dispatch commands? | ✗ | ✗ | ✗ | 0.333 | 0.938 | 0.016 | +| 18 | How does the session logger persist events? | ✗ | ✗ | ✗ | 1.000 | 0.822 | 0.016 | +| 19 | What is the manifest schema version used for? | ✗ | ✗ | ✗ | -0.333 | 0.962 | 0.014 | +| 20 | How does the OpenCode plugin register tools? | ✗ | ✗ | ✗ | 0.333 | 0.932 | 0.016 | +| 21 | Where is the globMatch function defined? | ✓ | ✗ | ✗ | 0.000 | 0.963 | 0.015 | +| 22 | How does the proxy-aware HTTP client work? | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.015 | +| 23 | What is the FETCH_OVERFETCH_FACTOR constant? | ✓ | ✗ | ✗ | 1.000 | 0.955 | 0.013 | +| 24 | How does the TUI settings menu work? | ✓ | ✗ | ✗ | 1.000 | 0.954 | 0.016 | +| 25 | How are image descriptions generated? | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.015 | +| 26 | retrieve function | ✓ | ✗ | ✗ | 0.667 | 1.000 | 0.015 | +| 27 | KeywordIndex class | ✗ | ✗ | ✗ | 1.000 | 0.914 | 0.015 | +| 28 | embedder factory | ✗ | ✗ | ✗ | -0.333 | 0.900 | 0.016 | +| 29 | vector store LanceDB | ✓ | ✗ | ✗ | 1.000 | 1.000 | 0.016 | +| 30 | find usages SearchResult | ✓ | ✗ | ✗ | 0.667 | 1.000 | 0.016 | +| 31 | chunkFile method | ✓ | ✗ | ✗ | 0.333 | 0.950 | 0.015 | +| 32 | embedBatch function | ✓ | ✗ | ✗ | 1.000 | 1.000 | 0.016 | +| 33 | retriever retrieve vector search | ✗ | ✗ | ✗ | 1.000 | 0.872 | 0.016 | +| 34 | session logger token | ✓ | ✗ | ✗ | 0.333 | 0.990 | 0.016 | +| 35 | config validation | ✗ | ✗ | ✗ | -1.000 | 0.900 | 0.013 | diff --git a/doc/eval-results-main.json b/doc/eval-results-main.json index e41e374..31b1c18 100644 --- a/doc/eval-results-main.json +++ b/doc/eval-results-main.json @@ -1,7 +1,7 @@ { "branch": "main", "commit": "734fc60", - "timestamp": "2026-07-06T08:51:02.551Z", + "timestamp": "2026-07-06T09:23:05.989Z", "config": { "embeddingProvider": "ollama", "embeddingModel": "qwen3-embedding:0.6b", @@ -16,103 +16,135 @@ "query": "How does the retrieval pipeline work end-to-end?", "queryIndex": 0, "resultCount": 20, - "latencyMs": 152.2, + "latencyMs": 264.3, "topResults": [ { "rank": 0, - "score": 0.577182422078366, + "score": 0.8956337497907705, "filePath": "src/plugin.ts", - "startLine": 343, - "endLine": 367, + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.577182422078366, - "keywordScore": 0, - "rawVectorScore": 0.577182422078366, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8260562496512841, + "keywordScore": 1, + "rawVectorScore": 0.4761329004705189, + "rawKeywordScore": 20.210864139000947, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "retrieval", + "work", + "to" + ] } }, { "rank": 1, - "score": 0.56318317222156, + "score": 0.7981830269482006, "filePath": "src/plugin.ts", - "startLine": 321, - "endLine": 336, + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.56318317222156, - "keywordScore": 0, - "rawVectorScore": 0.56318317222156, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.87909555596053, + "keywordScore": 0.6768142334297068, + "rawVectorScore": 0.5067043763992178, + "rawKeywordScore": 13.679000519189877, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "to" + ] } }, { "rank": 2, - "score": 0.5405678599185256, - "filePath": "src/opencode/read-fallback.ts", - "startLine": 10, - "endLine": 17, + "score": 0.7163290193532116, + "filePath": "src/plugin.ts", + "startLine": 599, + "endLine": 698, "language": "typescript", "explanation": { - "vectorScore": 0.5405678599185256, - "keywordScore": 0, - "rawVectorScore": 0.5405678599185256, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9130437646666167, + "keywordScore": 0.4212569013831039, + "rawVectorScore": 0.526271880529634, + "rawKeywordScore": 8.513966001470433, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "retrieval", + "end", + "to" + ] } }, { "rank": 3, - "score": 0.5348612372239245, - "filePath": "src/plugin.ts", - "startLine": 301, - "endLine": 315, + "score": 0.7112593248675941, + "filePath": "src/core/bootstrap.ts", + "startLine": 36, + "endLine": 53, "language": "typescript", "explanation": { - "vectorScore": 0.5348612372239245, - "keywordScore": 0, - "rawVectorScore": 0.5348612372239245, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.7902881387417713, + "rawVectorScore": 0, + "rawKeywordScore": 15.97240620277387, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "pipeline", + "pipelin", + "to" + ] } }, { "rank": 4, - "score": 0.5266452642025707, - "filePath": "src/plugin.ts", - "startLine": 71, - "endLine": 80, + "score": 0.7020455880709523, + "filePath": "src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.5266452642025707, - "keywordScore": 0, - "rawVectorScore": 0.5266452642025707, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8892380458628514, + "keywordScore": 0.4212569013831039, + "rawVectorScore": 0.512550434869478, + "rawKeywordScore": 8.513966001470433, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "retrieval", + "end", + "to" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 9, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 16, + "passedCount": 20, "wouldInject": true }, { @@ -126,103 +158,137 @@ "query": "How does the plugin interact with chat messages?", "queryIndex": 1, "resultCount": 20, - "latencyMs": 148.9, + "latencyMs": 166.9, "topResults": [ { "rank": 0, - "score": 0.5365629334612002, + "score": 0.9879911756014136, "filePath": "src/plugin.ts", - "startLine": 460, - "endLine": 484, + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.5365629334612002, - "keywordScore": 0, - "rawVectorScore": 0.5365629334612002, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9799852926690226, + "keywordScore": 1, + "rawVectorScore": 0.5258237833833236, + "rawKeywordScore": 22.625276878585613, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "plugin", + "with", + "chat", + "message" + ] } }, { "rank": 1, - "score": 0.5271891880002136, - "filePath": "src/describer/anthropic.ts", - "startLine": 10, - "endLine": 13, + "score": 0.9017268168757648, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.5271891880002136, - "keywordScore": 0, - "rawVectorScore": 0.5271891880002136, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9293384795590002, + "keywordScore": 0.8603093228509116, + "rawVectorScore": 0.4986485807705488, + "rawKeywordScore": 19.464736630730375, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "plugin", + "with", + "message" + ] } }, { "rank": 2, - "score": 0.5258237833833236, + "score": 0.757291060415313, "filePath": "src/plugin.ts", - "startLine": 799, - "endLine": 898, + "startLine": 699, + "endLine": 798, "language": "typescript", "explanation": { - "vectorScore": 0.5258237833833236, - "keywordScore": 0, - "rawVectorScore": 0.5258237833833236, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.967850329451431, + "keywordScore": 0.4414521568611359, + "rawVectorScore": 0.5193126119218489, + "rawKeywordScore": 9.987977277632007, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "plugin", + "chat", + "message" + ] } }, { "rank": 3, - "score": 0.523499772935638, + "score": 0.756571764267638, "filePath": "src/describer/describer.ts", - "startLine": 15, - "endLine": 18, + "startLine": 92, + "endLine": 139, "language": "typescript", "explanation": { - "vectorScore": 0.523499772935638, - "keywordScore": 0, - "rawVectorScore": 0.523499772935638, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9344966108141333, + "keywordScore": 0.4896844944478949, + "rawVectorScore": 0.5014162428079809, + "rawKeywordScore": 11.079247270033841, + "keywordWeight": 0.4, + "matchedTerms": [ + "with", + "chat", + "messages", + "message" + ] } }, { "rank": 4, - "score": 0.519862346858401, - "filePath": "src/types/opencode-plugin.d.ts", - "startLine": 25, - "endLine": 53, + "score": 0.7359841953861253, + "filePath": "src/describer/anthropic.ts", + "startLine": 39, + "endLine": 45, "language": "typescript", "explanation": { - "vectorScore": 0.519862346858401, - "keywordScore": 0, - "rawVectorScore": 0.519862346858401, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9690299054549323, + "keywordScore": 0.38641563028291465, + "rawVectorScore": 0.519945528682528, + "rawKeywordScore": 8.742760625364115, + "keywordWeight": 0.4, + "matchedTerms": [ + "chat", + "messages", + "message" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 17, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 17, + "passedCount": 20, "wouldInject": true }, { @@ -236,103 +302,143 @@ "query": "How does the keyword index combine with vector search?", "queryIndex": 2, "resultCount": 20, - "latencyMs": 143.4, + "latencyMs": 134.2, "topResults": [ { "rank": 0, - "score": 0.5593279003513683, + "score": 0.8969078502224921, "filePath": "src/plugin.ts", - "startLine": 321, - "endLine": 336, + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.5593279003513683, - "keywordScore": 0, - "rawVectorScore": 0.5593279003513683, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8281797503708201, + "keywordScore": 1, + "rawVectorScore": 0.4632240408884311, + "rawKeywordScore": 21.265616832688416, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "keyword", + "index", + "with", + "search" + ] } }, { "rank": 1, - "score": 0.5535023376982596, - "filePath": "src/mcp/handlers.ts", - "startLine": 184, - "endLine": 236, + "score": 0.8525967939232262, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.5535023376982596, - "keywordScore": 0, - "rawVectorScore": 0.5535023376982596, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8335882844540844, + "keywordScore": 0.881109558126939, + "rawVectorScore": 0.46624918490120215, + "rawKeywordScore": 18.737338250746888, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "index", + "with", + "search" + ] } }, { "rank": 2, - "score": 0.5480133473519115, - "filePath": "src/web/api.ts", - "startLine": 245, - "endLine": 275, + "score": 0.812657136040964, + "filePath": "src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.5480133473519115, - "keywordScore": 0, - "rawVectorScore": 0.5480133473519115, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9210947434982968, + "keywordScore": 0.6500007248549649, + "rawVectorScore": 0.5151939889055844, + "rawKeywordScore": 13.82266635573541, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "keyword", + "index", + "with", + "vector", + "search" + ] } }, { "rank": 3, - "score": 0.5468181376103564, - "filePath": "src/plugin.ts", - "startLine": 343, - "endLine": 367, + "score": 0.8098024887487592, + "filePath": "src/mcp/handlers.ts", + "startLine": 184, + "endLine": 236, "language": "typescript", "explanation": { - "vectorScore": 0.5468181376103564, - "keywordScore": 0, - "rawVectorScore": 0.5468181376103564, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.989584709345897, + "keywordScore": 0.5401291578530522, + "rawVectorScore": 0.5535023376982596, + "rawKeywordScore": 11.486179711065684, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "keyword", + "index", + "vector", + "search" + ] } }, { "rank": 4, - "score": 0.5446637871744806, - "filePath": "src/plugin.ts", - "startLine": 1044, - "endLine": 1061, + "score": 0.7831734892429871, + "filePath": "src/eval/run-token-test.ts", + "startLine": 69, + "endLine": 168, "language": "typescript", "explanation": { - "vectorScore": 0.5446637871744806, - "keywordScore": 0, - "rawVectorScore": 0.5446637871744806, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8719553321683353, + "keywordScore": 0.6500007248549649, + "rawVectorScore": 0.48770894514189483, + "rawKeywordScore": 13.82266635573541, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "keyword", + "index", + "with", + "vector", + "search" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 18, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 13, + "passedCount": 20, "wouldInject": true }, { @@ -346,103 +452,132 @@ "query": "Where is the embedder factory defined?", "queryIndex": 3, "resultCount": 20, - "latencyMs": 131.3, + "latencyMs": 139.7, "topResults": [ { "rank": 0, - "score": 0.5817631242382381, - "filePath": "src/embedder/factory.ts", - "startLine": 23, - "endLine": 46, + "score": 0.9, + "filePath": "src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, "language": "typescript", "explanation": { - "vectorScore": 0.5817631242382381, - "keywordScore": 0, - "rawVectorScore": 0.5817631242382381, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 21.01466627637615, + "keywordWeight": 0.4, + "matchedTerms": [ + "where", + "is", + "the", + "defined", + "defin" + ] } }, { "rank": 1, - "score": 0.5447795419845345, - "filePath": "src/core/bootstrap.ts", - "startLine": 56, - "endLine": 66, + "score": 0.7321056306800141, + "filePath": "src/embedder/factory.ts", + "startLine": 23, + "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.5447795419845345, - "keywordScore": 0, - "rawVectorScore": 0.5447795419845345, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 1, + "keywordScore": 0.3302640767000352, + "rawVectorScore": 0.5827979045668126, + "rawKeywordScore": 6.940389354926737, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "embedder", + "embedd" + ] } }, { "rank": 2, - "score": 0.5069139060553813, - "filePath": "src/embedder/factory.ts", - "startLine": 62, - "endLine": 101, + "score": 0.7288616410586475, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.5069139060553813, - "keywordScore": 0, - "rawVectorScore": 0.5069139060553813, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.7869939895384463, + "keywordScore": 0.6416631183389491, + "rawVectorScore": 0.45865844800968253, + "rawKeywordScore": 13.484336293751872, + "keywordWeight": 0.4, + "matchedTerms": [ + "where", + "is", + "the", + "embedder", + "embedd" + ] } }, { "rank": 3, - "score": 0.5038618802536617, - "filePath": "src/embedder/health.ts", - "startLine": 45, - "endLine": 61, + "score": 0.7207378964262317, + "filePath": "src/indexer/worker.ts", + "startLine": 388, + "endLine": 436, "language": "typescript", "explanation": { - "vectorScore": 0.5038618802536617, - "keywordScore": 0, - "rawVectorScore": 0.5038618802536617, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.816020669124496, + "keywordScore": 0.577813737378835, + "rawVectorScore": 0.47557513604896456, + "rawKeywordScore": 12.14256286092187, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "embedder", + "embedd", + "factory" + ] } }, { "rank": 4, - "score": 0.5012114570379301, - "filePath": "src/embedder/health.ts", - "startLine": 397, - "endLine": 404, + "score": 0.6572471776986416, + "filePath": "src/core/bootstrap.ts", + "startLine": 56, + "endLine": 66, "language": "typescript", "explanation": { - "vectorScore": 0.5012114570379301, - "keywordScore": 0, - "rawVectorScore": 0.5012114570379301, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9347657871032725, + "keywordScore": 0.24096926359169515, + "rawVectorScore": 0.5447795419845345, + "rawKeywordScore": 5.0638886572435915, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedder", + "embedd" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 6, + "passedCount": 20, "wouldInject": true }, { @@ -456,103 +591,129 @@ "query": "Where is the LanceDB store implementation?", "queryIndex": 4, "resultCount": 20, - "latencyMs": 144.1, + "latencyMs": 130.9, "topResults": [ { "rank": 0, - "score": 0.572806989541465, - "filePath": "src/web/api.ts", - "startLine": 165, - "endLine": 186, + "score": 0.9, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.572806989541465, - "keywordScore": 0, - "rawVectorScore": 0.572806989541465, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 15.852658307445505, + "keywordWeight": 0.4, + "matchedTerms": [ + "where", + "is", + "the", + "store", + "implementation" + ] } }, { "rank": 1, - "score": 0.5645650973168209, - "filePath": "src/web/api.ts", - "startLine": 189, - "endLine": 192, + "score": 0.8738839055211776, + "filePath": "src/vectorstore/factory.ts", + "startLine": 22, + "endLine": 38, "language": "typescript", "explanation": { - "vectorScore": 0.5645650973168209, - "keywordScore": 0, - "rawVectorScore": 0.5645650973168209, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9708881221900386, + "keywordScore": 0.7283775805178859, + "rawVectorScore": 0.5554483210112929, + "rawKeywordScore": 11.546720902753922, + "keywordWeight": 0.4, + "matchedTerms": [ + "lancedb", + "lance", + "store" + ] } }, { "rank": 2, - "score": 0.5554483210112929, - "filePath": "src/vectorstore/factory.ts", - "startLine": 22, - "endLine": 38, - "language": "typescript", + "score": 0.7707563352787664, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", "explanation": { - "vectorScore": 0.5554483210112929, - "keywordScore": 0, - "rawVectorScore": 0.5554483210112929, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.8563959280875182, + "rawVectorScore": 0, + "rawKeywordScore": 13.576152023859098, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "lancedb", + "lance", + "store" + ] } }, { "rank": 3, - "score": 0.5309788478689071, + "score": 0.7499034097938679, "filePath": "src/web/api.ts", - "startLine": 230, - "endLine": 242, + "startLine": 165, + "endLine": 186, "language": "typescript", "explanation": { - "vectorScore": 0.5309788478689071, - "keywordScore": 0, - "rawVectorScore": 0.5309788478689071, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 1, + "keywordScore": 0.37475852448467, + "rawVectorScore": 0.5721033230464954, + "rawKeywordScore": 5.940918836457924, + "keywordWeight": 0.4, + "matchedTerms": [ + "lance", + "store" + ] } }, { "rank": 4, - "score": 0.522365564132601, + "score": 0.7414482052936453, "filePath": "src/web/api.ts", - "startLine": 199, - "endLine": 227, + "startLine": 189, + "endLine": 192, "language": "typescript", "explanation": { - "vectorScore": 0.522365564132601, - "keywordScore": 0, - "rawVectorScore": 0.522365564132601, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.985907992499629, + "keywordScore": 0.37475852448467, + "rawVectorScore": 0.564041238727137, + "rawKeywordScore": 5.940918836457924, + "keywordWeight": 0.4, + "matchedTerms": [ + "lance", + "store" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 8, + "passedCount": 20, "wouldInject": true }, { @@ -566,103 +727,153 @@ "query": "Find all usages of the retrieve function", "queryIndex": 5, "resultCount": 20, - "latencyMs": 194.3, + "latencyMs": 136.1, "topResults": [ { "rank": 0, - "score": 0.5550896469652798, + "score": 1, "filePath": "src/mcp/handlers.ts", "startLine": 366, "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.5550896469652798, - "keywordScore": 0, + "vectorScore": 1, + "keywordScore": 1, "rawVectorScore": 0.5550896469652798, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "rawKeywordScore": 23.679610717842714, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "all", + "usages", + "usage", + "of", + "the", + "retrieve", + "retriev", + "function" + ] } }, { "rank": 1, - "score": 0.5464938200120028, + "score": 0.9401111688239592, "filePath": "src/opencode/tools.ts", - "startLine": 293, - "endLine": 299, + "startLine": 428, + "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.5464938200120028, - "keywordScore": 0, - "rawVectorScore": 0.5464938200120028, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9783412658133445, + "keywordScore": 0.8827660233398813, + "rawVectorScore": 0.5430671078518944, + "rawKeywordScore": 20.903555787626445, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "the", + "retrieve", + "retriev", + "function" + ] } }, { "rank": 2, - "score": 0.5430671078518944, - "filePath": "src/opencode/tools.ts", - "startLine": 428, - "endLine": 527, + "score": 0.9147751111453262, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.5430671078518944, - "keywordScore": 0, - "rawVectorScore": 0.5430671078518944, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8579585185755436, + "keywordScore": 1, + "rawVectorScore": 0.476243891186953, + "rawKeywordScore": 23.679610717842714, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "all", + "usages", + "usage", + "of", + "the", + "retrieve", + "retriev", + "function" + ] } }, { "rank": 3, - "score": 0.5337774623648306, - "filePath": "src/mcp/handlers.ts", - "startLine": 290, - "endLine": 299, + "score": 0.9, + "filePath": "src/plugin.ts", + "startLine": 699, + "endLine": 798, "language": "typescript", "explanation": { - "vectorScore": 0.5337774623648306, - "keywordScore": 0, - "rawVectorScore": 0.5337774623648306, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 23.679610717842714, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "all", + "usages", + "usage", + "of", + "the", + "retrieve", + "retriev", + "function" + ] } }, { "rank": 4, - "score": 0.5324106228403723, - "filePath": "src/mcp/handlers.ts", - "startLine": 280, - "endLine": 287, + "score": 0.8655844861745017, + "filePath": "src/opencode/tools.ts", + "startLine": 293, + "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.5324106228403723, - "keywordScore": 0, - "rawVectorScore": 0.5324106228403723, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9845145248154579, + "keywordScore": 0.6871894282130675, + "rawVectorScore": 0.5464938200120028, + "rawKeywordScore": 16.27237814950236, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "retrieve", + "retriev" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 6, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 12, + "passedCount": 20, "wouldInject": true }, { @@ -676,103 +887,149 @@ "query": "Find all usages of SearchResult type", "queryIndex": 6, "resultCount": 20, - "latencyMs": 135, + "latencyMs": 162, "topResults": [ { "rank": 0, - "score": 0.5757054205071269, + "score": 0.9923440255035864, "filePath": "src/mcp/handlers.ts", - "startLine": 290, - "endLine": 299, + "startLine": 366, + "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.5757054205071269, - "keywordScore": 0, - "rawVectorScore": 0.5757054205071269, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9872400425059772, + "keywordScore": 1, + "rawVectorScore": 0.5683594438123775, + "rawKeywordScore": 23.238308700996786, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "all", + "usages", + "usage", + "of", + "searchresult", + "search", + "result", + "type" + ] } }, { "rank": 1, - "score": 0.5683594438123775, - "filePath": "src/mcp/handlers.ts", - "startLine": 366, - "endLine": 465, + "score": 0.8831435713479681, + "filePath": "src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, "language": "typescript", "explanation": { - "vectorScore": 0.5683594438123775, - "keywordScore": 0, - "rawVectorScore": 0.5683594438123775, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.976720108398381, + "keywordScore": 0.7427787657723488, + "rawVectorScore": 0.5623030607232565, + "rawKeywordScore": 17.260922255563226, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "search", + "result", + "type" + ] } }, { "rank": 2, - "score": 0.566144591136295, - "filePath": "src/mcp/handlers.ts", - "startLine": 176, - "endLine": 181, + "score": 0.8811614245995276, + "filePath": "src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.566144591136295, - "keywordScore": 0, - "rawVectorScore": 0.566144591136295, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9342051230266923, + "keywordScore": 0.8015958769587807, + "rawVectorScore": 0.5378269531919941, + "rawKeywordScore": 18.62773244221438, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "searchresult", + "search", + "result" + ] } }, { "rank": 3, - "score": 0.5623030607232565, - "filePath": "src/opencode/tools.ts", - "startLine": 528, - "endLine": 627, + "score": 0.8733757083360099, + "filePath": "src/plugin.ts", + "startLine": 412, + "endLine": 448, "language": "typescript", "explanation": { - "vectorScore": 0.5623030607232565, - "keywordScore": 0, - "rawVectorScore": 0.5623030607232565, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9212289292541626, + "keywordScore": 0.8015958769587807, + "rawVectorScore": 0.5303564880995979, + "rawKeywordScore": 18.62773244221438, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "searchresult", + "search", + "result" + ] } }, { "rank": 4, - "score": 0.5618906907763801, + "score": 0.8511362634456433, "filePath": "src/mcp/handlers.ts", "startLine": 280, "endLine": 287, "language": "typescript", "explanation": { - "vectorScore": 0.5618906907763801, - "keywordScore": 0, + "vectorScore": 0.9760038220265883, + "keywordScore": 0.663834925574226, "rawVectorScore": 0.5618906907763801, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "rawKeywordScore": 15.426400926997088, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "search", + "result" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 13, + "passedCount": 20, "wouldInject": true }, { @@ -786,99 +1043,136 @@ "query": "How does the chunker factory register new languages?", "queryIndex": 7, "resultCount": 20, - "latencyMs": 134, + "latencyMs": 139, "topResults": [ { "rank": 0, - "score": 0.6071041818181423, - "filePath": "src/chunker/factory.ts", - "startLine": 97, - "endLine": 115, - "language": "typescript", + "score": 0.9, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", "explanation": { - "vectorScore": 0.6071041818181423, - "keywordScore": 0, - "rawVectorScore": 0.6071041818181423, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 17.589941781034785, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "chunker", + "chunk", + "factory", + "register", + "regist" + ] } }, { "rank": 1, - "score": 0.569802700076729, - "filePath": "src/chunker/base.ts", - "startLine": 57, - "endLine": 64, + "score": 0.899216117776033, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.569802700076729, - "keywordScore": 0, - "rawVectorScore": 0.569802700076729, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.9991290197511479, + "rawVectorScore": 0, + "rawKeywordScore": 17.574621289165044, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "chunk", + "new", + "language" + ] } }, { "rank": 2, - "score": 0.5602417787656173, - "filePath": "src/chunker/grammar.ts", - "startLine": 87, - "endLine": 97, + "score": 0.8826921876157048, + "filePath": "src/chunker/factory.ts", + "startLine": 97, + "endLine": 115, "language": "typescript", "explanation": { - "vectorScore": 0.5602417787656173, - "keywordScore": 0, - "rawVectorScore": 0.5602417787656173, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 1, + "keywordScore": 0.7067304690392618, + "rawVectorScore": 0.6069949286166946, + "rawKeywordScore": 12.431347805284023, + "keywordWeight": 0.4, + "matchedTerms": [ + "chunker", + "chunk", + "register", + "regist", + "language" + ] } }, { "rank": 3, - "score": 0.5455432515897193, - "filePath": "src/chunker/grammar.ts", - "startLine": 110, - "endLine": 123, + "score": 0.8736169390632975, + "filePath": "src/chunker/loader.ts", + "startLine": 19, + "endLine": 43, "language": "typescript", "explanation": { - "vectorScore": 0.5455432515897193, - "keywordScore": 0, - "rawVectorScore": 0.5455432515897193, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8854996031080753, + "keywordScore": 0.8557929429961306, + "rawVectorScore": 0.5374937683786976, + "rawKeywordScore": 15.053348043922359, + "keywordWeight": 0.4, + "matchedTerms": [ + "does", + "chunker", + "chunk", + "register", + "regist" + ] } }, { "rank": 4, - "score": 0.5426944664638417, - "filePath": "src/chunker/factory.ts", - "startLine": 134, - "endLine": 136, + "score": 0.7914916429212517, + "filePath": "src/chunker/loader.ts", + "startLine": 56, + "endLine": 70, "language": "typescript", "explanation": { - "vectorScore": 0.5426944664638417, - "keywordScore": 0, - "rawVectorScore": 0.5426944664638417, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8633489396363144, + "keywordScore": 0.6837056978486575, + "rawVectorScore": 0.5240484279858436, + "rawKeywordScore": 12.026343420519646, + "keywordWeight": 0.4, + "matchedTerms": [ + "chunker", + "chunk", + "register", + "regist", + "new" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, @@ -896,104 +1190,145 @@ "query": "What is the default minScore configuration?", "queryIndex": 8, "resultCount": 20, - "latencyMs": 134.4, + "latencyMs": 136.3, "topResults": [ { "rank": 0, - "score": 0.48892181029471843, - "filePath": "src/chunker/fallback.ts", - "startLine": 15, - "endLine": 17, + "score": 0.9136535889903628, + "filePath": "src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.48892181029471843, - "keywordScore": 0, - "rawVectorScore": 0.48892181029471843, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9363405588683713, + "keywordScore": 0.8796231341733498, + "rawVectorScore": 0.4578616343962562, + "rawKeywordScore": 18.85150560456846, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "default", + "minscore", + "minscor", + "min", + "score" + ] } }, { "rank": 1, - "score": 0.48419510216855544, - "filePath": "src/retriever/context-optimizer.ts", - "startLine": 49, - "endLine": 51, + "score": 0.9, + "filePath": "src/plugin.ts", + "startLine": 899, + "endLine": 998, "language": "typescript", "explanation": { - "vectorScore": 0.48419510216855544, - "keywordScore": 0, - "rawVectorScore": 0.48419510216855544, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 21.431343574523744, + "keywordWeight": 0.4, + "matchedTerms": [ + "what", + "is", + "the", + "minscore", + "minscor", + "min", + "score" + ] } }, { "rank": 2, - "score": 0.48220511569439745, - "filePath": "src/describer/anthropic.ts", - "startLine": 34, - "endLine": 36, + "score": 0.8873812656718175, + "filePath": "src/tui.ts", + "startLine": 427, + "endLine": 526, "language": "typescript", "explanation": { - "vectorScore": 0.48220511569439745, - "keywordScore": 0, - "rawVectorScore": 0.48220511569439745, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9509258235828283, + "keywordScore": 0.7920644288053013, + "rawVectorScore": 0.46499369022467635, + "rawKeywordScore": 16.975004906885314, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "default", + "minscore", + "minscor", + "min", + "score" + ] } }, { "rank": 3, - "score": 0.47732997731936505, - "filePath": "src/embedder/cohere.ts", - "startLine": 26, - "endLine": 32, + "score": 0.8696312452084856, + "filePath": "src/eval/run-token-test.ts", + "startLine": 169, + "endLine": 268, "language": "typescript", "explanation": { - "vectorScore": 0.47732997731936505, - "keywordScore": 0, - "rawVectorScore": 0.47732997731936505, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9356512789634122, + "keywordScore": 0.7706011945760958, + "rawVectorScore": 0.45752458307358096, + "rawKeywordScore": 16.515018959898732, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "minscore", + "minscor", + "min", + "score" + ] } }, { "rank": 4, - "score": 0.476834340498025, + "score": 0.8578263439935989, "filePath": "src/plugin.ts", - "startLine": 412, - "endLine": 448, + "startLine": 343, + "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.476834340498025, - "keywordScore": 0, - "rawVectorScore": 0.476834340498025, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.964797311000138, + "keywordScore": 0.6973698934837903, + "rawVectorScore": 0.4717767157384621, + "rawKeywordScore": 14.945573785780137, + "keywordWeight": 0.4, + "matchedTerms": [ + "default", + "minscore", + "minscor", + "min", + "score" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 13, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, @@ -1006,99 +1341,137 @@ "query": "How does the session logger capture token usage?", "queryIndex": 9, "resultCount": 20, - "latencyMs": 134.4, + "latencyMs": 133.6, "topResults": [ { "rank": 0, - "score": 0.64997790367023, - "filePath": "src/eval/session-logger.ts", - "startLine": 26, - "endLine": 40, - "language": "typescript", + "score": 0.9193270485472197, + "filePath": "src/eval/index.ts", + "startLine": 1, + "endLine": 39, + "language": "text", "explanation": { - "vectorScore": 0.64997790367023, - "keywordScore": 0, - "rawVectorScore": 0.64997790367023, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8655450809120329, + "keywordScore": 1, + "rawVectorScore": 0.5625851772232827, + "rawKeywordScore": 27.43241842421657, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "session", + "logger", + "logg", + "capture", + "captur", + "token", + "usage" + ] } }, { "rank": 1, - "score": 0.6242235350041389, - "filePath": "src/eval/session-logger.ts", - "startLine": 12, - "endLine": 24, + "score": 0.811158026235588, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.6242235350041389, - "keywordScore": 0, - "rawVectorScore": 0.6242235350041389, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.7225275148229949, + "keywordScore": 0.9441037933544774, + "rawVectorScore": 0.46962691942871126, + "rawKeywordScore": 25.89905029519012, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "session", + "logger", + "logg", + "capture" + ] } }, { "rank": 2, - "score": 0.6052995517731005, - "filePath": "src/eval/session-logger.ts", - "startLine": 43, - "endLine": 52, + "score": 0.7233527982947474, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.6052995517731005, - "keywordScore": 0, - "rawVectorScore": 0.6052995517731005, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.7099312621395539, + "keywordScore": 0.7434851025275377, + "rawVectorScore": 0.46143963351542777, + "rawKeywordScore": 20.395594424706974, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "session", + "token", + "usage" + ] } }, { "rank": 3, - "score": 0.5971586335739852, - "filePath": "src/eval/token-analysis.ts", - "startLine": 83, - "endLine": 182, + "score": 0.7176031981226716, + "filePath": "src/eval/session-logger.ts", + "startLine": 26, + "endLine": 40, "language": "typescript", "explanation": { - "vectorScore": 0.5971586335739852, - "keywordScore": 0, - "rawVectorScore": 0.5971586335739852, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 1, + "keywordScore": 0.2940079953066791, + "rawVectorScore": 0.64997790367023, + "rawKeywordScore": 8.065350347317922, + "keywordWeight": 0.4, + "matchedTerms": [ + "session", + "token", + "usage" + ] } }, { "rank": 4, - "score": 0.5731101818065053, - "filePath": "src/web/api.ts", - "startLine": 385, - "endLine": 407, + "score": 0.7126207541919147, + "filePath": "src/eval/session-logger.ts", + "startLine": 43, + "endLine": 52, "language": "typescript", "explanation": { - "vectorScore": 0.5731101818065053, - "keywordScore": 0, - "rawVectorScore": 0.5731101818065053, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9312617372916151, + "keywordScore": 0.38465927954236423, + "rawVectorScore": 0.6052995517731005, + "rawKeywordScore": 10.552134307163826, + "keywordWeight": 0.4, + "matchedTerms": [ + "session", + "logger", + "logg", + "token" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 9, + "wouldInject": true }, { "threshold": 0.5, @@ -1116,103 +1489,130 @@ "query": "How does L2 normalization affect vector search scores?", "queryIndex": 10, "resultCount": 20, - "latencyMs": 177, + "latencyMs": 138.8, "topResults": [ { "rank": 0, - "score": 0.5337170795728613, - "filePath": "src/retriever/context-optimizer.ts", - "startLine": 49, - "endLine": 51, + "score": 0.9, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.5337170795728613, - "keywordScore": 0, - "rawVectorScore": 0.5337170795728613, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 19.941482298471815, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "search", + "scores", + "score" + ] } }, { "rank": 1, - "score": 0.5165566800276302, + "score": 0.7369210744157491, "filePath": "src/plugin.ts", "startLine": 343, "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.5165566800276302, - "keywordScore": 0, - "rawVectorScore": 0.5165566800276302, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9673211194458253, + "keywordScore": 0.3913210068706347, + "rawVectorScore": 0.5162758028797768, + "rawKeywordScore": 7.8035209315309295, + "keywordWeight": 0.4, + "matchedTerms": [ + "vector", + "search", + "score" + ] } }, { "rank": 2, - "score": 0.5082491036230451, + "score": 0.7353811362488262, "filePath": "src/plugin.ts", - "startLine": 321, - "endLine": 336, + "startLine": 412, + "endLine": 448, "language": "typescript", "explanation": { - "vectorScore": 0.5082491036230451, - "keywordScore": 0, - "rawVectorScore": 0.5082491036230451, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9033365735211804, + "keywordScore": 0.48344798034029485, + "rawVectorScore": 0.4821261578910797, + "rawKeywordScore": 9.64066934218794, + "keywordWeight": 0.4, + "matchedTerms": [ + "search", + "scores", + "score" + ] } }, { "rank": 3, - "score": 0.5026611907652707, - "filePath": "src/embedder/ollama.ts", - "startLine": 51, - "endLine": 97, + "score": 0.7328741980994883, + "filePath": "src/mcp/handlers.ts", + "startLine": 176, + "endLine": 181, "language": "typescript", "explanation": { - "vectorScore": 0.5026611907652707, - "keywordScore": 0, - "rawVectorScore": 0.5026611907652707, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8991583432722839, + "keywordScore": 0.48344798034029485, + "rawVectorScore": 0.4798961650448557, + "rawKeywordScore": 9.64066934218794, + "keywordWeight": 0.4, + "matchedTerms": [ + "search", + "scores", + "score" + ] } }, { "rank": 4, - "score": 0.4984218379927961, - "filePath": "src/eval/token-analysis.ts", - "startLine": 223, - "endLine": 307, + "score": 0.7278975304101996, + "filePath": "src/plugin.ts", + "startLine": 321, + "endLine": 336, "language": "typescript", "explanation": { - "vectorScore": 0.4984218379927961, - "keywordScore": 0, - "rawVectorScore": 0.4984218379927961, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9522818794365763, + "keywordScore": 0.3913210068706347, + "rawVectorScore": 0.5082491036230451, + "rawKeywordScore": 7.8035209315309295, + "keywordWeight": 0.4, + "matchedTerms": [ + "vector", + "search", + "score" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 12, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 4, + "passedCount": 20, "wouldInject": true }, { @@ -1226,103 +1626,144 @@ "query": "What is the MetadataFilter interface used for?", "queryIndex": 11, "resultCount": 20, - "latencyMs": 148.8, + "latencyMs": 140.3, "topResults": [ { "rank": 0, - "score": 0.5021709176592174, - "filePath": "src/mcp/handlers.ts", - "startLine": 308, - "endLine": 313, + "score": 0.9208141147149961, + "filePath": "src/indexer/pipeline.ts", + "startLine": 32, + "endLine": 72, "language": "typescript", "explanation": { - "vectorScore": 0.5021709176592174, - "keywordScore": 0, - "rawVectorScore": 0.5021709176592174, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9091473474904641, + "keywordScore": 0.9383142655517939, + "rawVectorScore": 0.4565473577767298, + "rawKeywordScore": 14.370315088187917, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "filter", + "filt", + "interface", + "interfac", + "for" + ] } }, { "rank": 1, - "score": 0.4993056773273916, - "filePath": "src/plugin.ts", - "startLine": 71, - "endLine": 80, + "score": 0.9, + "filePath": "src/indexer/worker.ts", + "startLine": 50, + "endLine": 77, "language": "typescript", "explanation": { - "vectorScore": 0.4993056773273916, - "keywordScore": 0, - "rawVectorScore": 0.4993056773273916, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 15.31503422228924, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "metadata", + "interface", + "interfac", + "used", + "for" + ] } }, { "rank": 2, - "score": 0.49328544161900684, - "filePath": "src/indexer/metadata.ts", - "startLine": 88, - "endLine": 105, + "score": 0.8655344811267579, + "filePath": "src/cli/types.ts", + "startLine": 37, + "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.49328544161900684, - "keywordScore": 0, - "rawVectorScore": 0.49328544161900684, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9182238837228094, + "keywordScore": 0.7865003772326806, + "rawVectorScore": 0.46110533030569373, + "rawKeywordScore": 12.0452801931619, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "metadata", + "interface", + "interfac", + "used" + ] } }, { "rank": 3, - "score": 0.49118305993298894, - "filePath": "src/opencode/tools.ts", - "startLine": 293, - "endLine": 299, + "score": 0.8536246224900575, + "filePath": "src/content/reader.ts", + "startLine": 137, + "endLine": 236, "language": "typescript", "explanation": { - "vectorScore": 0.49118305993298894, - "keywordScore": 0, - "rawVectorScore": 0.49118305993298894, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.9484718027667306, + "rawVectorScore": 0, + "rawKeywordScore": 14.52587811824885, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "filter", + "filt", + "used", + "for" + ] } }, { "rank": 4, - "score": 0.4899592501199694, - "filePath": "src/opencode/create-read-tool.ts", - "startLine": 261, - "endLine": 264, + "score": 0.8536246224900575, + "filePath": "src/indexer/pipeline.ts", + "startLine": 153, + "endLine": 252, "language": "typescript", "explanation": { - "vectorScore": 0.4899592501199694, - "keywordScore": 0, - "rawVectorScore": 0.4899592501199694, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.9484718027667306, + "rawVectorScore": 0, + "rawKeywordScore": 14.52587811824885, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "filter", + "filt", + "used", + "for" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 6, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 15, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 1, + "passedCount": 20, "wouldInject": true }, { @@ -1336,99 +1777,143 @@ "query": "How does the background indexer handle file changes?", "queryIndex": 12, "resultCount": 20, - "latencyMs": 140.5, + "latencyMs": 144.1, "topResults": [ { "rank": 0, - "score": 0.6013927958823782, + "score": 0.9952011548495419, "filePath": "src/watcher.ts", "startLine": 78, "endLine": 177, "language": "typescript", "explanation": { - "vectorScore": 0.6013927958823782, - "keywordScore": 0, + "vectorScore": 1, + "keywordScore": 0.9880028871238546, "rawVectorScore": 0.6013927958823782, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "rawKeywordScore": 21.127461055894198, + "keywordWeight": 0.4, + "matchedTerms": [ + "background", + "indexer", + "index", + "handle", + "handl", + "file", + "change" + ] } }, { "rank": 1, - "score": 0.584471994512437, + "score": 0.9797577349570907, "filePath": "src/watcher.ts", - "startLine": 21, - "endLine": 24, + "startLine": 27, + "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.584471994512437, - "keywordScore": 0, - "rawVectorScore": 0.584471994512437, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9693248481190234, + "keywordScore": 0.9954070652141916, + "rawVectorScore": 0.582944980528561, + "rawKeywordScore": 21.285792055016966, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "background", + "indexer", + "index", + "file", + "changes", + "change" + ] } }, { "rank": 2, - "score": 0.582944980528561, - "filePath": "src/watcher.ts", - "startLine": 27, - "endLine": 46, + "score": 0.8734008584836849, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.582944980528561, - "keywordScore": 0, - "rawVectorScore": 0.582944980528561, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.7890014308061415, + "keywordScore": 1, + "rawVectorScore": 0.47449977642770214, + "rawKeywordScore": 21.384007406494238, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "index", + "handle", + "handl", + "file" + ] } }, { "rank": 3, - "score": 0.5652756993373081, - "filePath": "src/indexer/worker.ts", - "startLine": 120, - "endLine": 125, + "score": 0.8511008378413143, + "filePath": "src/cli/commands/index-command.ts", + "startLine": 63, + "endLine": 162, "language": "typescript", "explanation": { - "vectorScore": 0.5652756993373081, - "keywordScore": 0, - "rawVectorScore": 0.5652756993373081, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8216089349856966, + "keywordScore": 0.8953386921247408, + "rawVectorScore": 0.4941096945329912, + "rawKeywordScore": 19.145929223716323, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "index", + "handle", + "handl", + "file", + "changes", + "change" + ] } }, { "rank": 4, - "score": 0.5495112894178465, - "filePath": "src/watcher.ts", - "startLine": 178, - "endLine": 189, + "score": 0.8250077815006346, + "filePath": "src/cli/commands/index-command.ts", + "startLine": 163, + "endLine": 224, "language": "typescript", "explanation": { - "vectorScore": 0.5495112894178465, - "keywordScore": 0, - "rawVectorScore": 0.5495112894178465, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.841389943410231, + "keywordScore": 0.8004345386362398, + "rawVectorScore": 0.5060058504947947, + "rawKeywordScore": 17.11649810261115, + "keywordWeight": 0.4, + "matchedTerms": [ + "index", + "handle", + "handl", + "file", + "changes", + "change" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 12, + "wouldInject": true }, { "threshold": 0.5, @@ -1446,103 +1931,130 @@ "query": "Where is the config validation logic?", "queryIndex": 13, "resultCount": 20, - "latencyMs": 139.5, + "latencyMs": 129.8, "topResults": [ { "rank": 0, - "score": 0.5111564857236017, - "filePath": "src/eval/run-token-test.ts", - "startLine": 40, - "endLine": 48, + "score": 0.9, + "filePath": "src/indexer/pipeline.ts", + "startLine": 153, + "endLine": 252, "language": "typescript", "explanation": { - "vectorScore": 0.5111564857236017, - "keywordScore": 0, - "rawVectorScore": 0.5111564857236017, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 10.094923945121604, + "keywordWeight": 0.4, + "matchedTerms": [ + "where", + "is", + "the", + "config" + ] } }, { "rank": 1, - "score": 0.5110111323272439, - "filePath": "src/tui.ts", - "startLine": 265, - "endLine": 271, + "score": 0.9, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.5110111323272439, - "keywordScore": 0, - "rawVectorScore": 0.5110111323272439, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 10.094923945121604, + "keywordWeight": 0.4, + "matchedTerms": [ + "where", + "is", + "the", + "config" + ] } }, { "rank": 2, - "score": 0.5049805119823045, - "filePath": "src/cli/format.ts", - "startLine": 130, - "endLine": 134, - "language": "typescript", + "score": 0.8916278244014808, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", "explanation": { - "vectorScore": 0.5049805119823045, - "keywordScore": 0, - "rawVectorScore": 0.5049805119823045, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.990697582668312, + "rawVectorScore": 0, + "rawKeywordScore": 10.001016749652432, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "config", + "validation" + ] } }, { "rank": 3, - "score": 0.4990456770386439, + "score": 0.868075422485252, "filePath": "src/plugin.ts", - "startLine": 193, - "endLine": 215, + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.4990456770386439, - "keywordScore": 0, - "rawVectorScore": 0.4990456770386439, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8907077694596774, + "keywordScore": 0.8341269020236137, + "rawVectorScore": 0.4551615858442635, + "rawKeywordScore": 8.42044763650828, + "keywordWeight": 0.4, + "matchedTerms": [ + "where", + "is", + "the" + ] } }, { "rank": 4, - "score": 0.4907326233397001, - "filePath": "src/tui.ts", - "startLine": 361, - "endLine": 376, + "score": 0.7730420600418354, + "filePath": "src/retriever/context-optimizer.ts", + "startLine": 8, + "endLine": 19, "language": "typescript", "explanation": { - "vectorScore": 0.4907326233397001, - "keywordScore": 0, - "rawVectorScore": 0.4907326233397001, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9198744474336046, + "keywordScore": 0.5527934789541816, + "rawVectorScore": 0.4700660829819441, + "rawKeywordScore": 5.580408127401643, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "config" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 3, + "passedCount": 20, "wouldInject": true }, { @@ -1556,99 +2068,131 @@ "query": "How are PDF documents chunked and indexed?", "queryIndex": 14, "resultCount": 20, - "latencyMs": 142.3, + "latencyMs": 136.5, "topResults": [ { "rank": 0, - "score": 0.5988040562536635, - "filePath": "src/chunker/docx.ts", - "startLine": 39, - "endLine": 108, + "score": 0.9, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.5988040562536635, - "keywordScore": 0, - "rawVectorScore": 0.5988040562536635, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 17.66244152140157, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "are", + "chunk", + "and", + "indexed", + "index" + ] } }, { "rank": 1, - "score": 0.5804692817652682, - "filePath": "src/chunker/doc.ts", - "startLine": 40, - "endLine": 109, + "score": 0.7843291716784947, + "filePath": "src/indexer/pipeline.ts", + "startLine": 553, + "endLine": 652, "language": "typescript", "explanation": { - "vectorScore": 0.5804692817652682, - "keywordScore": 0, - "rawVectorScore": 0.5804692817652682, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.8714768574205496, + "rawVectorScore": 0, + "rawKeywordScore": 15.39240903144527, + "keywordWeight": 0.4, + "matchedTerms": [ + "are", + "document", + "chunk", + "and", + "indexed", + "index" + ] } }, { "rank": 2, - "score": 0.5560128785732158, - "filePath": "src/indexer/worker.ts", - "startLine": 120, - "endLine": 125, + "score": 0.7216075910562562, + "filePath": "src/indexer/pipeline.ts", + "startLine": 32, + "endLine": 72, "language": "typescript", "explanation": { - "vectorScore": 0.5560128785732158, - "keywordScore": 0, - "rawVectorScore": 0.5560128785732158, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8554726212998006, + "keywordScore": 0.5208100456909396, + "rawVectorScore": 0.5109743711444423, + "rawKeywordScore": 9.198776975774699, + "keywordWeight": 0.4, + "matchedTerms": [ + "are", + "chunk", + "and", + "index" + ] } }, { "rank": 3, - "score": 0.5501933735756055, - "filePath": "src/chunker/excel.ts", - "startLine": 49, - "endLine": 108, + "score": 0.7072774945811671, + "filePath": "src/indexer/worker.ts", + "startLine": 20, + "endLine": 47, "language": "typescript", "explanation": { - "vectorScore": 0.5501933735756055, - "keywordScore": 0, - "rawVectorScore": 0.5501933735756055, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.862685186169146, + "keywordScore": 0.47416595719919863, + "rawVectorScore": 0.5152824409840739, + "rawKeywordScore": 8.374928490470245, + "keywordWeight": 0.4, + "matchedTerms": [ + "chunk", + "and", + "indexed", + "index" + ] } }, { "rank": 4, - "score": 0.5483333602969859, + "score": 0.7019387005874678, "filePath": "src/content/pdf.ts", "startLine": 15, "endLine": 23, "language": "typescript", "explanation": { - "vectorScore": 0.5483333602969859, - "keywordScore": 0, - "rawVectorScore": 0.5483333602969859, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9167982919224046, + "keywordScore": 0.37964931358506243, + "rawVectorScore": 0.5476042353869528, + "rawKeywordScore": 6.705533799836411, + "keywordWeight": 0.4, + "matchedTerms": [ + "pdf", + "chunk" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 14, + "wouldInject": true }, { "threshold": 0.5, @@ -1666,98 +2210,127 @@ "query": "What embedding providers are supported?", "queryIndex": 15, "resultCount": 20, - "latencyMs": 182.4, + "latencyMs": 145.4, "topResults": [ { "rank": 0, - "score": 0.660832259007303, - "filePath": "src/embedder/ollama.ts", - "startLine": 51, - "endLine": 97, - "language": "typescript", + "score": 0.8821156352374349, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", "explanation": { - "vectorScore": 0.660832259007303, - "keywordScore": 0, - "rawVectorScore": 0.660832259007303, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.9801284835971499, + "rawVectorScore": 0, + "rawKeywordScore": 14.678568695664758, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedding", + "embedd", + "provider", + "supported", + "support" + ] } }, { "rank": 1, - "score": 0.6448630403411468, - "filePath": "src/embedder/openai.ts", - "startLine": 60, - "endLine": 89, + "score": 0.8494656445483753, + "filePath": "src/opencode/tools.ts", + "startLine": 334, + "endLine": 415, "language": "typescript", "explanation": { - "vectorScore": 0.6448630403411468, - "keywordScore": 0, - "rawVectorScore": 0.6448630403411468, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.7491094075806255, + "keywordScore": 1, + "rawVectorScore": 0.4950356620551272, + "rawKeywordScore": 14.976167860965777, + "keywordWeight": 0.4, + "matchedTerms": [ + "what", + "provider", + "supported", + "support" + ] } }, { "rank": 2, - "score": 0.644602639497984, - "filePath": "src/embedder/health.ts", - "startLine": 45, - "endLine": 61, + "score": 0.8181165631497871, + "filePath": "src/core/provider-defaults.ts", + "startLine": 7, + "endLine": 16, "language": "typescript", "explanation": { - "vectorScore": 0.644602639497984, - "keywordScore": 0, - "rawVectorScore": 0.644602639497984, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8984290096625315, + "keywordScore": 0.6976478933806705, + "rawVectorScore": 0.5937108720129848, + "rawKeywordScore": 10.448091959118075, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedding", + "embedd", + "provider", + "support" + ] } }, { "rank": 3, - "score": 0.6434828647517459, - "filePath": "src/embedder/factory.ts", - "startLine": 23, - "endLine": 46, + "score": 0.7744272444332222, + "filePath": "src/embedder/ollama.ts", + "startLine": 51, + "endLine": 97, "language": "typescript", "explanation": { - "vectorScore": 0.6434828647517459, - "keywordScore": 0, - "rawVectorScore": 0.6434828647517459, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 1, + "keywordScore": 0.43606811108305554, + "rawVectorScore": 0.660832259007303, + "rawKeywordScore": 6.530629230394111, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedding", + "embedd", + "provider" + ] } }, { "rank": 4, - "score": 0.6091671191094286, - "filePath": "src/core/bootstrap.ts", - "startLine": 56, - "endLine": 66, - "language": "typescript", - "explanation": { - "vectorScore": 0.6091671191094286, - "keywordScore": 0, - "rawVectorScore": 0.6091671191094286, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "score": 0.7601420876853133, + "filePath": "src/embedder/health.ts", + "startLine": 45, + "endLine": 61, + "language": "typescript", + "explanation": { + "vectorScore": 0.9761914054201519, + "keywordScore": 0.43606811108305554, + "rawVectorScore": 0.645098771667313, + "rawKeywordScore": 6.530629230394111, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedding", + "embedd", + "provider" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 6, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 1, + "passedCount": 20, "wouldInject": true }, { @@ -1776,103 +2349,134 @@ "query": "How does the CLI parse and dispatch commands?", "queryIndex": 16, "resultCount": 20, - "latencyMs": 129.9, + "latencyMs": 143.2, "topResults": [ { "rank": 0, - "score": 0.5516739028063521, - "filePath": "src/cli/commands/query.ts", - "startLine": 25, - "endLine": 101, - "language": "typescript", + "score": 0.9377600500556723, + "filePath": "src/cli.ts", + "startLine": 1, + "endLine": 10, + "language": "text", "explanation": { - "vectorScore": 0.5516739028063521, - "keywordScore": 0, - "rawVectorScore": 0.5516739028063521, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8962667500927872, + "keywordScore": 1, + "rawVectorScore": 0.49600431494842623, + "rawKeywordScore": 15.680509514134853, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "cli", + "and", + "commands", + "command" + ] } }, { "rank": 1, - "score": 0.5364078675636673, - "filePath": "src/cli/commands/eval.ts", - "startLine": 71, - "endLine": 134, + "score": 0.9247393361701033, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.5364078675636673, - "keywordScore": 0, - "rawVectorScore": 0.5364078675636673, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8808975790823529, + "keywordScore": 0.9905019718017289, + "rawVectorScore": 0.48749883916505427, + "rawKeywordScore": 15.531575592606343, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "command" + ] } }, { "rank": 2, - "score": 0.5220385521923081, - "filePath": "src/cli/format.ts", - "startLine": 110, - "endLine": 122, + "score": 0.8672958043536596, + "filePath": "src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.5220385521923081, - "keywordScore": 0, - "rawVectorScore": 0.5220385521923081, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 1, + "keywordScore": 0.668239510884149, + "rawVectorScore": 0.553411487034498, + "rawKeywordScore": 10.478336008139719, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "cli", + "parse", + "command" + ] } }, { "rank": 3, - "score": 0.5189242529738165, - "filePath": "src/cli/commands/index.ts", - "startLine": 1, - "endLine": 18, - "language": "text", + "score": 0.8359388466861839, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, + "language": "typescript", "explanation": { - "vectorScore": 0.5189242529738165, - "keywordScore": 0, - "rawVectorScore": 0.5189242529738165, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.9288209407624265, + "rawVectorScore": 0, + "rawKeywordScore": 14.564385598552914, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "and" + ] } }, { "rank": 4, - "score": 0.5168549634058027, - "filePath": "src/cli/commands/show.ts", + "score": 0.8198970163364123, + "filePath": "src/cli/commands/ui.ts", "startLine": 22, - "endLine": 59, + "endLine": 82, "language": "typescript", "explanation": { - "vectorScore": 0.5168549634058027, - "keywordScore": 0, - "rawVectorScore": 0.5168549634058027, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9210020199712545, + "keywordScore": 0.668239510884149, + "rawVectorScore": 0.5096930974340684, + "rawKeywordScore": 10.478336008139719, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "cli", + "parse", + "command" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 11, + "passedCount": 20, "wouldInject": true }, { @@ -1886,81 +2490,117 @@ "query": "How does the session logger persist events?", "queryIndex": 17, "resultCount": 20, - "latencyMs": 134.7, + "latencyMs": 135.5, "topResults": [ { "rank": 0, - "score": 0.6629804422299629, + "score": 0.8216979937289588, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, + "language": "typescript", + "explanation": { + "vectorScore": 0.7028299895482647, + "keywordScore": 1, + "rawVectorScore": 0.4659625372831887, + "rawKeywordScore": 27.793040387067073, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "session", + "logger", + "logg", + "events", + "event" + ] + } + }, + { + "rank": 1, + "score": 0.76332557963888, "filePath": "src/eval/session-logger.ts", "startLine": 43, "endLine": 52, "language": "typescript", "explanation": { - "vectorScore": 0.6629804422299629, - "keywordScore": 0, + "vectorScore": 1, + "keywordScore": 0.4083139490972, "rawVectorScore": 0.6629804422299629, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "rawKeywordScore": 11.348286077861328, + "keywordWeight": 0.4, + "matchedTerms": [ + "session", + "logger", + "logg", + "event" + ] } }, { - "rank": 1, - "score": 0.6525293734589068, + "rank": 2, + "score": 0.7538673198423436, "filePath": "src/eval/session-logger.ts", "startLine": 58, "endLine": 157, "language": "typescript", "explanation": { - "vectorScore": 0.6525293734589068, - "keywordScore": 0, + "vectorScore": 0.9842362336724392, + "keywordScore": 0.4083139490972, "rawVectorScore": 0.6525293734589068, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "rawKeywordScore": 11.348286077861328, + "keywordWeight": 0.4, + "matchedTerms": [ + "session", + "logger", + "logg", + "event" + ] } }, { - "rank": 2, - "score": 0.6231078176573119, + "rank": 3, + "score": 0.7161146968452294, "filePath": "src/eval/session-logger.ts", "startLine": 158, "endLine": 183, "language": "typescript", "explanation": { - "vectorScore": 0.6231078176573119, - "keywordScore": 0, + "vectorScore": 0.9398585206547908, + "keywordScore": 0.38049896113088744, "rawVectorScore": 0.6231078176573119, - "rawKeywordScore": 0, - "keywordWeight": 0.4 - } - }, - { - "rank": 3, - "score": 0.6197640686054513, - "filePath": "src/eval/session-logger.ts", - "startLine": 26, - "endLine": 40, - "language": "typescript", - "explanation": { - "vectorScore": 0.6197640686054513, - "keywordScore": 0, - "rawVectorScore": 0.6197640686054513, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "rawKeywordScore": 10.575222993947818, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "session", + "logg", + "event" + ] } }, { "rank": 4, - "score": 0.6046078910458497, - "filePath": "src/eval/storage.ts", - "startLine": 26, - "endLine": 35, - "language": "typescript", + "score": 0.7095122353562696, + "filePath": "src/eval/index.ts", + "startLine": 1, + "endLine": 39, + "language": "text", "explanation": { - "vectorScore": 0.6046078910458497, - "keywordScore": 0, - "rawVectorScore": 0.6046078910458497, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.7629374754061313, + "keywordScore": 0.629374375281477, + "rawVectorScore": 0.5058126248385684, + "rawKeywordScore": 17.4922274307832, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "session", + "logger", + "logg", + "events", + "event" + ] } } ], @@ -1972,12 +2612,12 @@ }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 2, + "passedCount": 9, "wouldInject": true }, { @@ -1996,104 +2636,136 @@ "query": "What is the manifest schema version used for?", "queryIndex": 18, "resultCount": 20, - "latencyMs": 143.9, + "latencyMs": 145.5, "topResults": [ { "rank": 0, - "score": 0.49013616945095406, - "filePath": "src/mcp/handlers.ts", - "startLine": 308, - "endLine": 313, + "score": 0.9616757894419025, + "filePath": "src/indexer/pipeline.ts", + "startLine": 253, + "endLine": 352, "language": "typescript", "explanation": { - "vectorScore": 0.49013616945095406, - "keywordScore": 0, - "rawVectorScore": 0.49013616945095406, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9361263157365042, + "keywordScore": 1, + "rawVectorScore": 0.45882936651732453, + "rawKeywordScore": 16.93249521189373, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "manifest", + "schema", + "used", + "for" + ] } }, { "rank": 1, - "score": 0.4898090834781935, - "filePath": "src/core/version-check.ts", - "startLine": 1, - "endLine": 7, + "score": 0.8616391191109055, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.4898090834781935, - "keywordScore": 0, - "rawVectorScore": 0.4898090834781935, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9660387181958, + "keywordScore": 0.7050397204835637, + "rawVectorScore": 0.4734905168777991, + "rawKeywordScore": 11.938081691282836, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "manifest", + "version", + "for" + ] } }, { "rank": 2, - "score": 0.4880516873740033, - "filePath": "src/describer/anthropic.ts", - "startLine": 15, - "endLine": 17, + "score": 0.8587577792559679, + "filePath": "src/indexer/pipeline.ts", + "startLine": 153, + "endLine": 252, "language": "typescript", "explanation": { - "vectorScore": 0.4880516873740033, - "keywordScore": 0, - "rawVectorScore": 0.4880516873740033, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9423419395618554, + "keywordScore": 0.7333815387971365, + "rawVectorScore": 0.46187586856983026, + "rawKeywordScore": 12.41797939417377, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "manifest", + "used", + "for" + ] } }, { "rank": 3, - "score": 0.48674629277419823, - "filePath": "src/indexer/pipeline.ts", - "startLine": 749, - "endLine": 819, + "score": 0.7573188565557513, + "filePath": "src/indexer/stats.ts", + "startLine": 41, + "endLine": 58, "language": "typescript", "explanation": { - "vectorScore": 0.48674629277419823, - "keywordScore": 0, - "rawVectorScore": 0.48674629277419823, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9823707270163011, + "keywordScore": 0.4197410508649265, + "rawVectorScore": 0.4814954251205187, + "rawKeywordScore": 7.107263334005611, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "manifest" + ] } }, { "rank": 4, - "score": 0.48530710226822393, - "filePath": "src/eval/types.ts", - "startLine": 68, - "endLine": 93, + "score": 0.7490145852737878, + "filePath": "src/indexer/pipeline.ts", + "startLine": 749, + "endLine": 819, "language": "typescript", "explanation": { - "vectorScore": 0.48530710226822393, - "keywordScore": 0, - "rawVectorScore": 0.48530710226822393, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9935778842918477, + "keywordScore": 0.38216963674669807, + "rawVectorScore": 0.4869884582579895, + "rawKeywordScore": 6.471085544344631, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "manifest", + "for" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 12, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, @@ -2106,99 +2778,148 @@ "query": "How does the OpenCode plugin register tools?", "queryIndex": 19, "resultCount": 20, - "latencyMs": 149.9, + "latencyMs": 149.7, "topResults": [ { "rank": 0, - "score": 0.6223978580618758, + "score": 0.9315253674592592, "filePath": "src/plugin.ts", - "startLine": 1213, - "endLine": 1312, + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.6223978580618758, - "keywordScore": 0, - "rawVectorScore": 0.6223978580618758, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8858756124320986, + "keywordScore": 1, + "rawVectorScore": 0.5519098459948908, + "rawKeywordScore": 29.273717830672997, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "opencode", + "opencod", + "open", + "code", + "plugin", + "tools" + ] } }, { "rank": 1, - "score": 0.6152836440517907, + "score": 0.8868060625477494, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, + "language": "typescript", + "explanation": { + "vectorScore": 0.9050454687693825, + "keywordScore": 0.8594469532152997, + "rawVectorScore": 0.563852868593524, + "rawKeywordScore": 25.1592075988563, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "opencode", + "opencod", + "open", + "code", + "plugin" + ] + } + }, + { + "rank": 2, + "score": 0.868628490216624, "filePath": "src/plugin.ts", "startLine": 699, "endLine": 798, "language": "typescript", "explanation": { - "vectorScore": 0.6152836440517907, - "keywordScore": 0, - "rawVectorScore": 0.6152836440517907, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.985991616828733, + "keywordScore": 0.6925838002984605, + "rawVectorScore": 0.6142831722189555, + "rawKeywordScore": 20.274502744032308, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "open", + "code", + "plugin", + "register", + "regist", + "tools" + ] } }, { - "rank": 2, - "score": 0.5947045075873209, + "rank": 3, + "score": 0.8179070551290666, "filePath": "src/plugin-entry.ts", "startLine": 1, "endLine": 19, "language": "text", "explanation": { - "vectorScore": 0.5947045075873209, - "keywordScore": 0, + "vectorScore": 0.9545657206483765, + "keywordScore": 0.6129190568501015, "rawVectorScore": 0.5947045075873209, - "rawKeywordScore": 0, - "keywordWeight": 0.4 - } - }, - { - "rank": 3, - "score": 0.5859969796238651, - "filePath": "src/cli/commands/setup.ts", - "startLine": 28, - "endLine": 40, - "language": "typescript", - "explanation": { - "vectorScore": 0.5859969796238651, - "keywordScore": 0, - "rawVectorScore": 0.5859969796238651, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "rawKeywordScore": 17.942419523272093, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "opencode", + "opencod", + "open", + "code", + "plugin", + "register" + ] } }, { "rank": 4, - "score": 0.5650384113063616, - "filePath": "src/plugin.ts", - "startLine": 499, - "endLine": 598, - "language": "typescript", + "score": 0.8040397881739327, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", "explanation": { - "vectorScore": 0.5650384113063616, - "keywordScore": 0, - "rawVectorScore": 0.5650384113063616, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8594768671854647, + "keywordScore": 0.7208841696566349, + "rawVectorScore": 0.535463149394306, + "rawKeywordScore": 21.10295977112733, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "opencode", + "opencod", + "open", + "code", + "plugin", + "register", + "regist" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 9, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 17, + "wouldInject": true }, { "threshold": 0.5, @@ -2216,104 +2937,135 @@ "query": "Where is the globMatch function defined?", "queryIndex": 20, "resultCount": 20, - "latencyMs": 184.8, + "latencyMs": 148.4, "topResults": [ { "rank": 0, - "score": 0.49101113217391773, - "filePath": "src/chunker/ssl.ts", - "startLine": 145, - "endLine": 165, + "score": 0.9631813138976587, + "filePath": "src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, "language": "typescript", "explanation": { - "vectorScore": 0.49101113217391773, - "keywordScore": 0, - "rawVectorScore": 0.49101113217391773, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9386355231627646, + "keywordScore": 1, + "rawVectorScore": 0.4615648809578505, + "rawKeywordScore": 24.972142610413826, + "keywordWeight": 0.4, + "matchedTerms": [ + "where", + "is", + "the", + "match", + "function", + "defined", + "defin" + ] } }, { "rank": 1, - "score": 0.4832034179843825, - "filePath": "src/mcp/handlers.ts", - "startLine": 290, - "endLine": 299, + "score": 0.7894046746053669, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.4832034179843825, - "keywordScore": 0, - "rawVectorScore": 0.4832034179843825, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8966758384097504, + "keywordScore": 0.6284979288987916, + "rawVectorScore": 0.44093161445543244, + "rawKeywordScore": 15.694939910810355, + "keywordWeight": 0.4, + "matchedTerms": [ + "where", + "is", + "the", + "glob", + "function" + ] } }, { "rank": 2, - "score": 0.46767902060794087, + "score": 0.675513523369374, "filePath": "src/opencode/tools.ts", - "startLine": 628, - "endLine": 642, + "startLine": 428, + "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.46767902060794087, - "keywordScore": 0, - "rawVectorScore": 0.46767902060794087, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9159310699268094, + "keywordScore": 0.31488720353322086, + "rawVectorScore": 0.45040018710548546, + "rawKeywordScore": 7.863408152825995, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "match", + "function" + ] } }, { "rank": 3, - "score": 0.4670850304863925, - "filePath": "src/mcp/handlers.ts", - "startLine": 159, - "endLine": 161, + "score": 0.6633902568278196, + "filePath": "src/chunker/ssl.ts", + "startLine": 145, + "endLine": 165, "language": "typescript", "explanation": { - "vectorScore": 0.4670850304863925, - "keywordScore": 0, - "rawVectorScore": 0.4670850304863925, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 1, + "keywordScore": 0.158475642069549, + "rawVectorScore": 0.49174026506326096, + "rawKeywordScore": 3.9574763340376746, + "keywordWeight": 0.4, + "matchedTerms": [ + "match", + "function" + ] } }, { "rank": 4, - "score": 0.4647097165265677, - "filePath": "src/core/provider-defaults.ts", - "startLine": 100, - "endLine": 105, + "score": 0.6595251766089206, + "filePath": "src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.4647097165265677, - "keywordScore": 0, - "rawVectorScore": 0.4647097165265677, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9393796655043976, + "keywordScore": 0.23974344326570535, + "rawVectorScore": 0.46193080571016987, + "rawKeywordScore": 5.98690745514285, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "match", + "function" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, @@ -2326,103 +3078,126 @@ "query": "How does the proxy-aware HTTP client work?", "queryIndex": 21, "resultCount": 20, - "latencyMs": 144.2, + "latencyMs": 127.6, "topResults": [ { "rank": 0, - "score": 0.5466284128362742, - "filePath": "src/embedder/http.ts", - "startLine": 152, - "endLine": 164, + "score": 0.9, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.5466284128362742, - "keywordScore": 0, - "rawVectorScore": 0.5466284128362742, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 15.882014317530581, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "work" + ] } }, { "rank": 1, - "score": 0.5432101659452181, + "score": 0.7526051764821801, "filePath": "src/embedder/http.ts", - "startLine": 484, - "endLine": 501, + "startLine": 152, + "endLine": 164, "language": "typescript", "explanation": { - "vectorScore": 0.5432101659452181, - "keywordScore": 0, - "rawVectorScore": 0.5432101659452181, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 1, + "keywordScore": 0.3815129412054501, + "rawVectorScore": 0.5466284128362742, + "rawKeywordScore": 6.059193994548162, + "keywordWeight": 0.4, + "matchedTerms": [ + "proxy", + "http" + ] } }, { "rank": 2, - "score": 0.5396499104476383, + "score": 0.7483978662031655, "filePath": "src/embedder/http.ts", - "startLine": 143, - "endLine": 149, + "startLine": 484, + "endLine": 501, "language": "typescript", "explanation": { - "vectorScore": 0.5396499104476383, - "keywordScore": 0, - "rawVectorScore": 0.5396499104476383, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9929878162016423, + "keywordScore": 0.3815129412054501, + "rawVectorScore": 0.5427953539360617, + "rawKeywordScore": 6.059193994548162, + "keywordWeight": 0.4, + "matchedTerms": [ + "proxy", + "http" + ] } }, { "rank": 3, - "score": 0.5330086376024127, + "score": 0.7382376299344761, "filePath": "src/embedder/http.ts", "startLine": 504, "endLine": 557, "language": "typescript", "explanation": { - "vectorScore": 0.5330086376024127, - "keywordScore": 0, - "rawVectorScore": 0.5330086376024127, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9760540890871601, + "keywordScore": 0.3815129412054501, + "rawVectorScore": 0.5335388975600697, + "rawKeywordScore": 6.059193994548162, + "keywordWeight": 0.4, + "matchedTerms": [ + "proxy", + "http" + ] } }, { "rank": 4, - "score": 0.5283696555894284, - "filePath": "src/embedder/cohere.ts", - "startLine": 26, - "endLine": 32, + "score": 0.6987287284712385, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.5283696555894284, - "keywordScore": 0, - "rawVectorScore": 0.5283696555894284, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.7763652538569316, + "rawVectorScore": 0, + "rawKeywordScore": 12.330244077389052, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 12, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 10, + "passedCount": 20, "wouldInject": true }, { @@ -2436,104 +3211,128 @@ "query": "What is the FETCH_OVERFETCH_FACTOR constant?", "queryIndex": 22, "resultCount": 20, - "latencyMs": 149.7, + "latencyMs": 142.4, "topResults": [ { "rank": 0, - "score": 0.4972989931018104, - "filePath": "src/core/runtime-overrides.ts", - "startLine": 12, - "endLine": 54, + "score": 0.9548578830224456, + "filePath": "src/eval/token-analysis.ts", + "startLine": 183, + "endLine": 218, "language": "typescript", "explanation": { - "vectorScore": 0.4972989931018104, - "keywordScore": 0, - "rawVectorScore": 0.4972989931018104, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9247631383707425, + "keywordScore": 1, + "rawVectorScore": 0.45988377756944043, + "rawKeywordScore": 9.611335504612896, + "keywordWeight": 0.4, + "matchedTerms": [ + "what", + "h_" + ] } }, { "rank": 1, - "score": 0.4911339418628084, - "filePath": "src/eval/token-analysis.ts", - "startLine": 397, - "endLine": 420, + "score": 0.8689262399273051, + "filePath": "src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.4911339418628084, - "keywordScore": 0, - "rawVectorScore": 0.4911339418628084, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9055598636963311, + "keywordScore": 0.813975804273766, + "rawVectorScore": 0.45033400840959814, + "rawKeywordScore": 7.823394547512285, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "fetch" + ] } }, { "rank": 2, - "score": 0.49003999308105267, - "filePath": "src/chunker/fallback.ts", - "startLine": 15, - "endLine": 17, + "score": 0.8261110837574276, + "filePath": "src/opencode/tools.ts", + "startLine": 334, + "endLine": 415, "language": "typescript", "explanation": { - "vectorScore": 0.49003999308105267, - "keywordScore": 0, - "rawVectorScore": 0.49003999308105267, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.9179012041749195, + "rawVectorScore": 0, + "rawKeywordScore": 8.822256433413335, + "keywordWeight": 0.4, + "matchedTerms": [ + "what", + "is", + "the" + ] } }, { "rank": 3, - "score": 0.4799834020632183, - "filePath": "src/eval/token-analysis.ts", - "startLine": 223, - "endLine": 307, + "score": 0.8261110837574276, + "filePath": "src/plugin.ts", + "startLine": 899, + "endLine": 998, "language": "typescript", "explanation": { - "vectorScore": 0.4799834020632183, - "keywordScore": 0, - "rawVectorScore": 0.4799834020632183, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.9179012041749195, + "rawVectorScore": 0, + "rawKeywordScore": 8.822256433413335, + "keywordWeight": 0.4, + "matchedTerms": [ + "what", + "is", + "the" + ] } }, { "rank": 4, - "score": 0.47937757208172055, - "filePath": "src/web/api.ts", - "startLine": 416, - "endLine": 440, + "score": 0.7325782238463895, + "filePath": "src/opencode/create-read-tool.ts", + "startLine": 42, + "endLine": 141, "language": "typescript", "explanation": { - "vectorScore": 0.47937757208172055, - "keywordScore": 0, - "rawVectorScore": 0.47937757208172055, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 0.813975804273766, + "rawVectorScore": 0, + "rawKeywordScore": 7.823394547512285, + "keywordWeight": 0.4, + "matchedTerms": [ + "is", + "the", + "fetch" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, @@ -2546,103 +3345,132 @@ "query": "How does the TUI settings menu work?", "queryIndex": 23, "resultCount": 20, - "latencyMs": 155.6, + "latencyMs": 129.1, "topResults": [ { "rank": 0, - "score": 0.5701993660084598, - "filePath": "src/tui.ts", - "startLine": 283, - "endLine": 294, - "language": "typescript", - "explanation": { - "vectorScore": 0.5701993660084598, - "keywordScore": 0, - "rawVectorScore": 0.5701993660084598, - "rawKeywordScore": 0, - "keywordWeight": 0.4 - } - }, - { - "rank": 1, - "score": 0.5677701442097971, + "score": 0.9538024928698103, "filePath": "src/tui.ts", "startLine": 608, "endLine": 707, "language": "typescript", "explanation": { - "vectorScore": 0.5677701442097971, - "keywordScore": 0, + "vectorScore": 0.9958570267799823, + "keywordScore": 0.8907206920045524, "rawVectorScore": 0.5677701442097971, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "rawKeywordScore": 17.559910313957428, + "keywordWeight": 0.4, + "matchedTerms": [ + "tui", + "settings", + "setting", + "menu" + ] } }, { - "rank": 2, - "score": 0.5563343170390304, - "filePath": "src/tui.ts", - "startLine": 297, - "endLine": 306, + "rank": 1, + "score": 0.9, + "filePath": "src/plugin.ts", + "startLine": 499, + "endLine": 598, + "language": "typescript", + "explanation": { + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 19.714272354489864, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "does", + "the", + "tui", + "work" + ] + } + }, + { + "rank": 2, + "score": 0.8157691019940978, + "filePath": "src/tui.ts", + "startLine": 427, + "endLine": 526, "language": "typescript", "explanation": { - "vectorScore": 0.5563343170390304, - "keywordScore": 0, - "rawVectorScore": 0.5563343170390304, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9056488891117088, + "keywordScore": 0.6809494213176813, + "rawVectorScore": 0.5163395814327083, + "rawKeywordScore": 13.424422351489037, + "keywordWeight": 0.4, + "matchedTerms": [ + "the", + "tui", + "setting", + "work" + ] } }, { "rank": 3, - "score": 0.531354382301278, + "score": 0.782953135652271, "filePath": "src/tui.ts", - "startLine": 527, - "endLine": 602, + "startLine": 708, + "endLine": 807, "language": "typescript", "explanation": { - "vectorScore": 0.531354382301278, - "keywordScore": 0, - "rawVectorScore": 0.531354382301278, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8407014528560303, + "keywordScore": 0.6963306598466321, + "rawVectorScore": 0.47931095758679737, + "rawKeywordScore": 13.727652276998144, + "keywordWeight": 0.4, + "matchedTerms": [ + "settings", + "setting", + "menu" + ] } }, { "rank": 4, - "score": 0.5163395814327083, + "score": 0.7763895283468751, "filePath": "src/tui.ts", - "startLine": 427, - "endLine": 526, + "startLine": 196, + "endLine": 260, "language": "typescript", "explanation": { - "vectorScore": 0.5163395814327083, - "keywordScore": 0, - "rawVectorScore": 0.5163395814327083, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8760877826210342, + "keywordScore": 0.6268421469356366, + "rawVectorScore": 0.49948584315113903, + "rawKeywordScore": 12.357736807962294, + "keywordWeight": 0.4, + "matchedTerms": [ + "tui", + "settings", + "setting" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 8, + "passedCount": 20, "wouldInject": true }, { @@ -2656,99 +3484,1503 @@ "query": "How are image descriptions generated?", "queryIndex": 24, "resultCount": 20, - "latencyMs": 135.3, + "latencyMs": 143.8, "topResults": [ { "rank": 0, - "score": 0.6276211083278715, - "filePath": "src/chunker/image.ts", - "startLine": 151, - "endLine": 208, + "score": 0.9, + "filePath": "src/indexer/pipeline.ts", + "startLine": 32, + "endLine": 72, "language": "typescript", "explanation": { - "vectorScore": 0.6276211083278715, - "keywordScore": 0, - "rawVectorScore": 0.6276211083278715, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 19.12990274047926, + "keywordWeight": 0.4, + "matchedTerms": [ + "are", + "image", + "descriptions", + "description", + "generated", + "generat" + ] } }, { "rank": 1, - "score": 0.6105379524493967, - "filePath": "src/chunker/image.ts", - "startLine": 231, - "endLine": 292, + "score": 0.9, + "filePath": "src/indexer/pipeline.ts", + "startLine": 153, + "endLine": 252, "language": "typescript", "explanation": { - "vectorScore": 0.6105379524493967, - "keywordScore": 0, - "rawVectorScore": 0.6105379524493967, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 19.12990274047926, + "keywordWeight": 0.4, + "matchedTerms": [ + "are", + "image", + "descriptions", + "description", + "generated", + "generat" + ] } }, { "rank": 2, - "score": 0.6056255124575604, - "filePath": "src/mcp/handlers.ts", - "startLine": 308, - "endLine": 313, + "score": 0.8685222650210481, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.6056255124575604, - "keywordScore": 0, - "rawVectorScore": 0.6056255124575604, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.8397807930365859, + "keywordScore": 0.9116344729977415, + "rawVectorScore": 0.5267437286451684, + "rawKeywordScore": 17.43947880331486, + "keywordWeight": 0.4, + "matchedTerms": [ + "how", + "image", + "description", + "generated", + "generat" + ] } }, { "rank": 3, - "score": 0.5974183115666772, + "score": 0.8189121305411503, "filePath": "src/opencode/tools.ts", "startLine": 334, "endLine": 415, "language": "typescript", "explanation": { - "vectorScore": 0.5974183115666772, - "keywordScore": 0, + "vectorScore": 0.9524563771313621, + "keywordScore": 0.6185957606558325, "rawVectorScore": 0.5974183115666772, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "rawKeywordScore": 11.833676737018862, + "keywordWeight": 0.4, + "matchedTerms": [ + "image", + "description", + "generated", + "generat" + ] } }, { "rank": 4, - "score": 0.5939281969631285, + "score": 0.800242351753632, "filePath": "src/indexer/description-stage.ts", "startLine": 32, "endLine": 119, "language": "typescript", "explanation": { - "vectorScore": 0.5939281969631285, - "keywordScore": 0, - "rawVectorScore": 0.5939281969631285, - "rawKeywordScore": 0, - "keywordWeight": 0.4 + "vectorScore": 0.9473960838540622, + "keywordScore": 0.5795117536029868, + "rawVectorScore": 0.5942442954769726, + "rawKeywordScore": 11.08600348338972, + "keywordWeight": 0.4, + "matchedTerms": [ + "image", + "descriptions", + "description", + "generat" + ] } } ], "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 15, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "retrieve function", + "queryIndex": 25, + "resultCount": 20, + "latencyMs": 133.7, + "topResults": [ + { + "rank": 0, + "score": 1, + "filePath": "src/plugin.ts", + "startLine": 343, + "endLine": 367, + "language": "typescript", + "explanation": { + "vectorScore": 1, + "keywordScore": 1, + "rawVectorScore": 0.5246996104475332, + "rawKeywordScore": 7.606676678864138, + "keywordWeight": 0.4, + "matchedTerms": [ + "retrieve", + "retriev", + "function" + ] + } + }, + { + "rank": 1, + "score": 0.9941849960759197, + "filePath": "src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.9903083267931995, + "keywordScore": 1, + "rawVectorScore": 0.5196143932913402, + "rawKeywordScore": 7.606676678864138, + "keywordWeight": 0.4, + "matchedTerms": [ + "retrieve", + "retriev", + "function" + ] + } + }, + { + "rank": 2, + "score": 0.9448813001304481, + "filePath": "src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.9081355002174136, + "keywordScore": 1, + "rawVectorScore": 0.47649834319765266, + "rawKeywordScore": 7.606676678864138, + "keywordWeight": 0.4, + "matchedTerms": [ + "retrieve", + "retriev", + "function" + ] + } + }, + { + "rank": 3, + "score": 0.9425550684563322, + "filePath": "src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, + "language": "typescript", + "explanation": { + "vectorScore": 0.9042584474272203, + "keywordScore": 1, + "rawVectorScore": 0.4744640551089537, + "rawKeywordScore": 7.606676678864138, + "keywordWeight": 0.4, + "matchedTerms": [ + "retrieve", + "retriev", + "function" + ] + } + }, + { + "rank": 4, + "score": 0.9358091229777644, + "filePath": "src/plugin.ts", + "startLine": 799, + "endLine": 898, + "language": "typescript", + "explanation": { + "vectorScore": 0.8930152049629407, + "keywordScore": 1, + "rawVectorScore": 0.46856473016777905, + "rawKeywordScore": 7.606676678864138, + "keywordWeight": 0.4, + "matchedTerms": [ + "retrieve", + "retriev", + "function" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 18, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 19, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 19, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "KeywordIndex class", + "queryIndex": 26, + "resultCount": 20, + "latencyMs": 137.7, + "topResults": [ + { + "rank": 0, + "score": 0.914294205642164, + "filePath": "src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, + "language": "typescript", + "explanation": { + "vectorScore": 0.8571570094036067, + "keywordScore": 1, + "rawVectorScore": 0.4787006763753458, + "rawKeywordScore": 9.758726665703923, + "keywordWeight": 0.4, + "matchedTerms": [ + "keywordindex", + "keyword", + "index", + "class" + ] + } + }, + { + "rank": 1, + "score": 0.9, + "filePath": "src/mcp/server.ts", + "startLine": 41, + "endLine": 140, + "language": "typescript", + "explanation": { + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 9.758726665703923, + "keywordWeight": 0.4, + "matchedTerms": [ + "keywordindex", + "keyword", + "index", + "class" + ] + } + }, + { + "rank": 2, + "score": 0.9, + "filePath": "src/plugin.ts", + "startLine": 699, + "endLine": 798, + "language": "typescript", + "explanation": { + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 9.758726665703923, + "keywordWeight": 0.4, + "matchedTerms": [ + "keywordindex", + "keyword", + "index", + "class" + ] + } + }, + { + "rank": 3, + "score": 0.8912517679248515, + "filePath": "src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, + "language": "typescript", + "explanation": { + "vectorScore": 0.8187529465414193, + "keywordScore": 1, + "rawVectorScore": 0.45725297115214325, + "rawKeywordScore": 9.758726665703923, + "keywordWeight": 0.4, + "matchedTerms": [ + "keywordindex", + "keyword", + "index", + "class" + ] + } + }, + { + "rank": 4, + "score": 0.8882869850882339, + "filePath": "src/plugin.ts", + "startLine": 1044, + "endLine": 1061, + "language": "typescript", + "explanation": { + "vectorScore": 1, + "keywordScore": 0.7207174627205848, + "rawVectorScore": 0.5584749014750711, + "rawKeywordScore": 7.033284721889844, + "keywordWeight": 0.4, + "matchedTerms": [ + "keywordindex", + "keyword", + "index" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 6, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 18, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "embedder factory", + "queryIndex": 27, + "resultCount": 20, + "latencyMs": 138.7, + "topResults": [ + { + "rank": 0, + "score": 0.9, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", + "explanation": { + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 10.266062163238725, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedder", + "embedd", + "factory" + ] + } + }, + { + "rank": 1, + "score": 0.8569397435158297, + "filePath": "src/indexer/worker.ts", + "startLine": 388, + "endLine": 436, + "language": "typescript", + "explanation": { + "vectorScore": 0.7615662391930494, + "keywordScore": 1, + "rawVectorScore": 0.46191709563529343, + "rawKeywordScore": 10.266062163238725, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedder", + "embedd", + "factory" + ] + } + }, + { + "rank": 2, + "score": 0.797305980685628, + "filePath": "src/embedder/factory.ts", + "startLine": 23, + "endLine": 46, + "language": "typescript", + "explanation": { + "vectorScore": 1, + "keywordScore": 0.49326495171407003, + "rawVectorScore": 0.6065356785310464, + "rawKeywordScore": 5.0638886572435915, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedder", + "embedd" + ] + } + }, + { + "rank": 3, + "score": 0.7129127235865278, + "filePath": "src/embedder/factory.ts", + "startLine": 62, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.8593445715014998, + "keywordScore": 0.49326495171407003, + "rawVectorScore": 0.5212231427676335, + "rawKeywordScore": 5.0638886572435915, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedder", + "embedd" + ] + } + }, + { + "rank": 4, + "score": 0.7076537488628087, + "filePath": "src/core/bootstrap.ts", + "startLine": 56, + "endLine": 66, + "language": "typescript", + "explanation": { + "vectorScore": 0.8505796136286347, + "keywordScore": 0.49326495171407003, + "rawVectorScore": 0.5159068830969192, + "rawKeywordScore": 5.0638886572435915, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedder", + "embedd" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 2, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 3, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 10, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "vector store LanceDB", + "queryIndex": 28, + "resultCount": 20, + "latencyMs": 140, + "topResults": [ + { + "rank": 0, + "score": 1, + "filePath": "src/vectorstore/factory.ts", + "startLine": 22, + "endLine": 38, + "language": "typescript", + "explanation": { + "vectorScore": 1, + "keywordScore": 1, + "rawVectorScore": 0.6107424489623263, + "rawKeywordScore": 14.404583382084791, + "keywordWeight": 0.4, + "matchedTerms": [ + "vector", + "store", + "lancedb", + "lance" + ] + } + }, + { + "rank": 1, + "score": 0.8589624938286113, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", + "explanation": { + "vectorScore": 0.7649374897143522, + "keywordScore": 1, + "rawVectorScore": 0.46717979577123775, + "rawKeywordScore": 14.404583382084791, + "keywordWeight": 0.4, + "matchedTerms": [ + "vector", + "store", + "lancedb", + "lance" + ] + } + }, + { + "rank": 2, + "score": 0.7286472776421293, + "filePath": "src/web/server.ts", + "startLine": 70, + "endLine": 121, + "language": "typescript", + "explanation": { + "vectorScore": 0.8071907572240995, + "keywordScore": 0.6108320582691741, + "rawVectorScore": 0.49298565984680115, + "rawKeywordScore": 8.798781315788794, + "keywordWeight": 0.4, + "matchedTerms": [ + "vector", + "store", + "lance" + ] + } + }, + { + "rank": 3, + "score": 0.7109057877464771, + "filePath": "src/web/api.ts", + "startLine": 165, + "endLine": 186, + "language": "typescript", + "explanation": { + "vectorScore": 0.9098879564030676, + "keywordScore": 0.4124325347615912, + "rawVectorScore": 0.5557071987749359, + "rawKeywordScore": 5.940918836457924, + "keywordWeight": 0.4, + "matchedTerms": [ + "store", + "lance" + ] + } + }, + { + "rank": 4, + "score": 0.7065442294147142, + "filePath": "src/web/api.ts", + "startLine": 189, + "endLine": 192, + "language": "typescript", + "explanation": { + "vectorScore": 0.9026186925167963, + "keywordScore": 0.4124325347615912, + "rawVectorScore": 0.5512675507468812, + "rawKeywordScore": 5.940918836457924, + "keywordWeight": 0.4, + "matchedTerms": [ + "store", + "lance" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 2, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 2, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 9, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "find usages SearchResult", + "queryIndex": 29, + "resultCount": 20, + "latencyMs": 158.5, + "topResults": [ + { + "rank": 0, + "score": 1, + "filePath": "src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, + "language": "typescript", + "explanation": { + "vectorScore": 1, + "keywordScore": 1, + "rawVectorScore": 0.6141186463999263, + "rawKeywordScore": 17.003368879563602, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "searchresult", + "search", + "result" + ] + } + }, + { + "rank": 1, + "score": 0.9681490655655871, + "filePath": "src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, + "language": "typescript", + "explanation": { + "vectorScore": 0.9469151092759784, + "keywordScore": 1, + "rawVectorScore": 0.5815182251642022, + "rawKeywordScore": 17.003368879563602, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "searchresult", + "search", + "result" + ] + } + }, + { + "rank": 2, + "score": 0.9476248229319791, + "filePath": "src/plugin.ts", + "startLine": 412, + "endLine": 448, + "language": "typescript", + "explanation": { + "vectorScore": 0.9127080382199653, + "keywordScore": 1, + "rawVectorScore": 0.5605110249899773, + "rawKeywordScore": 17.003368879563602, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "searchresult", + "search", + "result" + ] + } + }, + { + "rank": 3, + "score": 0.9089417359768903, + "filePath": "src/mcp/handlers.ts", + "startLine": 280, + "endLine": 287, + "language": "typescript", + "explanation": { + "vectorScore": 0.9737537652560392, + "keywordScore": 0.8117236920581673, + "rawVectorScore": 0.5980003442458703, + "rawKeywordScore": 13.802037364346312, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "search", + "result" + ] + } + }, + { + "rank": 4, + "score": 0.8950049164809308, + "filePath": "src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, + "language": "typescript", + "explanation": { + "vectorScore": 0.9505257327627733, + "keywordScore": 0.8117236920581673, + "rawVectorScore": 0.5837355763725725, + "rawKeywordScore": 13.802037364346312, + "keywordWeight": 0.4, + "matchedTerms": [ + "find", + "usages", + "usage", + "search", + "result" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 6, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 11, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "chunkFile method", + "queryIndex": 30, + "resultCount": 20, + "latencyMs": 140.5, + "topResults": [ + { + "rank": 0, + "score": 0.9500568670598307, + "filePath": "src/chunker/factory.ts", + "startLine": 232, + "endLine": 256, + "language": "typescript", + "explanation": { + "vectorScore": 0.9167614450997179, + "keywordScore": 1, + "rawVectorScore": 0.5476871102549786, + "rawKeywordScore": 13.080329580273405, + "keywordWeight": 0.4, + "matchedTerms": [ + "chunkfile", + "chunkfil", + "chunk", + "file" + ] + } + }, + { + "rank": 1, + "score": 0.9262324191088813, + "filePath": "src/indexer/worker.ts", + "startLine": 148, + "endLine": 247, + "language": "typescript", + "explanation": { + "vectorScore": 0.8770540318481356, + "keywordScore": 1, + "rawVectorScore": 0.5239653028690955, + "rawKeywordScore": 13.080329580273405, + "keywordWeight": 0.4, + "matchedTerms": [ + "chunkfile", + "chunkfil", + "chunk", + "file" + ] + } + }, + { + "rank": 2, + "score": 0.9, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", + "explanation": { + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 13.080329580273405, + "keywordWeight": 0.4, + "matchedTerms": [ + "chunkfile", + "chunkfil", + "chunk", + "file" + ] + } + }, + { + "rank": 3, + "score": 0.7077622265178538, + "filePath": "src/chunker/loader.ts", + "startLine": 19, + "endLine": 43, + "language": "typescript", + "explanation": { + "vectorScore": 0.8778786750581362, + "keywordScore": 0.4525875537074304, + "rawVectorScore": 0.5244579571567412, + "rawKeywordScore": 5.9199943664228805, + "keywordWeight": 0.4, + "matchedTerms": [ + "chunk", + "file", + "method" + ] + } + }, + { + "rank": 4, + "score": 0.6818322673556733, + "filePath": "src/chunker/docx.ts", + "startLine": 39, + "endLine": 108, + "language": "typescript", + "explanation": { + "vectorScore": 1, + "keywordScore": 0.2045806683891832, + "rawVectorScore": 0.5974150780254569, + "rawKeywordScore": 2.6759825682831373, + "keywordWeight": 0.4, + "matchedTerms": [ + "chunk", + "file" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 3, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 3, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 8, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "embedBatch function", + "queryIndex": 31, + "resultCount": 20, + "latencyMs": 142.2, + "topResults": [ + { + "rank": 0, + "score": 1, + "filePath": "src/embedder/factory.ts", + "startLine": 62, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 1, + "keywordScore": 1, + "rawVectorScore": 0.6198135019702848, + "rawKeywordScore": 12.716554521182438, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedbatch", + "embed", + "batch", + "function" + ] + } + }, + { + "rank": 1, + "score": 0.9, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", + "explanation": { + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 12.716554521182438, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedbatch", + "embed", + "batch", + "function" + ] + } + }, + { + "rank": 2, + "score": 0.8608235663450388, + "filePath": "src/indexer/worker.ts", + "startLine": 388, + "endLine": 436, + "language": "typescript", + "explanation": { + "vectorScore": 0.7680392772417312, + "keywordScore": 1, + "rawVectorScore": 0.4760411140779239, + "rawKeywordScore": 12.716554521182438, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedbatch", + "embed", + "batch", + "function" + ] + } + }, + { + "rank": 3, + "score": 0.8345009576436294, + "filePath": "src/indexer/pipeline.ts", + "startLine": 553, + "endLine": 652, + "language": "typescript", + "explanation": { + "vectorScore": 0.7754076637233557, + "keywordScore": 0.92314089852404, + "rawVectorScore": 0.48060813950697007, + "rawKeywordScore": 11.7391715668143, + "keywordWeight": 0.4, + "matchedTerms": [ + "embedbatch", + "embed", + "batch" + ] + } + }, + { + "rank": 4, + "score": 0.7081870475885089, + "filePath": "src/indexer/pipeline.ts", + "startLine": 453, + "endLine": 552, + "language": "typescript", + "explanation": { + "vectorScore": 0.7713838982390567, + "keywordScore": 0.6133917716126873, + "rawVectorScore": 0.47811415533103957, + "rawKeywordScore": 7.8002299065574245, + "keywordWeight": 0.4, + "matchedTerms": [ + "embed", + "batch", + "function" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 3, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 4, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 7, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "retriever retrieve vector search", + "queryIndex": 32, + "resultCount": 20, + "latencyMs": 133.4, + "topResults": [ + { + "rank": 0, + "score": 0.872244005896184, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", + "explanation": { + "vectorScore": 0.7870733431603066, + "keywordScore": 1, + "rawVectorScore": 0.47721793688288794, + "rawKeywordScore": 17.384001602676744, + "keywordWeight": 0.4, + "matchedTerms": [ + "retriever", + "retriev", + "retrieve", + "vector", + "search" + ] + } + }, + { + "rank": 1, + "score": 0.8710123895655224, + "filePath": "src/plugin.ts", + "startLine": 343, + "endLine": 367, + "language": "typescript", + "explanation": { + "vectorScore": 1, + "keywordScore": 0.6775309739138062, + "rawVectorScore": 0.6063195266742644, + "rawKeywordScore": 11.778199536380743, + "keywordWeight": 0.4, + "matchedTerms": [ + "retriev", + "retrieve", + "vector", + "search" + ] + } + }, + { + "rank": 2, + "score": 0.8666415925740285, + "filePath": "src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.9927153383475101, + "keywordScore": 0.6775309739138062, + "rawVectorScore": 0.6019026940691445, + "rawKeywordScore": 11.778199536380743, + "keywordWeight": 0.4, + "matchedTerms": [ + "retriev", + "retrieve", + "vector", + "search" + ] + } + }, + { + "rank": 3, + "score": 0.813961496472041, + "filePath": "src/mcp/handlers.ts", + "startLine": 184, + "endLine": 236, + "language": "typescript", + "explanation": { + "vectorScore": 0.9049151781775309, + "keywordScore": 0.6775309739138062, + "rawVectorScore": 0.5486677425129581, + "rawKeywordScore": 11.778199536380743, + "keywordWeight": 0.4, + "matchedTerms": [ + "retriev", + "retrieve", + "vector", + "search" + ] + } + }, + { + "rank": 4, + "score": 0.7841628992511804, + "filePath": "src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.8552508494760965, + "keywordScore": 0.6775309739138062, + "rawVectorScore": 0.5185552902421093, + "rawKeywordScore": 11.778199536380743, + "keywordWeight": 0.4, + "matchedTerms": [ + "retriev", + "retrieve", + "vector", + "search" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 3, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 8, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 12, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "session logger token", + "queryIndex": 33, + "resultCount": 20, + "latencyMs": 160.4, + "topResults": [ + { + "rank": 0, + "score": 0.9902712151209971, + "filePath": "src/eval/session-logger.ts", + "startLine": 43, + "endLine": 52, + "language": "typescript", + "explanation": { + "vectorScore": 0.9837853585349952, + "keywordScore": 1, + "rawVectorScore": 0.5556086308352892, + "rawKeywordScore": 10.552134307163826, + "keywordWeight": 0.4, + "matchedTerms": [ + "session", + "logger", + "logg", + "token" + ] + } + }, + { + "rank": 1, + "score": 0.9464133693307005, + "filePath": "src/eval/session-logger.ts", + "startLine": 58, + "endLine": 157, + "language": "typescript", + "explanation": { + "vectorScore": 0.9106889488845009, + "keywordScore": 1, + "rawVectorScore": 0.5143262558410472, + "rawKeywordScore": 10.552134307163826, + "keywordWeight": 0.4, + "matchedTerms": [ + "session", + "logger", + "logg", + "token" + ] + } + }, + { + "rank": 2, + "score": 0.9388766964334574, + "filePath": "src/eval/index.ts", + "startLine": 1, + "endLine": 39, + "language": "text", + "explanation": { + "vectorScore": 0.8981278273890957, + "keywordScore": 1, + "rawVectorScore": 0.5072321601063732, + "rawKeywordScore": 10.552134307163826, + "keywordWeight": 0.4, + "matchedTerms": [ + "session", + "logger", + "logg", + "token" + ] + } + }, + { + "rank": 3, + "score": 0.8523982312691667, + "filePath": "src/eval/session-logger.ts", + "startLine": 158, + "endLine": 183, + "language": "typescript", + "explanation": { + "vectorScore": 0.9310540735316989, + "keywordScore": 0.7344144678753682, + "rawVectorScore": 0.5258277880846958, + "rawKeywordScore": 7.749640102145139, + "keywordWeight": 0.4, + "matchedTerms": [ + "session", + "logg", + "token" + ] + } + }, + { + "rank": 4, + "score": 0.811573796919766, + "filePath": "src/cli/commands/eval.ts", + "startLine": 22, + "endLine": 61, + "language": "typescript", + "explanation": { + "vectorScore": 0.8630133496160314, + "keywordScore": 0.7344144678753682, + "rawVectorScore": 0.487400693060511, + "rawKeywordScore": 7.749640102145139, + "keywordWeight": 0.4, + "matchedTerms": [ + "session", + "logg", + "token" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 4, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 11, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.5, + "passedCount": 20, + "wouldInject": true + }, + { + "threshold": 0.35, + "passedCount": 20, + "wouldInject": true + } + ] + }, + { + "query": "config validation", + "queryIndex": 34, + "resultCount": 20, + "latencyMs": 147.1, + "topResults": [ + { + "rank": 0, + "score": 0.9, + "filePath": "src/index.ts", + "startLine": 1, + "endLine": 42, + "language": "text", + "explanation": { + "vectorScore": 0, + "keywordScore": 1, + "rawVectorScore": 0, + "rawKeywordScore": 7.971585628547258, + "keywordWeight": 0.4, + "matchedTerms": [ + "config", + "validation" + ] + } + }, + { + "rank": 1, + "score": 0.6214729258197464, + "filePath": "src/embedder/health.ts", + "startLine": 64, + "endLine": 86, + "language": "typescript", + "explanation": { + "vectorScore": 0.8957511341298345, + "keywordScore": 0.21005561335461428, + "rawVectorScore": 0.45396624528289226, + "rawKeywordScore": 1.6744763086133228, + "keywordWeight": 0.4, + "matchedTerms": [ + "config" + ] + } + }, + { + "rank": 2, + "score": 0.6158289803966197, + "filePath": "src/core/resolve-api-key.ts", + "startLine": 12, + "endLine": 23, + "language": "typescript", + "explanation": { + "vectorScore": 0.8863445584246232, + "keywordScore": 0.21005561335461428, + "rawVectorScore": 0.4491989972257493, + "rawKeywordScore": 1.6744763086133228, + "keywordWeight": 0.4, + "matchedTerms": [ + "config" + ] + } + }, + { + "rank": 3, + "score": 0.6140378715926662, + "filePath": "src/embedder/health.ts", + "startLine": 26, + "endLine": 42, + "language": "typescript", + "explanation": { + "vectorScore": 0.8833593770847009, + "keywordScore": 0.21005561335461428, + "rawVectorScore": 0.44768610875400927, + "rawKeywordScore": 1.6744763086133228, + "keywordWeight": 0.4, + "matchedTerms": [ + "config" + ] + } + }, + { + "rank": 4, + "score": 0.6134040328396435, + "filePath": "src/describer/describer.ts", + "startLine": 35, + "endLine": 37, + "language": "typescript", + "explanation": { + "vectorScore": 0.8823029791629965, + "keywordScore": 0.21005561335461428, + "rawVectorScore": 0.4471507267938104, + "rawKeywordScore": 1.6744763086133228, + "keywordWeight": 0.4, + "matchedTerms": [ + "config" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 1, + "wouldInject": true + }, + { + "threshold": 0.75, + "passedCount": 1, + "wouldInject": true + }, + { + "threshold": 0.65, + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.5, diff --git a/doc/eval-results-t1-cosine-l2.json b/doc/eval-results-t1-cosine-l2.json index fd352ca..9f50e3f 100644 --- a/doc/eval-results-t1-cosine-l2.json +++ b/doc/eval-results-t1-cosine-l2.json @@ -1,12 +1,12 @@ { "branch": "t1-cosine-l2", - "commit": "e922a0b", - "timestamp": "2026-07-06T08:42:12.243Z", + "commit": "2fd954d", + "timestamp": "2026-07-06T09:23:48.604Z", "config": { "embeddingProvider": "ollama", "embeddingModel": "qwen3-embedding:0.6b", "topK": 20, - "minScore": 0.5, + "minScore": 0.35, "hybridEnabled": true, "keywordWeight": 0.4 }, @@ -16,86 +16,120 @@ "query": "How does the retrieval pipeline work end-to-end?", "queryIndex": 0, "resultCount": 20, - "latencyMs": 238.7, + "latencyMs": 261.6, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 343, - "endLine": 367, + "score": 0.01510907003444317, + "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8168614208698273, - "rawKeywordScore": 0, + "vectorScore": 0.008955223880597015, + "keywordScore": 0.006153846153846154, + "rawVectorScore": 0.7622430622577667, + "rawKeywordScore": 8.513966001470433, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 6, + "keywordRank": 4, + "matchedTerms": [ + "the", + "retrieval", + "end", + "to" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.015044858523119393, "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 321, - "endLine": 336, + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.806094765663147, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.006349206349206349, + "rawVectorScore": 0.7566157877445221, + "rawKeywordScore": 13.679000519189877, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 8, + "keywordRank": 2, + "matchedTerms": [ + "how", + "does", + "the", + "to" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/opencode/read-fallback.ts", - "startLine": 10, - "endLine": 17, + "score": 0.014973262032085561, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 599, + "endLine": 698, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7875233888626099, - "rawKeywordScore": 0, + "vectorScore": 0.00909090909090909, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.7749603688716888, + "rawKeywordScore": 8.513966001470433, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 5, + "keywordRank": 7, + "matchedTerms": [ + "the", + "retrieval", + "end", + "to" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 301, - "endLine": 315, + "score": 0.014060606060606062, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 184, + "endLine": 236, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7825891375541687, - "rawKeywordScore": 0, + "vectorScore": 0.008, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.7528767585754395, + "rawKeywordScore": 8.513966001470433, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 14, + "keywordRank": 5, + "matchedTerms": [ + "the", + "retrieval", + "end", + "to" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.013936651583710408, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 71, "endLine": 80, "language": "typescript", "explanation": { "vectorScore": 0.00923076923076923, - "keywordScore": 0, + "keywordScore": 0.004705882352941177, "rawVectorScore": 0.7752973139286041, - "rawKeywordScore": 0, + "rawKeywordScore": 6.358280942575536, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 4, + "keywordRank": 24, + "matchedTerms": [ + "the", + "retrieval", + "to" + ] } } ], @@ -131,86 +165,121 @@ "query": "How does the plugin interact with chat messages?", "queryIndex": 1, "resultCount": 20, - "latencyMs": 135.7, + "latencyMs": 141, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.01608118657298985, "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 460, - "endLine": 484, + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.7840714454650879, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.7745556533336639, + "rawKeywordScore": 22.625276878585613, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 2, + "keywordRank": 0, + "matchedTerms": [ + "how", + "does", + "the", + "plugin", + "with", + "chat", + "message" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.0151131221719457, "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", - "startLine": 10, - "endLine": 13, + "startLine": 39, + "endLine": 45, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7757869064807892, - "rawKeywordScore": 0, + "vectorScore": 0.00923076923076923, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.7691803574562073, + "rawKeywordScore": 8.742760625364115, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 4, + "keywordRank": 7, + "matchedTerms": [ + "chat", + "messages", + "message" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.01510907003444317, "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 799, - "endLine": 898, + "startLine": 699, + "endLine": 798, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7745556533336639, - "rawKeywordScore": 0, + "vectorScore": 0.008955223880597015, + "keywordScore": 0.006153846153846154, + "rawVectorScore": 0.7685944736003876, + "rawKeywordScore": 9.987977277632007, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 6, + "keywordRank": 4, + "matchedTerms": [ + "the", + "plugin", + "chat", + "message" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/describer/describer.ts", - "startLine": 15, - "endLine": 18, + "score": 0.014570361145703611, + "filePath": "../OpenCodeRAG-main/src/types/opencode-plugin.d.ts", + "startLine": 25, + "endLine": 53, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7724447548389435, - "rawKeywordScore": 0, + "vectorScore": 0.00909090909090909, + "keywordScore": 0.005479452054794521, + "rawVectorScore": 0.7691034972667694, + "rawKeywordScore": 8.742760625364115, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 5, + "keywordRank": 12, + "matchedTerms": [ + "chat", + "messages", + "message" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/types/opencode-plugin.d.ts", - "startLine": 25, - "endLine": 53, + "score": 0.014409937888198759, + "filePath": "../OpenCodeRAG-main/src/describer/describer.ts", + "startLine": 40, + "endLine": 47, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7691034972667694, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.005714285714285714, + "rawVectorScore": 0.7650110423564911, + "rawKeywordScore": 8.742760625364115, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 8, + "keywordRank": 9, + "matchedTerms": [ + "chat", + "messages", + "message" + ] } } ], @@ -246,86 +315,125 @@ "query": "How does the keyword index combine with vector search?", "queryIndex": 2, "resultCount": 20, - "latencyMs": 146.7, + "latencyMs": 134.4, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 321, - "endLine": 336, + "score": 0.01555977229601518, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 184, + "endLine": 236, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8030349910259247, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.7983307838439941, + "rawKeywordScore": 11.486179711065684, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 1, + "keywordRank": 7, + "matchedTerms": [ + "the", + "keyword", + "index", + "vector", + "search" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", - "startLine": 184, - "endLine": 236, + "score": 0.014964270701975618, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 321, + "endLine": 336, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7983307838439941, - "rawKeywordScore": 0, + "vectorScore": 0.009836065573770491, + "keywordScore": 0.005128205128205128, + "rawVectorScore": 0.8030349910259247, + "rawKeywordScore": 9.45674858996051, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 0, + "keywordRank": 17, + "matchedTerms": [ + "keyword", + "index", + "vector", + "search" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/web/api.ts", - "startLine": 245, - "endLine": 275, + "score": 0.014945652173913044, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7938066124916077, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.00625, + "rawVectorScore": 0.7647458612918854, + "rawKeywordScore": 13.82266635573541, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 8, + "keywordRank": 3, + "matchedTerms": [ + "the", + "keyword", + "index", + "with", + "vector", + "search" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 343, - "endLine": 367, + "score": 0.014884135472370767, + "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7928096354007721, - "rawKeywordScore": 0, + "vectorScore": 0.008823529411764706, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.7698828876018524, + "rawKeywordScore": 11.486179711065684, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 7, + "keywordRank": 5, + "matchedTerms": [ + "the", + "keyword", + "index", + "vector", + "search" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.014438291139240507, "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 1044, - "endLine": 1061, + "startLine": 343, + "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7910011410713196, - "rawKeywordScore": 0, + "vectorScore": 0.009375, + "keywordScore": 0.005063291139240506, + "rawVectorScore": 0.7926949858665466, + "rawKeywordScore": 9.45674858996051, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 3, + "keywordRank": 18, + "matchedTerms": [ + "keyword", + "index", + "vector", + "search" + ] } } ], @@ -361,86 +469,114 @@ "query": "Where is the embedder factory defined?", "queryIndex": 3, "resultCount": 20, - "latencyMs": 135.4, + "latencyMs": 149.7, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.014381520119225038, "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", "startLine": 23, "endLine": 46, "language": "typescript", "explanation": { "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8202718496322632, - "rawKeywordScore": 0, + "keywordScore": 0.004545454545454546, + "rawVectorScore": 0.821034848690033, + "rawKeywordScore": 6.940389354926737, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 0, + "keywordRank": 27, + "matchedTerms": [ + "is", + "embedder", + "embedd" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.013844086021505376, "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", "startLine": 56, "endLine": 66, "language": "typescript", "explanation": { "vectorScore": 0.00967741935483871, - "keywordScore": 0, + "keywordScore": 0.004166666666666667, "rawVectorScore": 0.7910988032817841, - "rawKeywordScore": 0, + "rawKeywordScore": 5.0638886572435915, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 1, + "keywordRank": 35, + "matchedTerms": [ + "embedder", + "embedd" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.013605442176870748, "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", "startLine": 62, "endLine": 101, "language": "typescript", "explanation": { "vectorScore": 0.009523809523809523, - "keywordScore": 0, + "keywordScore": 0.004081632653061225, "rawVectorScore": 0.7568196654319763, - "rawKeywordScore": 0, + "rawKeywordScore": 5.0638886572435915, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 2, + "keywordRank": 37, + "matchedTerms": [ + "embedder", + "embedd" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", - "startLine": 45, - "endLine": 61, + "score": 0.013567073170731707, + "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", + "startLine": 388, + "endLine": 436, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7538323998451233, - "rawKeywordScore": 0, + "vectorScore": 0.007317073170731707, + "keywordScore": 0.00625, + "rawVectorScore": 0.7243208289146423, + "rawKeywordScore": 12.14256286092187, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 21, + "keywordRank": 3, + "matchedTerms": [ + "is", + "embedder", + "embedd", + "factory" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.012914823008849557, "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", - "startLine": 397, - "endLine": 404, + "startLine": 45, + "endLine": 61, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7512085735797882, - "rawKeywordScore": 0, + "vectorScore": 0.009375, + "keywordScore": 0.003539823008849558, + "rawVectorScore": 0.7546127438545227, + "rawKeywordScore": 4.110642218847007, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 3, + "keywordRank": 52, + "matchedTerms": [ + "is", + "embedd" + ] } } ], @@ -476,86 +612,112 @@ "query": "Where is the LanceDB store implementation?", "queryIndex": 4, "resultCount": 20, - "latencyMs": 131.3, + "latencyMs": 142.5, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/web/api.ts", - "startLine": 165, - "endLine": 186, + "score": 0.015873015873015872, + "filePath": "../OpenCodeRAG-main/src/vectorstore/factory.ts", + "startLine": 22, + "endLine": 38, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.813552737236023, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.006349206349206349, + "rawVectorScore": 0.799913078546524, + "rawKeywordScore": 11.546720902753922, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 2, + "keywordRank": 2, + "matchedTerms": [ + "lancedb", + "lance", + "store" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.015633167023045853, "filePath": "../OpenCodeRAG-main/src/web/api.ts", - "startLine": 189, - "endLine": 192, + "startLine": 165, + "endLine": 186, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.80718132853508, - "rawKeywordScore": 0, + "vectorScore": 0.009836065573770491, + "keywordScore": 0.005797101449275362, + "rawVectorScore": 0.8130159378051758, + "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 0, + "keywordRank": 8, + "matchedTerms": [ + "lance", + "store" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/vectorstore/factory.ts", - "startLine": 22, - "endLine": 38, + "score": 0.015391705069124424, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 189, + "endLine": 192, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.799913078546524, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.005714285714285714, + "rawVectorScore": 0.8067699372768402, + "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 1, + "keywordRank": 9, + "matchedTerms": [ + "lance", + "store" + ] } }, { "rank": 3, - "score": 0.009375, + "score": 0.014930555555555555, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 230, "endLine": 242, "language": "typescript", "explanation": { "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7791714370250702, - "rawKeywordScore": 0, + "keywordScore": 0.005555555555555556, + "rawVectorScore": 0.7796101272106171, + "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 3, + "keywordRank": 11, + "matchedTerms": [ + "lance", + "store" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.014864572047670638, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 199, "endLine": 227, "language": "typescript", "explanation": { "vectorScore": 0.00923076923076923, - "keywordScore": 0, + "keywordScore": 0.005633802816901409, "rawVectorScore": 0.7714079320430756, - "rawKeywordScore": 0, + "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 4, + "keywordRank": 10, + "matchedTerms": [ + "lance", + "store" + ] } } ], @@ -591,86 +753,131 @@ "query": "Find all usages of the retrieve function", "queryIndex": 5, "resultCount": 20, - "latencyMs": 137.1, + "latencyMs": 143.8, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.016393442622950817, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 366, "endLine": 465, "language": "typescript", "explanation": { "vectorScore": 0.009836065573770491, - "keywordScore": 0, + "keywordScore": 0.006557377049180328, "rawVectorScore": 0.7996223568916321, - "rawKeywordScore": 0, + "rawKeywordScore": 23.679610717842714, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 0, + "keywordRank": 0, + "matchedTerms": [ + "find", + "all", + "usages", + "usage", + "of", + "the", + "retrieve", + "retriev", + "function" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.015677655677655677, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", - "startLine": 293, - "endLine": 299, + "startLine": 428, + "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7925383448600769, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.006153846153846154, + "rawVectorScore": 0.7896517217159271, + "rawKeywordScore": 20.903555787626445, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 2, + "keywordRank": 4, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "the", + "retrieve", + "retriev", + "function" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.01555977229601518, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", - "startLine": 428, - "endLine": 527, + "startLine": 293, + "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7896517217159271, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.7925383448600769, + "rawKeywordScore": 16.27237814950236, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 1, + "keywordRank": 7, + "matchedTerms": [ + "find", + "usages", + "usage", + "retrieve", + "retriev" + ] } }, { "rank": 3, - "score": 0.009375, + "score": 0.014708333333333334, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 290, "endLine": 299, "language": "typescript", "explanation": { "vectorScore": 0.009375, - "keywordScore": 0, + "keywordScore": 0.005333333333333334, "rawVectorScore": 0.7816400825977325, - "rawKeywordScore": 0, + "rawKeywordScore": 11.267447987657134, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 3, + "keywordRank": 14, + "matchedTerms": [ + "find", + "usages", + "usage", + "of" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.014636174636174636, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 280, "endLine": 287, "language": "typescript", "explanation": { "vectorScore": 0.00923076923076923, - "keywordScore": 0, + "keywordScore": 0.005405405405405406, "rawVectorScore": 0.7804376780986786, - "rawKeywordScore": 0, + "rawKeywordScore": 11.267447987657134, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 4, + "keywordRank": 13, + "matchedTerms": [ + "find", + "usages", + "usage", + "of" + ] } } ], @@ -706,86 +913,135 @@ "query": "Find all usages of SearchResult type", "queryIndex": 6, "resultCount": 20, - "latencyMs": 146.2, + "latencyMs": 131.9, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.016234796404019036, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", - "startLine": 290, - "endLine": 299, + "startLine": 366, + "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.815750241279602, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.8101376593112946, + "rawKeywordScore": 23.238308700996786, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 1, + "keywordRank": 0, + "matchedTerms": [ + "find", + "all", + "usages", + "usage", + "of", + "searchresult", + "search", + "result", + "type" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", - "startLine": 366, - "endLine": 465, + "score": 0.01543560606060606, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.8101376593112946, - "rawKeywordScore": 0, + "vectorScore": 0.009375, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.805400013923645, + "rawKeywordScore": 17.260922255563226, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 3, + "keywordRank": 5, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "search", + "result", + "type" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", - "startLine": 176, - "endLine": 181, + "score": 0.015406836783822823, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.8084167540073395, - "rawKeywordScore": 0, + "vectorScore": 0.008955223880597015, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.7851665318012238, + "rawKeywordScore": 18.62773244221438, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 6, + "keywordRank": 1, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "searchresult", + "search", + "result" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", - "startLine": 528, - "endLine": 627, + "score": 0.015169398907103825, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 290, + "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.805400013923645, - "rawKeywordScore": 0, + "vectorScore": 0.009836065573770491, + "keywordScore": 0.005333333333333334, + "rawVectorScore": 0.815750241279602, + "rawKeywordScore": 13.135357594443214, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 0, + "keywordRank": 14, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "result" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.015027870680044592, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 280, "endLine": 287, "language": "typescript", "explanation": { "vectorScore": 0.00923076923076923, - "keywordScore": 0, + "keywordScore": 0.005797101449275362, "rawVectorScore": 0.8050737380981445, - "rawKeywordScore": 0, + "rawKeywordScore": 15.426400926997088, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 4, + "keywordRank": 8, + "matchedTerms": [ + "find", + "usages", + "usage", + "of", + "search", + "result" + ] } } ], @@ -821,86 +1077,124 @@ "query": "How does the chunker factory register new languages?", "queryIndex": 7, "resultCount": 20, - "latencyMs": 146.4, + "latencyMs": 149.6, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.016086065573770493, "filePath": "../OpenCodeRAG-main/src/chunker/factory.ts", "startLine": 97, "endLine": 115, "language": "typescript", "explanation": { "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8382091820240021, - "rawKeywordScore": 0, + "keywordScore": 0.00625, + "rawVectorScore": 0.8381350338459015, + "rawKeywordScore": 12.431347805284023, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 0, + "keywordRank": 3, + "matchedTerms": [ + "chunker", + "chunk", + "register", + "regist", + "language" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/chunker/base.ts", - "startLine": 57, - "endLine": 64, + "score": 0.01544011544011544, + "filePath": "../OpenCodeRAG-main/src/chunker/loader.ts", + "startLine": 19, + "endLine": 43, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.8112517297267914, - "rawKeywordScore": 0, + "vectorScore": 0.00909090909090909, + "keywordScore": 0.006349206349206349, + "rawVectorScore": 0.7848783433437347, + "rawKeywordScore": 15.053348043922359, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 5, + "keywordRank": 2, + "matchedTerms": [ + "does", + "chunker", + "chunk", + "register", + "regist" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/chunker/grammar.ts", - "startLine": 87, - "endLine": 97, + "score": 0.014511310285958173, + "filePath": "../OpenCodeRAG-main/src/chunker/loader.ts", + "startLine": 56, + "endLine": 70, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.8037641048431396, - "rawKeywordScore": 0, + "vectorScore": 0.008450704225352112, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.7729448676109314, + "rawKeywordScore": 12.026343420519646, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 10, + "keywordRank": 5, + "matchedTerms": [ + "chunker", + "chunk", + "register", + "regist", + "new" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/chunker/grammar.ts", - "startLine": 110, - "endLine": 123, + "score": 0.013457556935817806, + "filePath": "../OpenCodeRAG-main/src/chunker/base.ts", + "startLine": 26, + "endLine": 55, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7917411625385284, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.004761904761904762, + "rawVectorScore": 0.7798387110233307, + "rawKeywordScore": 7.854788943314285, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 8, + "keywordRank": 23, + "matchedTerms": [ + "chunker", + "chunk", + "new", + "language" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.012242562929061784, "filePath": "../OpenCodeRAG-main/src/chunker/factory.ts", - "startLine": 134, - "endLine": 136, + "startLine": 232, + "endLine": 256, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7893357574939728, - "rawKeywordScore": 0, + "vectorScore": 0.007894736842105263, + "keywordScore": 0.004347826086956522, + "rawVectorScore": 0.76323202252388, + "rawKeywordScore": 7.854788943314285, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 15, + "keywordRank": 31, + "matchedTerms": [ + "chunker", + "chunk", + "new", + "language" + ] } } ], @@ -936,86 +1230,125 @@ "query": "What is the default minScore configuration?", "queryIndex": 8, "resultCount": 20, - "latencyMs": 142.8, + "latencyMs": 136.4, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/chunker/fallback.ts", - "startLine": 15, - "endLine": 17, + "score": 0.014368530020703934, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 343, + "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.7386708855628967, - "rawKeywordScore": 0, + "vectorScore": 0.008571428571428572, + "keywordScore": 0.005797101449275362, + "rawVectorScore": 0.720088392496109, + "rawKeywordScore": 14.945573785780137, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 9, + "keywordRank": 8, + "matchedTerms": [ + "default", + "minscore", + "minscor", + "min", + "score" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/retriever/context-optimizer.ts", - "startLine": 49, - "endLine": 51, + "score": 0.014302981466559226, + "filePath": "../OpenCodeRAG-main/src/core/runtime-overrides.ts", + "startLine": 12, + "endLine": 54, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7336792945861816, - "rawKeywordScore": 0, + "vectorScore": 0.008823529411764706, + "keywordScore": 0.005479452054794521, + "rawVectorScore": 0.7215653657913208, + "rawKeywordScore": 12.609087141110411, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 7, + "keywordRank": 12, + "matchedTerms": [ + "minscore", + "minscor", + "min", + "score" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", - "startLine": 34, - "endLine": 36, + "score": 0.01384493670886076, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 427, + "endLine": 526, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7315484285354614, - "rawKeywordScore": 0, + "vectorScore": 0.007594936708860759, + "keywordScore": 0.00625, + "rawVectorScore": 0.7123583853244781, + "rawKeywordScore": 16.975004906885314, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 18, + "keywordRank": 3, + "matchedTerms": [ + "the", + "default", + "minscore", + "minscor", + "min", + "score" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/embedder/cohere.ts", - "startLine": 26, - "endLine": 32, + "score": 0.01327117327117327, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 412, + "endLine": 448, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.72625333070755, - "rawKeywordScore": 0, + "vectorScore": 0.00923076923076923, + "keywordScore": 0.00404040404040404, + "rawVectorScore": 0.7257089614868164, + "rawKeywordScore": 5.380057063460264, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 4, + "keywordRank": 38, + "matchedTerms": [ + "min", + "score" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 412, - "endLine": 448, + "score": 0.012903225806451613, + "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7257089614868164, - "rawKeywordScore": 0, + "vectorScore": 0.0064516129032258064, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.7039834856987, + "rawKeywordScore": 18.85150560456846, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 32, + "keywordRank": 1, + "matchedTerms": [ + "is", + "the", + "default", + "minscore", + "minscor", + "min", + "score" + ] } } ], @@ -1051,86 +1384,123 @@ "query": "How does the session logger capture token usage?", "queryIndex": 9, "resultCount": 20, - "latencyMs": 145.5, + "latencyMs": 128.4, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.015584415584415583, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", - "startLine": 26, - "endLine": 40, + "startLine": 43, + "endLine": 52, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8653715550899506, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.8369814157485962, + "rawKeywordScore": 10.552134307163826, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 2, + "keywordRank": 5, + "matchedTerms": [ + "session", + "logger", + "logg", + "token" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", - "startLine": 12, - "endLine": 24, - "language": "typescript", + "score": 0.015380906460945034, + "filePath": "../OpenCodeRAG-main/src/eval/index.ts", + "startLine": 1, + "endLine": 39, + "language": "text", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.8495024740695953, - "rawKeywordScore": 0, + "vectorScore": 0.008823529411764706, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.8056229650974274, + "rawKeywordScore": 27.43241842421657, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 7, + "keywordRank": 0, + "matchedTerms": [ + "the", + "session", + "logger", + "logg", + "capture", + "captur", + "token", + "usage" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.015315517628565012, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", - "startLine": 43, - "endLine": 52, + "startLine": 26, + "endLine": 40, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.8369814157485962, - "rawKeywordScore": 0, + "vectorScore": 0.009836065573770491, + "keywordScore": 0.005479452054794521, + "rawVectorScore": 0.8653715550899506, + "rawKeywordScore": 8.065350347317922, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 0, + "keywordRank": 12, + "matchedTerms": [ + "session", + "token", + "usage" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", - "startLine": 83, - "endLine": 182, + "score": 0.015232974910394267, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 12, + "endLine": 24, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.8313508629798889, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.005555555555555556, + "rawVectorScore": 0.8500174283981323, + "rawKeywordScore": 8.065350347317922, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 1, + "keywordRank": 11, + "matchedTerms": [ + "session", + "token", + "usage" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/web/api.ts", - "startLine": 385, - "endLine": 407, + "score": 0.014888010540184453, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 158, + "endLine": 183, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.8137838542461395, - "rawKeywordScore": 0, + "vectorScore": 0.00909090909090909, + "keywordScore": 0.005797101449275362, + "rawVectorScore": 0.81332927942276, + "rawKeywordScore": 9.779071223250313, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 5, + "keywordRank": 8, + "matchedTerms": [ + "the", + "session", + "logg", + "token" + ] } } ], @@ -1166,86 +1536,116 @@ "query": "How does L2 normalization affect vector search scores?", "queryIndex": 10, "resultCount": 20, - "latencyMs": 142.6, + "latencyMs": 138.3, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/retriever/context-optimizer.ts", - "startLine": 49, - "endLine": 51, + "score": 0.01515687140963323, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 343, + "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.7815871834754944, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.005479452054794521, + "rawVectorScore": 0.7657628059387207, + "rawKeywordScore": 7.8035209315309295, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 1, + "keywordRank": 12, + "matchedTerms": [ + "vector", + "search", + "score" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.015079365079365078, "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 343, - "endLine": 367, + "startLine": 321, + "endLine": 336, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7660261392593384, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.005555555555555556, + "rawVectorScore": 0.7581153213977814, + "rawKeywordScore": 7.8035209315309295, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 2, + "keywordRank": 11, + "matchedTerms": [ + "vector", + "search", + "score" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.014632034632034632, "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 321, - "endLine": 336, + "startLine": 412, + "endLine": 448, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7581153213977814, - "rawKeywordScore": 0, + "vectorScore": 0.008571428571428572, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.7314635813236237, + "rawKeywordScore": 9.64066934218794, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 9, + "keywordRank": 5, + "matchedTerms": [ + "search", + "scores", + "score" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/embedder/ollama.ts", - "startLine": 51, - "endLine": 97, + "score": 0.014492753623188406, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 184, + "endLine": 236, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.752647191286087, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.005797101449275362, + "rawVectorScore": 0.7382060885429382, + "rawKeywordScore": 7.8035209315309295, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 8, + "keywordRank": 8, + "matchedTerms": [ + "vector", + "search", + "score" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", - "startLine": 223, - "endLine": 307, + "score": 0.014358108108108109, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 176, + "endLine": 181, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.748416930437088, - "rawKeywordScore": 0, + "vectorScore": 0.008108108108108109, + "keywordScore": 0.00625, + "rawVectorScore": 0.7290540933609009, + "rawKeywordScore": 9.64066934218794, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 13, + "keywordRank": 3, + "matchedTerms": [ + "search", + "scores", + "score" + ] } } ], @@ -1281,86 +1681,119 @@ "query": "What is the MetadataFilter interface used for?", "queryIndex": 11, "resultCount": 20, - "latencyMs": 136.3, + "latencyMs": 139.9, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.013876469614174531, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 308, "endLine": 313, "language": "typescript", "explanation": { "vectorScore": 0.009836065573770491, - "keywordScore": 0, + "keywordScore": 0.00404040404040404, "rawVectorScore": 0.7521616518497467, - "rawKeywordScore": 0, + "rawKeywordScore": 8.127817464437936, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 0, + "keywordRank": 38, + "matchedTerms": [ + "the", + "metadata", + "interface", + "interfac" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.013313782991202346, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 71, "endLine": 80, "language": "typescript", "explanation": { "vectorScore": 0.00967741935483871, - "keywordScore": 0, + "keywordScore": 0.0036363636363636364, "rawVectorScore": 0.7493048906326294, - "rawKeywordScore": 0, + "rawKeywordScore": 7.338661360397543, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 1, + "keywordRank": 49, + "matchedTerms": [ + "the", + "filter", + "filt" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/indexer/metadata.ts", - "startLine": 88, - "endLine": 105, + "score": 0.01321917808219178, + "filePath": "../OpenCodeRAG-main/src/opencode/read-format.ts", + "startLine": 10, + "endLine": 21, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7431941628456116, - "rawKeywordScore": 0, + "vectorScore": 0.00821917808219178, + "keywordScore": 0.005, + "rawVectorScore": 0.7223770618438721, + "rawKeywordScore": 9.708793548492173, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 12, + "keywordRank": 19, + "matchedTerms": [ + "the", + "interface", + "interfac", + "used" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", - "startLine": 293, - "endLine": 299, + "score": 0.012937062937062937, + "filePath": "../OpenCodeRAG-main/src/opencode/create-read-tool.ts", + "startLine": 191, + "endLine": 215, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.741024911403656, - "rawKeywordScore": 0, + "vectorScore": 0.00909090909090909, + "keywordScore": 0.0038461538461538464, + "rawVectorScore": 0.7375127971172333, + "rawKeywordScore": 7.645716883962097, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 5, + "keywordRank": 43, + "matchedTerms": [ + "metadata", + "filter", + "filt" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/opencode/create-read-tool.ts", - "startLine": 261, - "endLine": 264, + "score": 0.01216931216931217, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 164, + "endLine": 173, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7397536337375641, - "rawKeywordScore": 0, + "vectorScore": 0.007407407407407407, + "keywordScore": 0.004761904761904762, + "rawVectorScore": 0.7146406471729279, + "rawKeywordScore": 9.071129937955403, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 20, + "keywordRank": 23, + "matchedTerms": [ + "filter", + "filt", + "interface", + "interfac" + ] } } ], @@ -1396,86 +1829,127 @@ "query": "How does the background indexer handle file changes?", "queryIndex": 12, "resultCount": 20, - "latencyMs": 139.7, + "latencyMs": 161.2, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.016185271922976842, "filePath": "../OpenCodeRAG-main/src/watcher.ts", "startLine": 78, "endLine": 177, "language": "typescript", "explanation": { "vectorScore": 0.009836065573770491, - "keywordScore": 0, + "keywordScore": 0.006349206349206349, "rawVectorScore": 0.834298312664032, - "rawKeywordScore": 0, + "rawKeywordScore": 21.127461055894198, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 0, + "keywordRank": 2, + "matchedTerms": [ + "background", + "indexer", + "index", + "handle", + "handl", + "file", + "change" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.01597542242703533, "filePath": "../OpenCodeRAG-main/src/watcher.ts", - "startLine": 21, - "endLine": 24, + "startLine": 27, + "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.8222635090351105, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.8211431503295898, + "rawKeywordScore": 21.285792055016966, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 2, + "keywordRank": 1, + "matchedTerms": [ + "the", + "background", + "indexer", + "index", + "file", + "changes", + "change" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.015311222171740118, "filePath": "../OpenCodeRAG-main/src/watcher.ts", - "startLine": 27, - "endLine": 46, + "startLine": 21, + "endLine": 24, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.8211431503295898, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.005633802816901409, + "rawVectorScore": 0.8222635090351105, + "rawKeywordScore": 12.050435007069142, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 1, + "keywordRank": 10, + "matchedTerms": [ + "the", + "background", + "indexer", + "index" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", - "startLine": 120, - "endLine": 125, + "score": 0.01471022128556375, + "filePath": "../OpenCodeRAG-main/src/watcher.ts", + "startLine": 178, + "endLine": 189, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.8077379763126373, - "rawKeywordScore": 0, + "vectorScore": 0.00923076923076923, + "keywordScore": 0.005479452054794521, + "rawVectorScore": 0.7941692173480988, + "rawKeywordScore": 11.193626160405827, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 4, + "keywordRank": 12, + "matchedTerms": [ + "background", + "indexer", + "index", + "file" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/watcher.ts", - "startLine": 178, - "endLine": 189, + "score": 0.013701578192252512, + "filePath": "../OpenCodeRAG-main/src/indexer/stats.ts", + "startLine": 41, + "endLine": 58, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7950503528118134, - "rawKeywordScore": 0, + "vectorScore": 0.008823529411764706, + "keywordScore": 0.004878048780487805, + "rawVectorScore": 0.7871012985706329, + "rawKeywordScore": 9.676628481669152, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 7, + "keywordRank": 21, + "matchedTerms": [ + "does", + "the", + "index", + "file" + ] } } ], @@ -1511,86 +1985,114 @@ "query": "Where is the config validation logic?", "queryIndex": 13, "resultCount": 20, - "latencyMs": 137.3, + "latencyMs": 198, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/eval/run-token-test.ts", - "startLine": 40, - "endLine": 48, + "score": 0.01293827160493827, + "filePath": "../OpenCodeRAG-main/src/retriever/context-optimizer.ts", + "startLine": 8, + "endLine": 19, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.7609131038188934, - "rawKeywordScore": 0, + "vectorScore": 0.008, + "keywordScore": 0.0049382716049382715, + "rawVectorScore": 0.7181599140167236, + "rawKeywordScore": 5.580408127401643, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 14, + "keywordRank": 20, + "matchedTerms": [ + "is", + "the", + "config" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/tui.ts", - "startLine": 265, - "endLine": 271, + "score": 0.011868131868131869, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7607740163803101, - "rawKeywordScore": 0, + "vectorScore": 0.005714285714285714, + "keywordScore": 0.006153846153846154, + "rawVectorScore": 0.7007447183132172, + "rawKeywordScore": 8.42044763650828, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 44, + "keywordRank": 4, + "matchedTerms": [ + "where", + "is", + "the" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/cli/format.ts", - "startLine": 130, - "endLine": 134, + "score": 0.011382978723404255, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 1313, + "endLine": 1391, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7549314498901367, - "rawKeywordScore": 0, + "vectorScore": 0.006382978723404255, + "keywordScore": 0.005, + "rawVectorScore": 0.7044038772583008, + "rawKeywordScore": 5.580408127401643, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 33, + "keywordRank": 19, + "matchedTerms": [ + "is", + "the", + "config" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 193, - "endLine": 215, + "score": 0.010948275862068965, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 283, + "endLine": 294, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7490440607070923, - "rawKeywordScore": 0, + "vectorScore": 0.0075, + "keywordScore": 0.003448275862068966, + "rawVectorScore": 0.7114178240299225, + "rawKeywordScore": 3.7039074297184973, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 19, + "keywordRank": 55, + "matchedTerms": [ + "the", + "config" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/tui.ts", - "startLine": 361, - "endLine": 376, + "score": 0.01036699149906697, + "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", + "startLine": 36, + "endLine": 53, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7405577898025513, - "rawKeywordScore": 0, + "vectorScore": 0.006593406593406593, + "keywordScore": 0.0037735849056603774, + "rawVectorScore": 0.7052006125450134, + "rawKeywordScore": 3.7039074297184973, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 30, + "keywordRank": 45, + "matchedTerms": [ + "the", + "config" + ] } } ], @@ -1626,86 +2128,115 @@ "query": "How are PDF documents chunked and indexed?", "queryIndex": 14, "resultCount": 20, - "latencyMs": 136.7, + "latencyMs": 140.3, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/chunker/docx.ts", - "startLine": 39, - "endLine": 108, - "language": "typescript", + "score": 0.0141690408357075, + "filePath": "../OpenCodeRAG-main/src/content/pdf.ts", + "startLine": 15, + "endLine": 23, + "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8325012028217316, - "rawKeywordScore": 0, + "vectorScore": 0.00923076923076923, + "keywordScore": 0.0049382716049382715, + "rawVectorScore": 0.7934660017490387, + "rawKeywordScore": 6.705533799836411, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 4, + "keywordRank": 20, + "matchedTerms": [ + "pdf", + "chunk" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/chunker/doc.ts", - "startLine": 40, - "endLine": 109, + "score": 0.013824884792626727, + "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", + "startLine": 120, + "endLine": 125, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.8193139731884003, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.004301075268817204, + "rawVectorScore": 0.7998655140399933, + "rawKeywordScore": 6.140786969306384, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 2, + "keywordRank": 32, + "matchedTerms": [ + "chunk", + "indexed", + "index" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.012532299741602068, "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", - "startLine": 120, - "endLine": 125, + "startLine": 20, + "endLine": 47, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.8003702461719513, - "rawKeywordScore": 0, + "vectorScore": 0.0069767441860465115, + "keywordScore": 0.005555555555555556, + "rawVectorScore": 0.7648292779922485, + "rawKeywordScore": 8.374928490470245, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 25, + "keywordRank": 11, + "matchedTerms": [ + "chunk", + "and", + "indexed", + "index" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/chunker/excel.ts", - "startLine": 49, - "endLine": 108, + "score": 0.012395604395604396, + "filePath": "../OpenCodeRAG-main/src/indexer/pipeline.ts", + "startLine": 749, + "endLine": 819, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7956143319606781, - "rawKeywordScore": 0, + "vectorScore": 0.008, + "keywordScore": 0.004395604395604396, + "rawVectorScore": 0.7735616862773895, + "rawKeywordScore": 6.140786969306384, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 14, + "keywordRank": 30, + "matchedTerms": [ + "chunk", + "indexed", + "index" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/content/pdf.ts", - "startLine": 15, - "endLine": 23, + "score": 0.012345054389071592, + "filePath": "../OpenCodeRAG-main/src/indexer/description-stage.ts", + "startLine": 32, + "endLine": 119, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7940729856491089, - "rawKeywordScore": 0, + "vectorScore": 0.008955223880597015, + "keywordScore": 0.0033898305084745766, + "rawVectorScore": 0.784144252538681, + "rawKeywordScore": 4.839129870180977, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 6, + "keywordRank": 57, + "matchedTerms": [ + "document", + "chunk" + ] } } ], @@ -1741,86 +2272,117 @@ "query": "What embedding providers are supported?", "queryIndex": 15, "resultCount": 20, - "latencyMs": 133.1, + "latencyMs": 135.9, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/embedder/ollama.ts", - "startLine": 51, - "endLine": 97, + "score": 0.014884135472370767, + "filePath": "../OpenCodeRAG-main/src/core/provider-defaults.ts", + "startLine": 7, + "endLine": 16, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8716892302036285, - "rawKeywordScore": 0, + "vectorScore": 0.008823529411764706, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.8289196789264679, + "rawKeywordScore": 10.448091959118075, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 7, + "keywordRank": 5, + "matchedTerms": [ + "embedding", + "embedd", + "provider", + "support" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/embedder/openai.ts", - "startLine": 60, - "endLine": 89, + "score": 0.013919413919413919, + "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", + "startLine": 23, + "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.8623208105564117, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.004395604395604396, + "rawVectorScore": 0.8618934750556946, + "rawKeywordScore": 6.530629230394111, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 2, + "keywordRank": 30, + "matchedTerms": [ + "embedding", + "embedd", + "provider" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.013887945670628184, "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", "startLine": 45, "endLine": 61, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.862164169549942, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.004210526315789474, + "rawVectorScore": 0.8624624907970428, + "rawKeywordScore": 6.530629230394111, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 1, + "keywordRank": 34, + "matchedTerms": [ + "embedding", + "embedd", + "provider" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", - "startLine": 23, - "endLine": 46, + "score": 0.013876469614174531, + "filePath": "../OpenCodeRAG-main/src/embedder/ollama.ts", + "startLine": 51, + "endLine": 97, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.8614892065525055, - "rawKeywordScore": 0, + "vectorScore": 0.009836065573770491, + "keywordScore": 0.00404040404040404, + "rawVectorScore": 0.8716892302036285, + "rawKeywordScore": 6.530629230394111, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 0, + "keywordRank": 38, + "matchedTerms": [ + "embedding", + "embedd", + "provider" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.013828470380194517, "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", "startLine": 56, "endLine": 66, "language": "typescript", "explanation": { "vectorScore": 0.00923076923076923, - "keywordScore": 0, + "keywordScore": 0.004597701149425287, "rawVectorScore": 0.8396036028862, - "rawKeywordScore": 0, + "rawKeywordScore": 6.530629230394111, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 4, + "keywordRank": 26, + "matchedTerms": [ + "embedding", + "embedd", + "provider" + ] } } ], @@ -1856,86 +2418,119 @@ "query": "How does the CLI parse and dispatch commands?", "queryIndex": 16, "resultCount": 20, - "latencyMs": 189.2, + "latencyMs": 136.4, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.01571841851494696, "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.7968338131904602, - "rawKeywordScore": 0, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.7982566356658936, + "rawKeywordScore": 10.478336008139719, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 0, + "keywordRank": 7, + "matchedTerms": [ + "the", + "cli", + "parse", + "command" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/cli/commands/eval.ts", - "startLine": 71, - "endLine": 134, - "language": "typescript", + "score": 0.014890710382513661, + "filePath": "../OpenCodeRAG-main/src/cli.ts", + "startLine": 1, + "endLine": 10, + "language": "text", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7839367687702179, - "rawKeywordScore": 0, + "vectorScore": 0.008333333333333333, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.7459721565246582, + "rawKeywordScore": 15.680509514134853, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 11, + "keywordRank": 0, + "matchedTerms": [ + "the", + "cli", + "and", + "commands", + "command" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/cli/format.ts", - "startLine": 110, - "endLine": 122, + "score": 0.014724711907810498, + "filePath": "../OpenCodeRAG-main/src/cli/types.ts", + "startLine": 7, + "endLine": 24, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7711082994937897, - "rawKeywordScore": 0, + "vectorScore": 0.00909090909090909, + "keywordScore": 0.005633802816901409, + "rawVectorScore": 0.7648557126522064, + "rawKeywordScore": 8.448904887034544, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 5, + "keywordRank": 10, + "matchedTerms": [ + "cli", + "and", + "command" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/cli/commands/index.ts", - "startLine": 1, - "endLine": 18, - "language": "text", + "score": 0.01461569095977698, + "filePath": "../OpenCodeRAG-main/src/cli/commands/eval.ts", + "startLine": 71, + "endLine": 134, + "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7682340741157532, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.0049382716049382715, + "rawVectorScore": 0.7839367687702179, + "rawKeywordScore": 6.214763365870683, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 1, + "keywordRank": 20, + "matchedTerms": [ + "cli", + "command" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/cli/commands/show.ts", + "score": 0.014492753623188406, + "filePath": "../OpenCodeRAG-main/src/cli/commands/ui.ts", "startLine": 22, - "endLine": 59, + "endLine": 82, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7663054168224335, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.005797101449275362, + "rawVectorScore": 0.7595089375972748, + "rawKeywordScore": 10.478336008139719, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 8, + "keywordRank": 8, + "matchedTerms": [ + "the", + "cli", + "parse", + "command" + ] } } ], @@ -1971,86 +2566,120 @@ "query": "How does the session logger persist events?", "queryIndex": 17, "resultCount": 20, - "latencyMs": 134.7, + "latencyMs": 133.7, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.01571841851494696, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 43, "endLine": 52, "language": "typescript", "explanation": { "vectorScore": 0.009836065573770491, - "keywordScore": 0, + "keywordScore": 0.0058823529411764705, "rawVectorScore": 0.8729149699211121, - "rawKeywordScore": 0, + "rawKeywordScore": 11.348286077861328, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 0, + "keywordRank": 7, + "matchedTerms": [ + "session", + "logger", + "logg", + "event" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.015474520804114072, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 58, "endLine": 157, "language": "typescript", "explanation": { "vectorScore": 0.00967741935483871, - "keywordScore": 0, + "keywordScore": 0.005797101449275362, "rawVectorScore": 0.866875559091568, - "rawKeywordScore": 0, + "rawKeywordScore": 11.348286077861328, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 1, + "keywordRank": 8, + "matchedTerms": [ + "session", + "logger", + "logg", + "event" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.015238095238095238, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 158, "endLine": 183, "language": "typescript", "explanation": { "vectorScore": 0.009523809523809523, - "keywordScore": 0, + "keywordScore": 0.005714285714285714, "rawVectorScore": 0.8487854301929474, - "rawKeywordScore": 0, + "rawKeywordScore": 10.575222993947818, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 2, + "keywordRank": 9, + "matchedTerms": [ + "the", + "session", + "logg", + "event" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "score": 0.014864572047670638, + "filePath": "../OpenCodeRAG-main/src/eval/storage.ts", "startLine": 26, - "endLine": 40, + "endLine": 35, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.8466207087039948, - "rawKeywordScore": 0, + "vectorScore": 0.00923076923076923, + "keywordScore": 0.005633802816901409, + "rawVectorScore": 0.8379587531089783, + "rawKeywordScore": 10.575222993947818, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 4, + "keywordRank": 10, + "matchedTerms": [ + "the", + "session", + "logg", + "event" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.014360629286002421, "filePath": "../OpenCodeRAG-main/src/eval/storage.ts", - "startLine": 26, - "endLine": 35, + "startLine": 165, + "endLine": 178, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.8365089297294617, - "rawKeywordScore": 0, + "vectorScore": 0.008955223880597015, + "keywordScore": 0.005405405405405406, + "rawVectorScore": 0.8185106813907623, + "rawKeywordScore": 10.02807074011448, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 6, + "keywordRank": 13, + "matchedTerms": [ + "session", + "events", + "event" + ] } } ], @@ -2086,86 +2715,119 @@ "query": "What is the manifest schema version used for?", "queryIndex": 18, "resultCount": 20, - "latencyMs": 150, + "latencyMs": 151.1, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", - "startLine": 308, - "endLine": 313, + "score": 0.013972701149425287, + "filePath": "../OpenCodeRAG-main/src/indexer/pipeline.ts", + "startLine": 749, + "endLine": 819, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.7399376928806305, - "rawKeywordScore": 0, + "vectorScore": 0.009375, + "keywordScore": 0.004597701149425287, + "rawVectorScore": 0.7366407811641693, + "rawKeywordScore": 6.471085544344631, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 3, + "keywordRank": 26, + "matchedTerms": [ + "is", + "manifest", + "for" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/core/version-check.ts", - "startLine": 1, - "endLine": 7, + "score": 0.013565085962592103, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 799, + "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7395970225334167, - "rawKeywordScore": 0, + "vectorScore": 0.007594936708860759, + "keywordScore": 0.005970149253731343, + "rawVectorScore": 0.7220064103603363, + "rawKeywordScore": 11.938081691282836, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 18, + "keywordRank": 6, + "matchedTerms": [ + "is", + "the", + "manifest", + "version", + "for" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", - "startLine": 15, - "endLine": 17, + "score": 0.013212608987256874, + "filePath": "../OpenCodeRAG-main/src/indexer/stats.ts", + "startLine": 41, + "endLine": 58, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7377591729164124, - "rawKeywordScore": 0, + "vectorScore": 0.008450704225352112, + "keywordScore": 0.004761904761904762, + "rawVectorScore": 0.7307842373847961, + "rawKeywordScore": 7.107263334005611, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 10, + "keywordRank": 23, + "matchedTerms": [ + "is", + "the", + "manifest" + ] } }, { "rank": 3, - "score": 0.009375, + "score": 0.012372448979591836, "filePath": "../OpenCodeRAG-main/src/indexer/pipeline.ts", - "startLine": 749, - "endLine": 819, + "startLine": 153, + "endLine": 252, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7363853752613068, - "rawKeywordScore": 0, + "vectorScore": 0.006122448979591836, + "keywordScore": 0.00625, + "rawVectorScore": 0.708729088306427, + "rawKeywordScore": 12.41797939417377, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 37, + "keywordRank": 3, + "matchedTerms": [ + "is", + "the", + "manifest", + "used", + "for" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/eval/types.ts", - "startLine": 68, - "endLine": 93, + "score": 0.012267080745341614, + "filePath": "../OpenCodeRAG-main/src/tui.ts", + "startLine": 89, + "endLine": 128, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7348621487617493, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.0035714285714285718, + "rawVectorScore": 0.732252299785614, + "rawKeywordScore": 4.594584846661485, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 8, + "keywordRank": 51, + "matchedTerms": [ + "manifest", + "for" + ] } } ], @@ -2201,86 +2863,137 @@ "query": "How does the OpenCode plugin register tools?", "queryIndex": 19, "resultCount": 20, - "latencyMs": 149.5, + "latencyMs": 140.8, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.015682382133995035, "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 1213, - "endLine": 1312, + "startLine": 499, + "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8483277261257172, - "rawKeywordScore": 0, + "vectorScore": 0.00923076923076923, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.8066220283508301, + "rawKeywordScore": 25.1592075988563, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 4, + "keywordRank": 1, + "matchedTerms": [ + "how", + "does", + "the", + "opencode", + "opencod", + "open", + "code", + "plugin" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.01555977229601518, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 699, "endLine": 798, "language": "typescript", "explanation": { "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.8436833918094635, - "rawKeywordScore": 0, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.8430216610431671, + "rawKeywordScore": 20.274502744032308, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 1, + "keywordRank": 7, + "matchedTerms": [ + "the", + "open", + "code", + "plugin", + "register", + "regist", + "tools" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/plugin-entry.ts", - "startLine": 1, - "endLine": 19, - "language": "text", + "score": 0.015512600929777343, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 799, + "endLine": 898, + "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.8296231329441071, - "rawKeywordScore": 0, + "vectorScore": 0.008955223880597015, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.7970275580883026, + "rawKeywordScore": 29.273717830672997, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 6, + "keywordRank": 0, + "matchedTerms": [ + "how", + "does", + "the", + "opencode", + "opencod", + "open", + "code", + "plugin", + "tools" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/cli/commands/setup.ts", - "startLine": 28, - "endLine": 40, - "language": "typescript", + "score": 0.015238095238095238, + "filePath": "../OpenCodeRAG-main/src/plugin-entry.ts", + "startLine": 1, + "endLine": 19, + "language": "text", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.8233766853809357, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.005714285714285714, + "rawVectorScore": 0.8296231329441071, + "rawKeywordScore": 17.942419523272093, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 2, + "keywordRank": 9, + "matchedTerms": [ + "the", + "opencode", + "opencod", + "open", + "code", + "plugin", + "register" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.014714114354258297, "filePath": "../OpenCodeRAG-main/src/plugin.ts", - "startLine": 499, - "endLine": 598, + "startLine": 1213, + "endLine": 1312, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.8075522482395172, - "rawKeywordScore": 0, + "vectorScore": 0.009836065573770491, + "keywordScore": 0.004878048780487805, + "rawVectorScore": 0.8487226665019989, + "rawKeywordScore": 12.828963521467251, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 0, + "keywordRank": 21, + "matchedTerms": [ + "opencode", + "opencod", + "open", + "code", + "plugin" + ] } } ], @@ -2316,86 +3029,120 @@ "query": "Where is the globMatch function defined?", "queryIndex": 20, "resultCount": 20, - "latencyMs": 150.5, + "latencyMs": 152.5, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/chunker/ssl.ts", - "startLine": 145, - "endLine": 165, + "score": 0.01500808127453244, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.7408466041088104, - "rawKeywordScore": 0, + "vectorScore": 0.008450704225352112, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.7083643674850464, + "rawKeywordScore": 24.972142610413826, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 10, + "keywordRank": 0, + "matchedTerms": [ + "where", + "is", + "the", + "match", + "function", + "defined", + "defin" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.014175104228707564, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", - "startLine": 290, - "endLine": 299, + "startLine": 366, + "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.73261958360672, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.005479452054794521, + "rawVectorScore": 0.7087934911251068, + "rawKeywordScore": 5.98690745514285, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 8, + "keywordRank": 12, + "matchedTerms": [ + "the", + "match", + "function" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", - "startLine": 628, - "endLine": 642, + "score": 0.014137140842587695, + "filePath": "../OpenCodeRAG-main/src/chunker/ssl.ts", + "startLine": 145, + "endLine": 165, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7154453098773956, - "rawKeywordScore": 0, + "vectorScore": 0.009836065573770491, + "keywordScore": 0.004301075268817204, + "rawVectorScore": 0.7416016161441803, + "rawKeywordScore": 3.9574763340376746, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 0, + "keywordRank": 32, + "matchedTerms": [ + "match", + "function" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", - "startLine": 159, - "endLine": 161, + "score": 0.013026017111925964, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7147655487060547, - "rawKeywordScore": 0, + "vectorScore": 0.007228915662650602, + "keywordScore": 0.005797101449275362, + "rawVectorScore": 0.694938063621521, + "rawKeywordScore": 7.863408152825995, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 22, + "keywordRank": 8, + "matchedTerms": [ + "is", + "the", + "match", + "function" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/core/provider-defaults.ts", - "startLine": 100, - "endLine": 105, + "score": 0.012650406504065041, + "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", + "startLine": 126, + "endLine": 140, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7120298743247986, - "rawKeywordScore": 0, + "vectorScore": 0.007317073170731707, + "keywordScore": 0.005333333333333334, + "rawVectorScore": 0.6954189538955688, + "rawKeywordScore": 5.833977031720821, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 21, + "keywordRank": 14, + "matchedTerms": [ + "is", + "match", + "function" + ] } } ], @@ -2431,86 +3178,111 @@ "query": "How does the proxy-aware HTTP client work?", "queryIndex": 21, "resultCount": 20, - "latencyMs": 155.8, + "latencyMs": 150.9, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.015469868390671899, "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", "startLine": 152, "endLine": 164, "language": "typescript", "explanation": { "vectorScore": 0.009836065573770491, - "keywordScore": 0, + "keywordScore": 0.005633802816901409, "rawVectorScore": 0.7926509976387024, - "rawKeywordScore": 0, + "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 0, + "keywordRank": 10, + "matchedTerms": [ + "proxy", + "http" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.015232974910394267, "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", "startLine": 484, "endLine": 501, "language": "typescript", "explanation": { "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7897729575634003, - "rawKeywordScore": 0, + "keywordScore": 0.005555555555555556, + "rawVectorScore": 0.7894213199615479, + "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 1, + "keywordRank": 11, + "matchedTerms": [ + "proxy", + "http" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.01485445205479452, "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", - "startLine": 143, - "endLine": 149, + "startLine": 504, + "endLine": 557, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7867366969585419, - "rawKeywordScore": 0, + "vectorScore": 0.009375, + "keywordScore": 0.005479452054794521, + "rawVectorScore": 0.781430721282959, + "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 3, + "keywordRank": 12, + "matchedTerms": [ + "proxy", + "http" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", - "startLine": 504, - "endLine": 557, + "score": 0.01328722242446305, + "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", + "startLine": 158, + "endLine": 192, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7809644043445587, - "rawKeywordScore": 0, + "vectorScore": 0.007317073170731707, + "keywordScore": 0.005970149253731343, + "rawVectorScore": 0.7241736650466919, + "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 21, + "keywordRank": 6, + "matchedTerms": [ + "proxy", + "http" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/embedder/cohere.ts", - "startLine": 26, - "endLine": 32, + "score": 0.013025210084033612, + "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", + "startLine": 200, + "endLine": 232, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7768464982509613, - "rawKeywordScore": 0, + "vectorScore": 0.007142857142857143, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.7169309258460999, + "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 23, + "keywordRank": 7, + "matchedTerms": [ + "proxy", + "http" + ] } } ], @@ -2546,86 +3318,106 @@ "query": "What is the FETCH_OVERFETCH_FACTOR constant?", "queryIndex": 22, "resultCount": 20, - "latencyMs": 146.1, + "latencyMs": 151.4, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, - "filePath": "../OpenCodeRAG-main/src/core/runtime-overrides.ts", - "startLine": 12, - "endLine": 54, + "score": 0.013375558867362147, + "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", + "startLine": 183, + "endLine": 218, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.7472843527793884, - "rawKeywordScore": 0, + "vectorScore": 0.006818181818181818, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.7063843607902527, + "rawKeywordScore": 9.611335504612896, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 27, + "keywordRank": 0, + "matchedTerms": [ + "what", + "h_" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", - "startLine": 397, - "endLine": 420, + "score": 0.011292016806722689, + "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.7409740090370178, - "rawKeywordScore": 0, + "vectorScore": 0.0050420168067226885, + "keywordScore": 0.00625, + "rawVectorScore": 0.6948564350605011, + "rawKeywordScore": 7.823394547512285, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 58, + "keywordRank": 3, + "matchedTerms": [ + "is", + "the", + "fetch" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/chunker/fallback.ts", - "startLine": 15, - "endLine": 17, + "score": 0.010998877665544332, + "filePath": "../OpenCodeRAG-main/src/cli/commands/setup.ts", + "startLine": 28, + "endLine": 40, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.7398375868797302, - "rawKeywordScore": 0, + "vectorScore": 0.006060606060606061, + "keywordScore": 0.0049382716049382715, + "rawVectorScore": 0.7020108103752136, + "rawKeywordScore": 3.90593181878832, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 38, + "keywordRank": 20, + "matchedTerms": [ + "is", + "the" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", - "startLine": 223, - "endLine": 307, + "score": 0.0106203007518797, + "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", + "startLine": 309, + "endLine": 351, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.7291486859321594, - "rawKeywordScore": 0, + "vectorScore": 0.005357142857142857, + "keywordScore": 0.005263157894736842, + "rawVectorScore": 0.6967871785163879, + "rawKeywordScore": 3.9174627287239643, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 51, + "keywordRank": 15, + "matchedTerms": [ + "fetch" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/web/api.ts", - "startLine": 416, - "endLine": 440, + "score": 0.009836065573770491, + "filePath": "../OpenCodeRAG-main/src/core/runtime-overrides.ts", + "startLine": 12, + "endLine": 54, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, + "vectorScore": 0.009836065573770491, "keywordScore": 0, - "rawVectorScore": 0.7284904420375824, + "rawVectorScore": 0.7472843527793884, "rawKeywordScore": 0, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 0 } } ], @@ -2661,86 +3453,116 @@ "query": "How does the TUI settings menu work?", "queryIndex": 23, "resultCount": 20, - "latencyMs": 133.5, + "latencyMs": 187.8, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.016129032258064516, "filePath": "../OpenCodeRAG-main/src/tui.ts", - "startLine": 283, - "endLine": 294, + "startLine": 608, + "endLine": 707, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8115568161010742, - "rawKeywordScore": 0, + "vectorScore": 0.00967741935483871, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.8096809387207031, + "rawKeywordScore": 17.559910313957428, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 1, + "keywordRank": 1, + "matchedTerms": [ + "tui", + "settings", + "setting", + "menu" + ] } }, { "rank": 1, - "score": 0.00967741935483871, + "score": 0.01548076923076923, "filePath": "../OpenCodeRAG-main/src/tui.ts", - "startLine": 608, - "endLine": 707, + "startLine": 427, + "endLine": 526, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.8096809387207031, - "rawKeywordScore": 0, + "vectorScore": 0.00923076923076923, + "keywordScore": 0.00625, + "rawVectorScore": 0.7658225297927856, + "rawKeywordScore": 13.424422351489037, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 4, + "keywordRank": 3, + "matchedTerms": [ + "the", + "tui", + "setting", + "work" + ] } }, { "rank": 2, - "score": 0.009523809523809523, + "score": 0.015315517628565012, "filePath": "../OpenCodeRAG-main/src/tui.ts", - "startLine": 297, - "endLine": 306, + "startLine": 283, + "endLine": 294, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.8006298840045929, - "rawKeywordScore": 0, + "vectorScore": 0.009836065573770491, + "keywordScore": 0.005479452054794521, + "rawVectorScore": 0.8115052282810211, + "rawKeywordScore": 6.0403940743882245, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 0, + "keywordRank": 12, + "matchedTerms": [ + "the", + "setting" + ] } }, { "rank": 3, - "score": 0.009375, + "score": 0.015238095238095238, "filePath": "../OpenCodeRAG-main/src/tui.ts", - "startLine": 527, - "endLine": 602, + "startLine": 297, + "endLine": 306, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.779504120349884, - "rawKeywordScore": 0, + "vectorScore": 0.009523809523809523, + "keywordScore": 0.005714285714285714, + "rawVectorScore": 0.7998878359794617, + "rawKeywordScore": 8.52547877100301, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 2, + "keywordRank": 9, + "matchedTerms": [ + "settings", + "setting" + ] } }, { "rank": 4, - "score": 0.00923076923076923, + "score": 0.014849498327759197, "filePath": "../OpenCodeRAG-main/src/tui.ts", - "startLine": 427, - "endLine": 526, + "startLine": 196, + "endLine": 260, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.7658225297927856, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.006153846153846154, + "rawVectorScore": 0.7494852542877197, + "rawKeywordScore": 12.357736807962294, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 8, + "keywordRank": 4, + "matchedTerms": [ + "tui", + "settings", + "setting" + ] } } ], @@ -2776,86 +3598,1564 @@ "query": "How are image descriptions generated?", "queryIndex": 24, "resultCount": 20, - "latencyMs": 136.2, + "latencyMs": 139.7, "topResults": [ { "rank": 0, - "score": 0.009836065573770491, + "score": 0.01525735294117647, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 334, + "endLine": 415, + "language": "typescript", + "explanation": { + "vectorScore": 0.009375, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.8315328061580658, + "rawKeywordScore": 11.833676737018862, + "keywordWeight": 0.4, + "vectorRank": 3, + "keywordRank": 7, + "matchedTerms": [ + "image", + "description", + "generated", + "generat" + ] + } + }, + { + "rank": 1, + "score": 0.014805194805194804, + "filePath": "../OpenCodeRAG-main/src/indexer/description-stage.ts", + "startLine": 32, + "endLine": 119, + "language": "typescript", + "explanation": { + "vectorScore": 0.00909090909090909, + "keywordScore": 0.005714285714285714, + "rawVectorScore": 0.8292976319789886, + "rawKeywordScore": 11.08600348338972, + "keywordWeight": 0.4, + "vectorRank": 5, + "keywordRank": 9, + "matchedTerms": [ + "image", + "descriptions", + "description", + "generat" + ] + } + }, + { + "rank": 2, + "score": 0.013955223880597015, "filePath": "../OpenCodeRAG-main/src/chunker/image.ts", - "startLine": 151, - "endLine": 208, + "startLine": 315, + "endLine": 373, + "language": "typescript", + "explanation": { + "vectorScore": 0.008955223880597015, + "keywordScore": 0.005, + "rawVectorScore": 0.8289483487606049, + "rawKeywordScore": 5.636967115998509, + "keywordWeight": 0.4, + "vectorRank": 6, + "keywordRank": 19, + "matchedTerms": [ + "image", + "generat" + ] + } + }, + { + "rank": 3, + "score": 0.013828470380194517, + "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", + "startLine": 39, + "endLine": 45, + "language": "typescript", + "explanation": { + "vectorScore": 0.00923076923076923, + "keywordScore": 0.004597701149425287, + "rawVectorScore": 0.8301655352115631, + "rawKeywordScore": 5.035852843783428, + "keywordWeight": 0.4, + "vectorRank": 4, + "keywordRank": 26, + "matchedTerms": [ + "description", + "generat" + ] + } + }, + { + "rank": 4, + "score": 0.013748782862706914, + "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", + "startLine": 48, + "endLine": 80, + "language": "typescript", + "explanation": { + "vectorScore": 0.007594936708860759, + "keywordScore": 0.006153846153846154, + "rawVectorScore": 0.7916759252548218, + "rawKeywordScore": 13.012556175062718, + "keywordWeight": 0.4, + "vectorRank": 18, + "keywordRank": 4, + "matchedTerms": [ + "descriptions", + "description", + "generated", + "generat" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "retrieve function", + "queryIndex": 25, + "resultCount": 20, + "latencyMs": 134.2, + "topResults": [ + { + "rank": 0, + "score": 0.015391621129326048, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 343, + "endLine": 367, "language": "typescript", "explanation": { "vectorScore": 0.009836065573770491, - "keywordScore": 0, - "rawVectorScore": 0.8516704440116882, - "rawKeywordScore": 0, + "keywordScore": 0.005555555555555556, + "rawVectorScore": 0.7735368311405182, + "rawKeywordScore": 7.606676678864138, "keywordWeight": 0.4, - "vectorRank": 0 + "vectorRank": 0, + "keywordRank": 11, + "matchedTerms": [ + "retrieve", + "retriev", + "function" + ] } }, { "rank": 1, - "score": 0.00967741935483871, - "filePath": "../OpenCodeRAG-main/src/chunker/image.ts", - "startLine": 231, - "endLine": 292, + "score": 0.015253029223093371, + "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0, - "rawVectorScore": 0.8405250906944275, - "rawKeywordScore": 0, + "vectorScore": 0.008695652173913044, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.7253389954566956, + "rawKeywordScore": 7.606676678864138, "keywordWeight": 0.4, - "vectorRank": 1 + "vectorRank": 8, + "keywordRank": 0, + "matchedTerms": [ + "retrieve", + "retriev", + "function" + ] } }, { "rank": 2, - "score": 0.009523809523809523, - "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", - "startLine": 308, - "endLine": 313, + "score": 0.015157612340710933, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 321, + "endLine": 336, "language": "typescript", "explanation": { "vectorScore": 0.009523809523809523, - "keywordScore": 0, - "rawVectorScore": 0.8372036814689636, - "rawKeywordScore": 0, + "keywordScore": 0.005633802816901409, + "rawVectorScore": 0.7688738703727722, + "rawKeywordScore": 7.606676678864138, "keywordWeight": 0.4, - "vectorRank": 2 + "vectorRank": 2, + "keywordRank": 10, + "matchedTerms": [ + "retrieve", + "retriev", + "function" + ] } }, { "rank": 3, - "score": 0.009375, - "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", - "startLine": 334, - "endLine": 415, + "score": 0.014604550379198266, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0, - "rawVectorScore": 0.8315328061580658, - "rawKeywordScore": 0, + "vectorScore": 0.008450704225352112, + "keywordScore": 0.006153846153846154, + "rawVectorScore": 0.7230896055698395, + "rawKeywordScore": 7.606676678864138, "keywordWeight": 0.4, - "vectorRank": 3 + "vectorRank": 10, + "keywordRank": 4, + "matchedTerms": [ + "retrieve", + "retriev", + "function" + ] } }, { "rank": 4, - "score": 0.00923076923076923, - "filePath": "../OpenCodeRAG-main/src/indexer/description-stage.ts", - "startLine": 32, - "endLine": 119, + "score": 0.014218381775333858, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 293, + "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0, - "rawVectorScore": 0.8290737271308899, - "rawKeywordScore": 0, + "vectorScore": 0.008955223880597015, + "keywordScore": 0.005263157894736842, + "rawVectorScore": 0.7464181780815125, + "rawKeywordScore": 6.629293724495999, + "keywordWeight": 0.4, + "vectorRank": 6, + "keywordRank": 15, + "matchedTerms": [ + "retrieve", + "retriev" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "KeywordIndex class", + "queryIndex": 26, + "resultCount": 20, + "latencyMs": 142.4, + "topResults": [ + { + "rank": 0, + "score": 0.015474520804114072, + "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", + "startLine": 69, + "endLine": 76, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0.005797101449275362, + "rawVectorScore": 0.793863832950592, + "rawKeywordScore": 7.033284721889844, + "keywordWeight": 0.4, + "vectorRank": 1, + "keywordRank": 8, + "matchedTerms": [ + "keywordindex", + "keyword", + "index" + ] + } + }, + { + "rank": 1, + "score": 0.015015829941203075, + "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.008955223880597015, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.7466518878936768, + "rawKeywordScore": 7.033284721889844, + "keywordWeight": 0.4, + "vectorRank": 6, + "keywordRank": 5, + "matchedTerms": [ + "keywordindex", + "keyword", + "index" + ] + } + }, + { + "rank": 2, + "score": 0.014457314457314458, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, + "language": "typescript", + "explanation": { + "vectorScore": 0.008108108108108109, + "keywordScore": 0.006349206349206349, + "rawVectorScore": 0.7277529537677765, + "rawKeywordScore": 9.758726665703923, + "keywordWeight": 0.4, + "vectorRank": 13, + "keywordRank": 2, + "matchedTerms": [ + "keywordindex", + "keyword", + "index", + "class" + ] + } + }, + { + "rank": 3, + "score": 0.014231669969374887, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 1044, + "endLine": 1061, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0.004395604395604396, + "rawVectorScore": 0.802352249622345, + "rawKeywordScore": 7.033284721889844, + "keywordWeight": 0.4, + "vectorRank": 0, + "keywordRank": 30, + "matchedTerms": [ + "keywordindex", + "keyword", + "index" + ] + } + }, + { + "rank": 4, + "score": 0.014136904761904762, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 293, + "endLine": 299, + "language": "typescript", + "explanation": { + "vectorScore": 0.009375, + "keywordScore": 0.004761904761904762, + "rawVectorScore": 0.7543212175369263, + "rawKeywordScore": 7.033284721889844, + "keywordWeight": 0.4, + "vectorRank": 3, + "keywordRank": 23, + "matchedTerms": [ + "keywordindex", + "keyword", + "index" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "embedder factory", + "queryIndex": 27, + "resultCount": 20, + "latencyMs": 143.9, + "topResults": [ + { + "rank": 0, + "score": 0.015550351288056204, + "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", + "startLine": 23, + "endLine": 46, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0.005714285714285714, + "rawVectorScore": 0.8378231525421143, + "rawKeywordScore": 5.0638886572435915, + "keywordWeight": 0.4, + "vectorRank": 0, + "keywordRank": 9, + "matchedTerms": [ + "embedder", + "embedd" + ] + } + }, + { + "rank": 1, + "score": 0.015493958777540867, + "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", + "startLine": 56, + "endLine": 66, + "language": "typescript", + "explanation": { + "vectorScore": 0.009523809523809523, + "keywordScore": 0.005970149253731343, + "rawVectorScore": 0.7654164731502533, + "rawKeywordScore": 5.0638886572435915, + "keywordWeight": 0.4, + "vectorRank": 2, + "keywordRank": 6, + "matchedTerms": [ + "embedder", + "embedd" + ] + } + }, + { + "rank": 2, + "score": 0.015311222171740118, + "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", + "startLine": 62, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0.005633802816901409, + "rawVectorScore": 0.7703590393066406, + "rawKeywordScore": 5.0638886572435915, + "keywordWeight": 0.4, + "vectorRank": 1, + "keywordRank": 10, + "matchedTerms": [ + "embedder", + "embedd" + ] + } + }, + { + "rank": 3, + "score": 0.0130450194966324, + "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", + "startLine": 388, + "endLine": 436, + "language": "typescript", + "explanation": { + "vectorScore": 0.006593406593406593, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.7087774276733398, + "rawKeywordScore": 10.266062163238725, + "keywordWeight": 0.4, + "vectorRank": 30, + "keywordRank": 1, + "matchedTerms": [ + "embedder", + "embedd", + "factory" + ] + } + }, + { + "rank": 4, + "score": 0.012981082844096542, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.00821917808219178, + "keywordScore": 0.004761904761904762, + "rawVectorScore": 0.7348208427429199, + "rawKeywordScore": 5.0638886572435915, + "keywordWeight": 0.4, + "vectorRank": 12, + "keywordRank": 23, + "matchedTerms": [ + "embedder", + "embedd" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "vector store LanceDB", + "queryIndex": 28, + "resultCount": 20, + "latencyMs": 150.6, + "topResults": [ + { + "rank": 0, + "score": 0.016287678476996297, + "filePath": "../OpenCodeRAG-main/src/vectorstore/factory.ts", + "startLine": 22, + "endLine": 38, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.8406621813774109, + "rawKeywordScore": 14.404583382084791, + "keywordWeight": 0.4, + "vectorRank": 0, + "keywordRank": 1, + "matchedTerms": [ + "vector", + "store", + "lancedb", + "lance" + ] + } + }, + { + "rank": 1, + "score": 0.015831265508684862, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 165, + "endLine": 186, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0.006153846153846154, + "rawVectorScore": 0.8001228272914886, + "rawKeywordScore": 5.940918836457924, + "keywordWeight": 0.4, + "vectorRank": 1, + "keywordRank": 4, + "matchedTerms": [ + "store", + "lance" + ] + } + }, + { + "rank": 2, + "score": 0.015584415584415583, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 189, + "endLine": 192, + "language": "typescript", + "explanation": { + "vectorScore": 0.009523809523809523, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.7964996695518494, + "rawKeywordScore": 5.940918836457924, + "keywordWeight": 0.4, + "vectorRank": 2, + "keywordRank": 5, + "matchedTerms": [ + "store", + "lance" + ] + } + }, + { + "rank": 3, + "score": 0.014837576821773486, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 230, + "endLine": 242, + "language": "typescript", + "explanation": { + "vectorScore": 0.008955223880597015, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.7671596109867096, + "rawKeywordScore": 5.940918836457924, + "keywordWeight": 0.4, + "vectorRank": 6, + "keywordRank": 7, + "matchedTerms": [ + "store", + "lance" + ] + } + }, + { + "rank": 4, + "score": 0.014665801427644388, + "filePath": "../OpenCodeRAG-main/src/web/api.ts", + "startLine": 199, + "endLine": 227, + "language": "typescript", + "explanation": { + "vectorScore": 0.008695652173913044, + "keywordScore": 0.005970149253731343, + "rawVectorScore": 0.7630512416362762, + "rawKeywordScore": 5.940918836457924, + "keywordWeight": 0.4, + "vectorRank": 8, + "keywordRank": 6, + "matchedTerms": [ + "store", + "lance" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "find usages SearchResult", + "queryIndex": 29, + "resultCount": 20, + "latencyMs": 158.6, + "topResults": [ + { + "rank": 0, + "score": 0.016393442622950817, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 366, + "endLine": 465, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.8429126143455505, + "rawKeywordScore": 17.003368879563602, + "keywordWeight": 0.4, + "vectorRank": 0, + "keywordRank": 0, + "matchedTerms": [ + "find", + "usages", + "usage", + "searchresult", + "search", + "result" + ] + } + }, + { + "rank": 1, + "score": 0.015773809523809523, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 280, + "endLine": 287, + "language": "typescript", + "explanation": { + "vectorScore": 0.009523809523809523, + "keywordScore": 0.00625, + "rawVectorScore": 0.8319400548934937, + "rawKeywordScore": 13.802037364346312, + "keywordWeight": 0.4, + "vectorRank": 2, + "keywordRank": 3, + "matchedTerms": [ + "find", + "usages", + "usage", + "search", + "result" + ] + } + }, + { + "rank": 2, + "score": 0.015682382133995035, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 428, + "endLine": 527, + "language": "typescript", + "explanation": { + "vectorScore": 0.00923076923076923, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.8200908601284027, + "rawKeywordScore": 17.003368879563602, + "keywordWeight": 0.4, + "vectorRank": 4, + "keywordRank": 1, + "matchedTerms": [ + "find", + "usages", + "usage", + "searchresult", + "search", + "result" + ] + } + }, + { + "rank": 3, + "score": 0.01543560606060606, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 528, + "endLine": 627, + "language": "typescript", + "explanation": { + "vectorScore": 0.009375, + "keywordScore": 0.006060606060606061, + "rawVectorScore": 0.8217239081859589, + "rawKeywordScore": 13.802037364346312, + "keywordWeight": 0.4, + "vectorRank": 3, + "keywordRank": 5, + "matchedTerms": [ + "find", + "usages", + "usage", + "search", + "result" + ] + } + }, + { + "rank": 4, + "score": 0.01515687140963323, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 290, + "endLine": 299, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0.005479452054794521, + "rawVectorScore": 0.8417533338069916, + "rawKeywordScore": 11.510994031792437, + "keywordWeight": 0.4, + "vectorRank": 1, + "keywordRank": 12, + "matchedTerms": [ + "find", + "usages", + "usage", + "result" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "chunkFile method", + "queryIndex": 30, + "resultCount": 20, + "latencyMs": 145.9, + "topResults": [ + { + "rank": 0, + "score": 0.014776555131372108, + "filePath": "../OpenCodeRAG-main/src/chunker/factory.ts", + "startLine": 232, + "endLine": 256, + "language": "typescript", + "explanation": { + "vectorScore": 0.00821917808219178, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.7935350239276886, + "rawKeywordScore": 13.080329580273405, + "keywordWeight": 0.4, + "vectorRank": 12, + "keywordRank": 0, + "matchedTerms": [ + "chunkfile", + "chunkfil", + "chunk", + "file" + ] + } + }, + { + "rank": 1, + "score": 0.01409138472270666, + "filePath": "../OpenCodeRAG-main/src/chunker/docx.ts", + "startLine": 39, + "endLine": 108, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0.00425531914893617, + "rawVectorScore": 0.8315305709838867, + "rawKeywordScore": 2.6759825682831373, + "keywordWeight": 0.4, + "vectorRank": 0, + "keywordRank": 33, + "matchedTerms": [ + "chunk", + "file" + ] + } + }, + { + "rank": 2, + "score": 0.013871635610766046, + "filePath": "../OpenCodeRAG-main/src/chunker/doc.ts", + "startLine": 40, + "endLine": 109, + "language": "typescript", + "explanation": { + "vectorScore": 0.009523809523809523, + "keywordScore": 0.004347826086956522, + "rawVectorScore": 0.8236623108386993, + "rawKeywordScore": 2.6759825682831373, + "keywordWeight": 0.4, + "vectorRank": 2, + "keywordRank": 31, + "matchedTerms": [ + "chunk", + "file" + ] + } + }, + { + "rank": 3, + "score": 0.013585526315789473, + "filePath": "../OpenCodeRAG-main/src/chunker/excel.ts", + "startLine": 49, + "endLine": 108, + "language": "typescript", + "explanation": { + "vectorScore": 0.009375, + "keywordScore": 0.004210526315789474, + "rawVectorScore": 0.8127363920211792, + "rawKeywordScore": 2.6759825682831373, + "keywordWeight": 0.4, + "vectorRank": 3, + "keywordRank": 34, + "matchedTerms": [ + "chunk", + "file" + ] + } + }, + { + "rank": 4, + "score": 0.013578122011856951, + "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", + "startLine": 148, + "endLine": 247, + "language": "typescript", + "explanation": { + "vectorScore": 0.007228915662650602, + "keywordScore": 0.006349206349206349, + "rawVectorScore": 0.7728691697120667, + "rawKeywordScore": 13.080329580273405, + "keywordWeight": 0.4, + "vectorRank": 22, + "keywordRank": 2, + "matchedTerms": [ + "chunkfile", + "chunkfil", + "chunk", + "file" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "embedBatch function", + "queryIndex": 31, + "resultCount": 20, + "latencyMs": 149.1, + "topResults": [ + { + "rank": 0, + "score": 0.016393442622950817, + "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", + "startLine": 62, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.8466528654098511, + "rawKeywordScore": 12.716554521182438, + "keywordWeight": 0.4, + "vectorRank": 0, + "keywordRank": 0, + "matchedTerms": [ + "embedbatch", + "embed", + "batch", + "function" + ] + } + }, + { + "rank": 1, + "score": 0.014493927125506071, + "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", + "startLine": 91, + "endLine": 112, + "language": "typescript", + "explanation": { + "vectorScore": 0.00923076923076923, + "keywordScore": 0.005263157894736842, + "rawVectorScore": 0.7636113166809082, + "rawKeywordScore": 4.362664880724394, + "keywordWeight": 0.4, + "vectorRank": 4, + "keywordRank": 15, + "matchedTerms": [ + "embed", + "function" + ] + } + }, + { + "rank": 2, + "score": 0.014358108108108109, + "filePath": "../OpenCodeRAG-main/src/indexer/pipeline.ts", + "startLine": 553, + "endLine": 652, + "language": "typescript", + "explanation": { + "vectorScore": 0.008108108108108109, + "keywordScore": 0.00625, + "rawVectorScore": 0.7298257946968079, + "rawKeywordScore": 11.7391715668143, + "keywordWeight": 0.4, + "vectorRank": 13, + "keywordRank": 3, + "matchedTerms": [ + "embedbatch", + "embed", + "batch" + ] + } + }, + { + "rank": 3, + "score": 0.014329454990814453, + "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", + "startLine": 56, + "endLine": 66, + "language": "typescript", + "explanation": { + "vectorScore": 0.008695652173913044, + "keywordScore": 0.005633802816901409, + "rawVectorScore": 0.7416476011276245, + "rawKeywordScore": 4.362664880724394, + "keywordWeight": 0.4, + "vectorRank": 8, + "keywordRank": 10, + "matchedTerms": [ + "embed", + "function" + ] + } + }, + { + "rank": 4, + "score": 0.014285714285714285, + "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", + "startLine": 327, + "endLine": 370, + "language": "typescript", + "explanation": { + "vectorScore": 0.00909090909090909, + "keywordScore": 0.005194805194805195, + "rawVectorScore": 0.7532026171684265, + "rawKeywordScore": 4.362664880724394, + "keywordWeight": 0.4, + "vectorRank": 5, + "keywordRank": 16, + "matchedTerms": [ + "embed", + "function" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "retriever retrieve vector search", + "queryIndex": 32, + "resultCount": 20, + "latencyMs": 153.3, + "topResults": [ + { + "rank": 0, + "score": 0.01571841851494696, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 343, + "endLine": 367, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.8376761972904205, + "rawKeywordScore": 11.778199536380743, + "keywordWeight": 0.4, + "vectorRank": 0, + "keywordRank": 7, + "matchedTerms": [ + "retriev", + "retrieve", + "vector", + "search" + ] + } + }, + { + "rank": 1, + "score": 0.015647568608570053, + "filePath": "../OpenCodeRAG-main/src/plugin.ts", + "startLine": 321, + "endLine": 336, + "language": "typescript", + "explanation": { + "vectorScore": 0.00967741935483871, + "keywordScore": 0.005970149253731343, + "rawVectorScore": 0.8346504867076874, + "rawKeywordScore": 11.778199536380743, + "keywordWeight": 0.4, + "vectorRank": 1, + "keywordRank": 6, + "matchedTerms": [ + "retriev", + "retrieve", + "vector", + "search" + ] + } + }, + { + "rank": 2, + "score": 0.015625, + "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", + "startLine": 184, + "endLine": 236, + "language": "typescript", + "explanation": { + "vectorScore": 0.009375, + "keywordScore": 0.00625, + "rawVectorScore": 0.7943508625030518, + "rawKeywordScore": 11.778199536380743, + "keywordWeight": 0.4, + "vectorRank": 3, + "keywordRank": 3, + "matchedTerms": [ + "retriev", + "retrieve", + "vector", + "search" + ] + } + }, + { + "rank": 3, + "score": 0.014902317128577917, + "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", + "startLine": 25, + "endLine": 101, + "language": "typescript", + "explanation": { + "vectorScore": 0.008450704225352112, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.7678912580013275, + "rawKeywordScore": 11.778199536380743, + "keywordWeight": 0.4, + "vectorRank": 10, + "keywordRank": 1, + "matchedTerms": [ + "retriev", + "retrieve", + "vector", + "search" + ] + } + }, + { + "rank": 4, + "score": 0.014752325329872378, + "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", + "startLine": 293, + "endLine": 299, + "language": "typescript", + "explanation": { + "vectorScore": 0.008955223880597015, + "keywordScore": 0.005797101449275362, + "rawVectorScore": 0.777654618024826, + "rawKeywordScore": 9.487156203826869, + "keywordWeight": 0.4, + "vectorRank": 6, + "keywordRank": 8, + "matchedTerms": [ + "retriev", + "retrieve", + "vector" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "session logger token", + "queryIndex": 33, + "resultCount": 20, + "latencyMs": 137.9, + "topResults": [ + { + "rank": 0, + "score": 0.01597542242703533, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 43, + "endLine": 52, + "language": "typescript", + "explanation": { + "vectorScore": 0.009523809523809523, + "keywordScore": 0.0064516129032258064, + "rawVectorScore": 0.800042986869812, + "rawKeywordScore": 10.552134307163826, + "keywordWeight": 0.4, + "vectorRank": 2, + "keywordRank": 1, + "matchedTerms": [ + "session", + "logger", + "logg", + "token" + ] + } + }, + { + "rank": 1, + "score": 0.01492537313432836, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 158, + "endLine": 183, + "language": "typescript", + "explanation": { + "vectorScore": 0.008955223880597015, + "keywordScore": 0.005970149253731343, + "rawVectorScore": 0.7745591402053833, + "rawKeywordScore": 7.749640102145139, + "keywordWeight": 0.4, + "vectorRank": 6, + "keywordRank": 6, + "matchedTerms": [ + "session", + "logg", + "token" + ] + } + }, + { + "rank": 2, + "score": 0.01456838443139813, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 58, + "endLine": 157, + "language": "typescript", + "explanation": { + "vectorScore": 0.00821917808219178, + "keywordScore": 0.006349206349206349, + "rawVectorScore": 0.7639272212982178, + "rawKeywordScore": 10.552134307163826, + "keywordWeight": 0.4, + "vectorRank": 12, + "keywordRank": 2, + "matchedTerms": [ + "session", + "logger", + "logg", + "token" + ] + } + }, + { + "rank": 3, + "score": 0.014452113891285591, + "filePath": "../OpenCodeRAG-main/src/eval/index.ts", + "startLine": 1, + "endLine": 39, + "language": "text", + "explanation": { + "vectorScore": 0.007894736842105263, + "keywordScore": 0.006557377049180328, + "rawVectorScore": 0.7571290135383606, + "rawKeywordScore": 10.552134307163826, + "keywordWeight": 0.4, + "vectorRank": 15, + "keywordRank": 0, + "matchedTerms": [ + "session", + "logger", + "logg", + "token" + ] + } + }, + { + "rank": 4, + "score": 0.01371956071940156, + "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", + "startLine": 26, + "endLine": 40, + "language": "typescript", + "explanation": { + "vectorScore": 0.009836065573770491, + "keywordScore": 0.0038834951456310682, + "rawVectorScore": 0.8073388338088989, + "rawKeywordScore": 5.11740873760028, + "keywordWeight": 0.4, + "vectorRank": 0, + "keywordRank": 42, + "matchedTerms": [ + "session", + "token" + ] + } + } + ], + "thresholdAnalysis": [ + { + "threshold": 0.85, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.75, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.65, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.5, + "passedCount": 0, + "wouldInject": false + }, + { + "threshold": 0.35, + "passedCount": 0, + "wouldInject": false + } + ] + }, + { + "query": "config validation", + "queryIndex": 34, + "resultCount": 20, + "latencyMs": 133.7, + "topResults": [ + { + "rank": 0, + "score": 0.012955465587044534, + "filePath": "../OpenCodeRAG-main/src/cli/commands/eval.ts", + "startLine": 144, + "endLine": 174, + "language": "typescript", + "explanation": { + "vectorScore": 0.007692307692307692, + "keywordScore": 0.005263157894736842, + "rawVectorScore": 0.6872305274009705, + "rawKeywordScore": 1.6744763086133228, + "keywordWeight": 0.4, + "vectorRank": 17, + "keywordRank": 15, + "matchedTerms": [ + "config" + ] + } + }, + { + "rank": 1, + "score": 0.012941176470588234, + "filePath": "../OpenCodeRAG-main/src/chunker/image.ts", + "startLine": 383, + "endLine": 400, + "language": "typescript", + "explanation": { + "vectorScore": 0.007058823529411764, + "keywordScore": 0.0058823529411764705, + "rawVectorScore": 0.6849385499954224, + "rawKeywordScore": 1.6744763086133228, + "keywordWeight": 0.4, + "vectorRank": 24, + "keywordRank": 7, + "matchedTerms": [ + "config" + ] + } + }, + { + "rank": 2, + "score": 0.012695139911634758, + "filePath": "../OpenCodeRAG-main/src/core/resolve-api-key.ts", + "startLine": 12, + "endLine": 23, + "language": "typescript", + "explanation": { + "vectorScore": 0.008571428571428572, + "keywordScore": 0.004123711340206186, + "rawVectorScore": 0.693453848361969, + "rawKeywordScore": 1.6744763086133228, + "keywordWeight": 0.4, + "vectorRank": 9, + "keywordRank": 36, + "matchedTerms": [ + "config" + ] + } + }, + { + "rank": 3, + "score": 0.012403846153846154, + "filePath": "../OpenCodeRAG-main/src/chunker/image.ts", + "startLine": 143, + "endLine": 149, + "language": "typescript", + "explanation": { + "vectorScore": 0.0062499999999999995, + "keywordScore": 0.006153846153846154, + "rawVectorScore": 0.6809921264648438, + "rawKeywordScore": 1.6744763086133228, + "keywordWeight": 0.4, + "vectorRank": 35, + "keywordRank": 4, + "matchedTerms": [ + "config" + ] + } + }, + { + "rank": 4, + "score": 0.012242332830568125, + "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", + "startLine": 64, + "endLine": 86, + "language": "typescript", + "explanation": { + "vectorScore": 0.008823529411764706, + "keywordScore": 0.003418803418803419, + "rawVectorScore": 0.6992982029914856, + "rawKeywordScore": 1.6744763086133228, "keywordWeight": 0.4, - "vectorRank": 4 + "vectorRank": 7, + "keywordRank": 56, + "matchedTerms": [ + "config" + ] } } ], diff --git a/src/eval/compare-rankings.ts b/src/eval/compare-rankings.ts index 04710ac..c061a9d 100644 --- a/src/eval/compare-rankings.ts +++ b/src/eval/compare-rankings.ts @@ -200,13 +200,10 @@ async function main() { console.log(" Minor differences exist beyond position 5.\n"); } else { console.log(" ◆ Ranking order differs between branches.\n"); - } - - if (avg(kendalls) > 0.999) { - console.log(" Explanation:"); - console.log(" Both scoring methods are monotonic transforms of the same"); - console.log(" raw vector similarity scores. When only one signal (vector)"); - console.log(" contributes, rank order is preserved.\n"); + console.log(" With keyword contributions active, RRF and linear fusion"); + console.log(" produce different rank orderings. RRF rewards results that"); + console.log(" rank highly in BOTH signals over results that rank well in"); + console.log(" only ONE signal.\n"); } // Also show queries where keyword matched @@ -287,10 +284,11 @@ async function main() { report.push(""); report.push("| # | Query | Top-1 same | Top-5 same | Full same | τ | main score | branch score |"); report.push("|---|---|:---:|:---:|:---:|:---:|:---:|:---:|"); - for (const pq of perQuery) { + for (let i = 0; i < perQuery.length; i++) { + const pq = perQuery[i]!; const q = pq.query.length > 48 ? pq.query.substring(0, 45) + "..." : pq.query; report.push( - "| " + (pq.queryIndex + 1) + " | " + q + + "| " + (i + 1) + " | " + q + " | " + (pq.top1Same ? "✓" : "✗") + " | " + (pq.top5Same ? "✓" : "✗") + " | " + (pq.topKFullSame ? "✓" : "✗") + diff --git a/src/eval/fast-index.ts b/src/eval/fast-index.ts index 6f2e1d4..707e191 100644 --- a/src/eval/fast-index.ts +++ b/src/eval/fast-index.ts @@ -6,7 +6,7 @@ * Usage: node --import tsx src/eval/fast-index.ts --descriptions doc/chunk-descriptions.json */ -import { readFileSync, readdirSync, statSync } from "node:fs"; +import { readFileSync, readdirSync } from "node:fs"; import fs from "node:fs/promises"; import path from "node:path"; import { loadConfig, DEFAULT_CONFIG } from "../core/config.js"; @@ -306,7 +306,7 @@ async function main() { console.log(" Building keyword index..."); const ki = new KeywordIndex(); ki.addChunks(validChunks); - await ki.save(path.join(STORE_PATH, "keyword-index.json")); + await ki.save(STORE_PATH); console.log(` Keyword index saved (${ki.count()} entries)`); console.log("\n Fast indexing complete!\n"); diff --git a/src/eval/run-branch-compare.ts b/src/eval/run-branch-compare.ts index 92d122b..29b5459 100644 --- a/src/eval/run-branch-compare.ts +++ b/src/eval/run-branch-compare.ts @@ -49,6 +49,17 @@ const QUERIES: string[] = [ "What is the FETCH_OVERFETCH_FACTOR constant?", "How does the TUI settings menu work?", "How are image descriptions generated?", + // Set B — Code-identifier queries (test hybrid search with keyword contributions) + "retrieve function", + "KeywordIndex class", + "embedder factory", + "vector store LanceDB", + "find usages SearchResult", + "chunkFile method", + "embedBatch function", + "retriever retrieve vector search", + "session logger token", + "config validation", ]; const THRESHOLDS = [0.85, 0.75, 0.65, 0.50, 0.35]; From a55d602eb31b8c87fedbab964fe0ee4083b1af09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Mon, 6 Jul 2026 13:42:07 +0200 Subject: [PATCH 14/15] Refactor tests and retrieval logic for improved score normalization and backup handling - Updated related file score assertions in create-read-tool tests to allow for variable decimal scores. - Adjusted retrieval logic in retriever tests to reflect changes in RRF score calculations and updated minimum score thresholds. - Modified LanceDbStore clear and dropDatabase methods to include optional backup functionality, ensuring data safety during destructive operations. - Enhanced fast-index script to support a force flag for clearing the store, preventing accidental data loss. --- doc/eval-ranking-report.md | 74 +- doc/eval-results-t1-cosine-l2.json | 1806 ++++++++--------- .../opencode/create-read-tool.test.ts | 8 +- src/__tests__/retriever/retriever.test.ts | 19 +- src/__tests__/vectorstore/lancedb.test.ts | 26 +- src/eval/fast-index.ts | 27 +- src/retriever/retriever.ts | 6 +- src/vectorstore/lancedb.ts | 45 +- 8 files changed, 1033 insertions(+), 978 deletions(-) diff --git a/doc/eval-ranking-report.md b/doc/eval-ranking-report.md index a28713d..45e6298 100644 --- a/doc/eval-ranking-report.md +++ b/doc/eval-ranking-report.md @@ -1,7 +1,7 @@ # Ranking Order Comparison -**main (734fc60)** vs **t1-cosine-l2 (2fd954d)** -**Generated:** 2026-07-06T09:25:32.375Z +**main (734fc60)** vs **t1-cosine-l2 (95fd596)** +**Generated:** 2026-07-06T11:12:41.259Z ## Config @@ -31,38 +31,38 @@ | # | Query | Top-1 same | Top-5 same | Full same | τ | main score | branch score | |---|---|:---:|:---:|:---:|:---:|:---:|:---:| -| 1 | How does the retrieval pipeline work end-to-end? | ✗ | ✗ | ✗ | -0.333 | 0.896 | 0.015 | -| 2 | How does the plugin interact with chat messages? | ✓ | ✗ | ✗ | 0.333 | 0.988 | 0.016 | -| 3 | How does the keyword index combine with vecto... | ✗ | ✗ | ✗ | -1.000 | 0.897 | 0.016 | -| 4 | Where is the embedder factory defined? | ✗ | ✗ | ✗ | 0.333 | 0.900 | 0.014 | -| 5 | Where is the LanceDB store implementation? | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.016 | -| 6 | Find all usages of the retrieve function | ✓ | ✗ | ✗ | 1.000 | 1.000 | 0.016 | -| 7 | Find all usages of SearchResult type | ✓ | ✗ | ✗ | 1.000 | 0.992 | 0.016 | -| 8 | How does the chunker factory register new lan... | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.016 | -| 9 | What is the default minScore configuration? | ✗ | ✗ | ✗ | -1.000 | 0.914 | 0.014 | -| 10 | How does the session logger capture token usage? | ✗ | ✗ | ✗ | -0.333 | 0.919 | 0.016 | -| 11 | How does L2 normalization affect vector searc... | ✗ | ✗ | ✗ | 0.333 | 0.900 | 0.015 | -| 12 | What is the MetadataFilter interface used for? | ✗ | ✗ | ✗ | 1.000 | 0.921 | 0.014 | -| 13 | How does the background indexer handle file c... | ✓ | ✗ | ✗ | 1.000 | 0.995 | 0.016 | -| 14 | Where is the config validation logic? | ✗ | ✗ | ✗ | -1.000 | 0.900 | 0.013 | -| 15 | How are PDF documents chunked and indexed? | ✗ | ✗ | ✗ | -1.000 | 0.900 | 0.014 | -| 16 | What embedding providers are supported? | ✗ | ✗ | ✗ | 0.333 | 0.882 | 0.015 | -| 17 | How does the CLI parse and dispatch commands? | ✗ | ✗ | ✗ | 0.333 | 0.938 | 0.016 | -| 18 | How does the session logger persist events? | ✗ | ✗ | ✗ | 1.000 | 0.822 | 0.016 | -| 19 | What is the manifest schema version used for? | ✗ | ✗ | ✗ | -0.333 | 0.962 | 0.014 | -| 20 | How does the OpenCode plugin register tools? | ✗ | ✗ | ✗ | 0.333 | 0.932 | 0.016 | -| 21 | Where is the globMatch function defined? | ✓ | ✗ | ✗ | 0.000 | 0.963 | 0.015 | -| 22 | How does the proxy-aware HTTP client work? | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.015 | -| 23 | What is the FETCH_OVERFETCH_FACTOR constant? | ✓ | ✗ | ✗ | 1.000 | 0.955 | 0.013 | -| 24 | How does the TUI settings menu work? | ✓ | ✗ | ✗ | 1.000 | 0.954 | 0.016 | -| 25 | How are image descriptions generated? | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.015 | -| 26 | retrieve function | ✓ | ✗ | ✗ | 0.667 | 1.000 | 0.015 | -| 27 | KeywordIndex class | ✗ | ✗ | ✗ | 1.000 | 0.914 | 0.015 | -| 28 | embedder factory | ✗ | ✗ | ✗ | -0.333 | 0.900 | 0.016 | -| 29 | vector store LanceDB | ✓ | ✗ | ✗ | 1.000 | 1.000 | 0.016 | -| 30 | find usages SearchResult | ✓ | ✗ | ✗ | 0.667 | 1.000 | 0.016 | -| 31 | chunkFile method | ✓ | ✗ | ✗ | 0.333 | 0.950 | 0.015 | -| 32 | embedBatch function | ✓ | ✗ | ✗ | 1.000 | 1.000 | 0.016 | -| 33 | retriever retrieve vector search | ✗ | ✗ | ✗ | 1.000 | 0.872 | 0.016 | -| 34 | session logger token | ✓ | ✗ | ✗ | 0.333 | 0.990 | 0.016 | -| 35 | config validation | ✗ | ✗ | ✗ | -1.000 | 0.900 | 0.013 | +| 1 | How does the retrieval pipeline work end-to-end? | ✗ | ✗ | ✗ | -0.333 | 0.896 | 0.922 | +| 2 | How does the plugin interact with chat messages? | ✓ | ✗ | ✗ | 0.333 | 0.988 | 0.981 | +| 3 | How does the keyword index combine with vecto... | ✗ | ✗ | ✗ | -1.000 | 0.897 | 0.949 | +| 4 | Where is the embedder factory defined? | ✗ | ✗ | ✗ | 0.333 | 0.900 | 0.877 | +| 5 | Where is the LanceDB store implementation? | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.968 | +| 6 | Find all usages of the retrieve function | ✓ | ✗ | ✗ | 1.000 | 1.000 | 1.000 | +| 7 | Find all usages of SearchResult type | ✓ | ✗ | ✗ | 1.000 | 0.992 | 0.990 | +| 8 | How does the chunker factory register new lan... | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.981 | +| 9 | What is the default minScore configuration? | ✗ | ✗ | ✗ | -1.000 | 0.914 | 0.876 | +| 10 | How does the session logger capture token usage? | ✗ | ✗ | ✗ | -0.333 | 0.919 | 0.951 | +| 11 | How does L2 normalization affect vector searc... | ✗ | ✗ | ✗ | 0.333 | 0.900 | 0.925 | +| 12 | What is the MetadataFilter interface used for? | ✗ | ✗ | ✗ | 1.000 | 0.921 | 0.846 | +| 13 | How does the background indexer handle file c... | ✓ | ✗ | ✗ | 1.000 | 0.995 | 0.987 | +| 14 | Where is the config validation logic? | ✗ | ✗ | ✗ | -1.000 | 0.900 | 0.789 | +| 15 | How are PDF documents chunked and indexed? | ✗ | ✗ | ✗ | -1.000 | 0.900 | 0.864 | +| 16 | What embedding providers are supported? | ✗ | ✗ | ✗ | 0.333 | 0.882 | 0.908 | +| 17 | How does the CLI parse and dispatch commands? | ✗ | ✗ | ✗ | 0.333 | 0.938 | 0.959 | +| 18 | How does the session logger persist events? | ✗ | ✗ | ✗ | 1.000 | 0.822 | 0.959 | +| 19 | What is the manifest schema version used for? | ✗ | ✗ | ✗ | -0.333 | 0.962 | 0.852 | +| 20 | How does the OpenCode plugin register tools? | ✗ | ✗ | ✗ | 0.333 | 0.932 | 0.957 | +| 21 | Where is the globMatch function defined? | ✓ | ✗ | ✗ | 0.000 | 0.963 | 0.915 | +| 22 | How does the proxy-aware HTTP client work? | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.944 | +| 23 | What is the FETCH_OVERFETCH_FACTOR constant? | ✓ | ✗ | ✗ | 1.000 | 0.955 | 0.816 | +| 24 | How does the TUI settings menu work? | ✓ | ✗ | ✗ | 1.000 | 0.954 | 0.984 | +| 25 | How are image descriptions generated? | ✗ | ✗ | ✗ | 1.000 | 0.900 | 0.931 | +| 26 | retrieve function | ✓ | ✗ | ✗ | 0.667 | 1.000 | 0.939 | +| 27 | KeywordIndex class | ✗ | ✗ | ✗ | 1.000 | 0.914 | 0.944 | +| 28 | embedder factory | ✗ | ✗ | ✗ | -0.333 | 0.900 | 0.949 | +| 29 | vector store LanceDB | ✓ | ✗ | ✗ | 1.000 | 1.000 | 0.994 | +| 30 | find usages SearchResult | ✓ | ✗ | ✗ | 0.667 | 1.000 | 1.000 | +| 31 | chunkFile method | ✓ | ✗ | ✗ | 0.333 | 0.950 | 0.901 | +| 32 | embedBatch function | ✓ | ✗ | ✗ | 1.000 | 1.000 | 1.000 | +| 33 | retriever retrieve vector search | ✗ | ✗ | ✗ | 1.000 | 0.872 | 0.959 | +| 34 | session logger token | ✓ | ✗ | ✗ | 0.333 | 0.990 | 0.975 | +| 35 | config validation | ✗ | ✗ | ✗ | -1.000 | 0.900 | 0.790 | diff --git a/doc/eval-results-t1-cosine-l2.json b/doc/eval-results-t1-cosine-l2.json index 9f50e3f..0e7ae6a 100644 --- a/doc/eval-results-t1-cosine-l2.json +++ b/doc/eval-results-t1-cosine-l2.json @@ -1,7 +1,7 @@ { "branch": "t1-cosine-l2", - "commit": "2fd954d", - "timestamp": "2026-07-06T09:23:48.604Z", + "commit": "95fd596", + "timestamp": "2026-07-06T11:11:45.985Z", "config": { "embeddingProvider": "ollama", "embeddingModel": "qwen3-embedding:0.6b", @@ -16,18 +16,18 @@ "query": "How does the retrieval pipeline work end-to-end?", "queryIndex": 0, "resultCount": 20, - "latencyMs": 261.6, + "latencyMs": 247.3, "topResults": [ { "rank": 0, - "score": 0.01510907003444317, + "score": 0.9216532721010333, "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.006153846153846154, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.3753846153846154, "rawVectorScore": 0.7622430622577667, "rawKeywordScore": 8.513966001470433, "keywordWeight": 0.4, @@ -43,14 +43,14 @@ }, { "rank": 1, - "score": 0.015044858523119393, + "score": 0.917736369910283, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 799, "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.006349206349206349, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.3873015873015873, "rawVectorScore": 0.7566157877445221, "rawKeywordScore": 13.679000519189877, "keywordWeight": 0.4, @@ -66,14 +66,14 @@ }, { "rank": 2, - "score": 0.014973262032085561, + "score": 0.9133689839572193, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 599, "endLine": 698, "language": "typescript", "explanation": { - "vectorScore": 0.00909090909090909, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.5545454545454546, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.7749603688716888, "rawKeywordScore": 8.513966001470433, "keywordWeight": 0.4, @@ -89,14 +89,14 @@ }, { "rank": 3, - "score": 0.014060606060606062, + "score": 0.8576969696969698, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 184, "endLine": 236, "language": "typescript", "explanation": { - "vectorScore": 0.008, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.48800000000000004, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.7528767585754395, "rawKeywordScore": 8.513966001470433, "keywordWeight": 0.4, @@ -112,14 +112,14 @@ }, { "rank": 4, - "score": 0.013936651583710408, + "score": 0.850135746606335, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 71, "endLine": 80, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.004705882352941177, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.2870588235294118, "rawVectorScore": 0.7752973139286041, "rawKeywordScore": 6.358280942575536, "keywordWeight": 0.4, @@ -136,28 +136,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 6, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -165,18 +165,18 @@ "query": "How does the plugin interact with chat messages?", "queryIndex": 1, "resultCount": 20, - "latencyMs": 141, + "latencyMs": 144.5, "topResults": [ { "rank": 0, - "score": 0.01608118657298985, + "score": 0.980952380952381, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 799, "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.580952380952381, + "keywordScore": 0.4, "rawVectorScore": 0.7745556533336639, "rawKeywordScore": 22.625276878585613, "keywordWeight": 0.4, @@ -195,14 +195,14 @@ }, { "rank": 1, - "score": 0.0151131221719457, + "score": 0.9219004524886879, "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", "startLine": 39, "endLine": 45, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.7691803574562073, "rawKeywordScore": 8.742760625364115, "keywordWeight": 0.4, @@ -217,14 +217,14 @@ }, { "rank": 2, - "score": 0.01510907003444317, + "score": 0.9216532721010333, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 699, "endLine": 798, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.006153846153846154, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.3753846153846154, "rawVectorScore": 0.7685944736003876, "rawKeywordScore": 9.987977277632007, "keywordWeight": 0.4, @@ -240,14 +240,14 @@ }, { "rank": 3, - "score": 0.014570361145703611, + "score": 0.8887920298879204, "filePath": "../OpenCodeRAG-main/src/types/opencode-plugin.d.ts", "startLine": 25, "endLine": 53, "language": "typescript", "explanation": { - "vectorScore": 0.00909090909090909, - "keywordScore": 0.005479452054794521, + "vectorScore": 0.5545454545454546, + "keywordScore": 0.33424657534246577, "rawVectorScore": 0.7691034972667694, "rawKeywordScore": 8.742760625364115, "keywordWeight": 0.4, @@ -262,14 +262,14 @@ }, { "rank": 4, - "score": 0.014409937888198759, + "score": 0.8790062111801242, "filePath": "../OpenCodeRAG-main/src/describer/describer.ts", "startLine": 40, "endLine": 47, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.005714285714285714, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.3485714285714286, "rawVectorScore": 0.7650110423564911, "rawKeywordScore": 8.742760625364115, "keywordWeight": 0.4, @@ -286,28 +286,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 13, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -315,18 +315,18 @@ "query": "How does the keyword index combine with vector search?", "queryIndex": 2, "resultCount": 20, - "latencyMs": 134.4, + "latencyMs": 149, "topResults": [ { "rank": 0, - "score": 0.01555977229601518, + "score": 0.9491461100569261, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 184, "endLine": 236, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.7983307838439941, "rawKeywordScore": 11.486179711065684, "keywordWeight": 0.4, @@ -343,14 +343,14 @@ }, { "rank": 1, - "score": 0.014964270701975618, + "score": 0.9128205128205129, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 321, "endLine": 336, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.005128205128205128, + "vectorScore": 0.6, + "keywordScore": 0.3128205128205129, "rawVectorScore": 0.8030349910259247, "rawKeywordScore": 9.45674858996051, "keywordWeight": 0.4, @@ -366,14 +366,14 @@ }, { "rank": 2, - "score": 0.014945652173913044, + "score": 0.9116847826086958, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 428, "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.00625, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.7647458612918854, "rawKeywordScore": 13.82266635573541, "keywordWeight": 0.4, @@ -391,14 +391,14 @@ }, { "rank": 3, - "score": 0.014884135472370767, + "score": 0.9079322638146168, "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.008823529411764706, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.538235294117647, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.7698828876018524, "rawKeywordScore": 11.486179711065684, "keywordWeight": 0.4, @@ -415,14 +415,14 @@ }, { "rank": 4, - "score": 0.014438291139240507, + "score": 0.8807357594936709, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 343, "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.005063291139240506, + "vectorScore": 0.571875, + "keywordScore": 0.3088607594936709, "rawVectorScore": 0.7926949858665466, "rawKeywordScore": 9.45674858996051, "keywordWeight": 0.4, @@ -440,28 +440,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 19, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -469,18 +469,18 @@ "query": "Where is the embedder factory defined?", "queryIndex": 3, "resultCount": 20, - "latencyMs": 149.7, + "latencyMs": 136.9, "topResults": [ { "rank": 0, - "score": 0.014381520119225038, + "score": 0.8772727272727272, "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", "startLine": 23, "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.004545454545454546, + "vectorScore": 0.6, + "keywordScore": 0.2772727272727273, "rawVectorScore": 0.821034848690033, "rawKeywordScore": 6.940389354926737, "keywordWeight": 0.4, @@ -495,14 +495,14 @@ }, { "rank": 1, - "score": 0.013844086021505376, + "score": 0.844489247311828, "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", "startLine": 56, "endLine": 66, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.004166666666666667, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.2541666666666667, "rawVectorScore": 0.7910988032817841, "rawKeywordScore": 5.0638886572435915, "keywordWeight": 0.4, @@ -516,14 +516,14 @@ }, { "rank": 2, - "score": 0.013605442176870748, + "score": 0.8299319727891157, "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", "startLine": 62, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.004081632653061225, + "vectorScore": 0.580952380952381, + "keywordScore": 0.2489795918367347, "rawVectorScore": 0.7568196654319763, "rawKeywordScore": 5.0638886572435915, "keywordWeight": 0.4, @@ -537,14 +537,14 @@ }, { "rank": 3, - "score": 0.013567073170731707, + "score": 0.8275914634146342, "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", "startLine": 388, "endLine": 436, "language": "typescript", "explanation": { - "vectorScore": 0.007317073170731707, - "keywordScore": 0.00625, + "vectorScore": 0.44634146341463415, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.7243208289146423, "rawKeywordScore": 12.14256286092187, "keywordWeight": 0.4, @@ -560,14 +560,14 @@ }, { "rank": 4, - "score": 0.012914823008849557, + "score": 0.7878042035398231, "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", "startLine": 45, "endLine": 61, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.003539823008849558, + "vectorScore": 0.571875, + "keywordScore": 0.21592920353982303, "rawVectorScore": 0.7546127438545227, "rawKeywordScore": 4.110642218847007, "keywordWeight": 0.4, @@ -583,28 +583,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -612,18 +612,18 @@ "query": "Where is the LanceDB store implementation?", "queryIndex": 4, "resultCount": 20, - "latencyMs": 142.5, + "latencyMs": 132.1, "topResults": [ { "rank": 0, - "score": 0.015873015873015872, + "score": 0.9682539682539684, "filePath": "../OpenCodeRAG-main/src/vectorstore/factory.ts", "startLine": 22, "endLine": 38, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.006349206349206349, + "vectorScore": 0.580952380952381, + "keywordScore": 0.3873015873015873, "rawVectorScore": 0.799913078546524, "rawKeywordScore": 11.546720902753922, "keywordWeight": 0.4, @@ -638,14 +638,14 @@ }, { "rank": 1, - "score": 0.015633167023045853, + "score": 0.9536231884057971, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 165, "endLine": 186, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.6, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.8130159378051758, "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, @@ -659,14 +659,14 @@ }, { "rank": 2, - "score": 0.015391705069124424, + "score": 0.9388940092165898, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 189, "endLine": 192, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005714285714285714, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.3485714285714286, "rawVectorScore": 0.8067699372768402, "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, @@ -680,14 +680,14 @@ }, { "rank": 3, - "score": 0.014930555555555555, + "score": 0.9107638888888889, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 230, "endLine": 242, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.005555555555555556, + "vectorScore": 0.571875, + "keywordScore": 0.3388888888888889, "rawVectorScore": 0.7796101272106171, "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, @@ -701,14 +701,14 @@ }, { "rank": 4, - "score": 0.014864572047670638, + "score": 0.9067388949079092, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 199, "endLine": 227, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.005633802816901409, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.34366197183098596, "rawVectorScore": 0.7714079320430756, "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, @@ -724,28 +724,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 18, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -753,18 +753,18 @@ "query": "Find all usages of the retrieve function", "queryIndex": 5, "resultCount": 20, - "latencyMs": 143.8, + "latencyMs": 135.4, "topResults": [ { "rank": 0, - "score": 0.016393442622950817, + "score": 1, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 366, "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.6, + "keywordScore": 0.4, "rawVectorScore": 0.7996223568916321, "rawKeywordScore": 23.679610717842714, "keywordWeight": 0.4, @@ -785,14 +785,14 @@ }, { "rank": 1, - "score": 0.015677655677655677, + "score": 0.9563369963369964, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 428, "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.006153846153846154, + "vectorScore": 0.580952380952381, + "keywordScore": 0.3753846153846154, "rawVectorScore": 0.7896517217159271, "rawKeywordScore": 20.903555787626445, "keywordWeight": 0.4, @@ -812,14 +812,14 @@ }, { "rank": 2, - "score": 0.01555977229601518, + "score": 0.9491461100569261, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 293, "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.7925383448600769, "rawKeywordScore": 16.27237814950236, "keywordWeight": 0.4, @@ -836,14 +836,14 @@ }, { "rank": 3, - "score": 0.014708333333333334, + "score": 0.8972083333333334, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 290, "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.005333333333333334, + "vectorScore": 0.571875, + "keywordScore": 0.32533333333333336, "rawVectorScore": 0.7816400825977325, "rawKeywordScore": 11.267447987657134, "keywordWeight": 0.4, @@ -859,14 +859,14 @@ }, { "rank": 4, - "score": 0.014636174636174636, + "score": 0.892806652806653, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 280, "endLine": 287, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.005405405405405406, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.32972972972972975, "rawVectorScore": 0.7804376780986786, "rawKeywordScore": 11.267447987657134, "keywordWeight": 0.4, @@ -884,28 +884,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 16, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -913,18 +913,18 @@ "query": "Find all usages of SearchResult type", "queryIndex": 6, "resultCount": 20, - "latencyMs": 131.9, + "latencyMs": 150.1, "topResults": [ { "rank": 0, - "score": 0.016234796404019036, + "score": 0.9903225806451613, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 366, "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.4, "rawVectorScore": 0.8101376593112946, "rawKeywordScore": 23.238308700996786, "keywordWeight": 0.4, @@ -945,14 +945,14 @@ }, { "rank": 1, - "score": 0.01543560606060606, + "score": 0.9415719696969698, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 528, "endLine": 627, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.571875, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.805400013923645, "rawKeywordScore": 17.260922255563226, "keywordWeight": 0.4, @@ -971,14 +971,14 @@ }, { "rank": 2, - "score": 0.015406836783822823, + "score": 0.9398170438131921, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 428, "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.7851665318012238, "rawKeywordScore": 18.62773244221438, "keywordWeight": 0.4, @@ -997,14 +997,14 @@ }, { "rank": 3, - "score": 0.015169398907103825, + "score": 0.9253333333333333, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 290, "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.005333333333333334, + "vectorScore": 0.6, + "keywordScore": 0.32533333333333336, "rawVectorScore": 0.815750241279602, "rawKeywordScore": 13.135357594443214, "keywordWeight": 0.4, @@ -1021,14 +1021,14 @@ }, { "rank": 4, - "score": 0.015027870680044592, + "score": 0.9167001114827202, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 280, "endLine": 287, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.8050737380981445, "rawKeywordScore": 15.426400926997088, "keywordWeight": 0.4, @@ -1048,28 +1048,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 16, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -1077,18 +1077,18 @@ "query": "How does the chunker factory register new languages?", "queryIndex": 7, "resultCount": 20, - "latencyMs": 149.6, + "latencyMs": 140.7, "topResults": [ { "rank": 0, - "score": 0.016086065573770493, + "score": 0.98125, "filePath": "../OpenCodeRAG-main/src/chunker/factory.ts", "startLine": 97, "endLine": 115, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.00625, + "vectorScore": 0.6, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.8381350338459015, "rawKeywordScore": 12.431347805284023, "keywordWeight": 0.4, @@ -1105,14 +1105,14 @@ }, { "rank": 1, - "score": 0.01544011544011544, + "score": 0.9418470418470419, "filePath": "../OpenCodeRAG-main/src/chunker/loader.ts", "startLine": 19, "endLine": 43, "language": "typescript", "explanation": { - "vectorScore": 0.00909090909090909, - "keywordScore": 0.006349206349206349, + "vectorScore": 0.5545454545454546, + "keywordScore": 0.3873015873015873, "rawVectorScore": 0.7848783433437347, "rawKeywordScore": 15.053348043922359, "keywordWeight": 0.4, @@ -1129,14 +1129,14 @@ }, { "rank": 2, - "score": 0.014511310285958173, + "score": 0.8851899274434486, "filePath": "../OpenCodeRAG-main/src/chunker/loader.ts", "startLine": 56, "endLine": 70, "language": "typescript", "explanation": { - "vectorScore": 0.008450704225352112, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.5154929577464789, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.7729448676109314, "rawKeywordScore": 12.026343420519646, "keywordWeight": 0.4, @@ -1153,14 +1153,14 @@ }, { "rank": 3, - "score": 0.013457556935817806, + "score": 0.8209109730848863, "filePath": "../OpenCodeRAG-main/src/chunker/base.ts", "startLine": 26, "endLine": 55, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.004761904761904762, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.2904761904761905, "rawVectorScore": 0.7798387110233307, "rawKeywordScore": 7.854788943314285, "keywordWeight": 0.4, @@ -1176,14 +1176,14 @@ }, { "rank": 4, - "score": 0.012242562929061784, + "score": 0.746796338672769, "filePath": "../OpenCodeRAG-main/src/chunker/factory.ts", "startLine": 232, "endLine": 256, "language": "typescript", "explanation": { - "vectorScore": 0.007894736842105263, - "keywordScore": 0.004347826086956522, + "vectorScore": 0.48157894736842105, + "keywordScore": 0.26521739130434785, "rawVectorScore": 0.76323202252388, "rawKeywordScore": 7.854788943314285, "keywordWeight": 0.4, @@ -1201,28 +1201,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 13, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -1230,18 +1230,18 @@ "query": "What is the default minScore configuration?", "queryIndex": 8, "resultCount": 20, - "latencyMs": 136.4, + "latencyMs": 145.3, "topResults": [ { "rank": 0, - "score": 0.014368530020703934, + "score": 0.8764803312629401, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 343, "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.008571428571428572, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.5228571428571429, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.720088392496109, "rawKeywordScore": 14.945573785780137, "keywordWeight": 0.4, @@ -1258,14 +1258,14 @@ }, { "rank": 1, - "score": 0.014302981466559226, + "score": 0.8724818694601129, "filePath": "../OpenCodeRAG-main/src/core/runtime-overrides.ts", "startLine": 12, "endLine": 54, "language": "typescript", "explanation": { - "vectorScore": 0.008823529411764706, - "keywordScore": 0.005479452054794521, + "vectorScore": 0.538235294117647, + "keywordScore": 0.33424657534246577, "rawVectorScore": 0.7215653657913208, "rawKeywordScore": 12.609087141110411, "keywordWeight": 0.4, @@ -1281,14 +1281,14 @@ }, { "rank": 2, - "score": 0.01384493670886076, + "score": 0.8445411392405064, "filePath": "../OpenCodeRAG-main/src/tui.ts", "startLine": 427, "endLine": 526, "language": "typescript", "explanation": { - "vectorScore": 0.007594936708860759, - "keywordScore": 0.00625, + "vectorScore": 0.46329113924050636, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.7123583853244781, "rawKeywordScore": 16.975004906885314, "keywordWeight": 0.4, @@ -1306,14 +1306,14 @@ }, { "rank": 3, - "score": 0.01327117327117327, + "score": 0.8095415695415696, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 412, "endLine": 448, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.00404040404040404, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.2464646464646465, "rawVectorScore": 0.7257089614868164, "rawKeywordScore": 5.380057063460264, "keywordWeight": 0.4, @@ -1327,14 +1327,14 @@ }, { "rank": 4, - "score": 0.012903225806451613, + "score": 0.7870967741935484, "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.0064516129032258064, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.3935483870967742, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.7039834856987, "rawKeywordScore": 18.85150560456846, "keywordWeight": 0.4, @@ -1355,28 +1355,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -1384,18 +1384,18 @@ "query": "How does the session logger capture token usage?", "queryIndex": 9, "resultCount": 20, - "latencyMs": 128.4, + "latencyMs": 137.6, "topResults": [ { "rank": 0, - "score": 0.015584415584415583, + "score": 0.9506493506493507, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 43, "endLine": 52, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.580952380952381, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.8369814157485962, "rawKeywordScore": 10.552134307163826, "keywordWeight": 0.4, @@ -1411,14 +1411,14 @@ }, { "rank": 1, - "score": 0.015380906460945034, + "score": 0.9382352941176471, "filePath": "../OpenCodeRAG-main/src/eval/index.ts", "startLine": 1, "endLine": 39, "language": "text", "explanation": { - "vectorScore": 0.008823529411764706, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.538235294117647, + "keywordScore": 0.4, "rawVectorScore": 0.8056229650974274, "rawKeywordScore": 27.43241842421657, "keywordWeight": 0.4, @@ -1438,14 +1438,14 @@ }, { "rank": 2, - "score": 0.015315517628565012, + "score": 0.9342465753424658, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 26, "endLine": 40, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.005479452054794521, + "vectorScore": 0.6, + "keywordScore": 0.33424657534246577, "rawVectorScore": 0.8653715550899506, "rawKeywordScore": 8.065350347317922, "keywordWeight": 0.4, @@ -1460,14 +1460,14 @@ }, { "rank": 3, - "score": 0.015232974910394267, + "score": 0.9292114695340502, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 12, "endLine": 24, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005555555555555556, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.3388888888888889, "rawVectorScore": 0.8500174283981323, "rawKeywordScore": 8.065350347317922, "keywordWeight": 0.4, @@ -1482,14 +1482,14 @@ }, { "rank": 4, - "score": 0.014888010540184453, + "score": 0.9081686429512517, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 158, "endLine": 183, "language": "typescript", "explanation": { - "vectorScore": 0.00909090909090909, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.5545454545454546, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.81332927942276, "rawKeywordScore": 9.779071223250313, "keywordWeight": 0.4, @@ -1507,28 +1507,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 13, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -1536,18 +1536,18 @@ "query": "How does L2 normalization affect vector search scores?", "queryIndex": 10, "resultCount": 20, - "latencyMs": 138.3, + "latencyMs": 191.9, "topResults": [ { "rank": 0, - "score": 0.01515687140963323, + "score": 0.924569155987627, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 343, "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005479452054794521, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.33424657534246577, "rawVectorScore": 0.7657628059387207, "rawKeywordScore": 7.8035209315309295, "keywordWeight": 0.4, @@ -1562,14 +1562,14 @@ }, { "rank": 1, - "score": 0.015079365079365078, + "score": 0.9198412698412699, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 321, "endLine": 336, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.005555555555555556, + "vectorScore": 0.580952380952381, + "keywordScore": 0.3388888888888889, "rawVectorScore": 0.7581153213977814, "rawKeywordScore": 7.8035209315309295, "keywordWeight": 0.4, @@ -1584,14 +1584,14 @@ }, { "rank": 2, - "score": 0.014632034632034632, + "score": 0.8925541125541127, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 412, "endLine": 448, "language": "typescript", "explanation": { - "vectorScore": 0.008571428571428572, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.5228571428571429, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.7314635813236237, "rawKeywordScore": 9.64066934218794, "keywordWeight": 0.4, @@ -1606,14 +1606,14 @@ }, { "rank": 3, - "score": 0.014492753623188406, + "score": 0.8840579710144929, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 184, "endLine": 236, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.7382060885429382, "rawKeywordScore": 7.8035209315309295, "keywordWeight": 0.4, @@ -1628,14 +1628,14 @@ }, { "rank": 4, - "score": 0.014358108108108109, + "score": 0.8758445945945946, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 176, "endLine": 181, "language": "typescript", "explanation": { - "vectorScore": 0.008108108108108109, - "keywordScore": 0.00625, + "vectorScore": 0.4945945945945946, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.7290540933609009, "rawKeywordScore": 9.64066934218794, "keywordWeight": 0.4, @@ -1652,28 +1652,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -1681,18 +1681,18 @@ "query": "What is the MetadataFilter interface used for?", "queryIndex": 11, "resultCount": 20, - "latencyMs": 139.9, + "latencyMs": 141.1, "topResults": [ { "rank": 0, - "score": 0.013876469614174531, + "score": 0.8464646464646465, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 308, "endLine": 313, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.00404040404040404, + "vectorScore": 0.6, + "keywordScore": 0.2464646464646465, "rawVectorScore": 0.7521616518497467, "rawKeywordScore": 8.127817464437936, "keywordWeight": 0.4, @@ -1708,14 +1708,14 @@ }, { "rank": 1, - "score": 0.013313782991202346, + "score": 0.8121407624633431, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 71, "endLine": 80, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.0036363636363636364, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.22181818181818183, "rawVectorScore": 0.7493048906326294, "rawKeywordScore": 7.338661360397543, "keywordWeight": 0.4, @@ -1730,14 +1730,14 @@ }, { "rank": 2, - "score": 0.01321917808219178, + "score": 0.8063698630136987, "filePath": "../OpenCodeRAG-main/src/opencode/read-format.ts", "startLine": 10, "endLine": 21, "language": "typescript", "explanation": { - "vectorScore": 0.00821917808219178, - "keywordScore": 0.005, + "vectorScore": 0.5013698630136987, + "keywordScore": 0.30500000000000005, "rawVectorScore": 0.7223770618438721, "rawKeywordScore": 9.708793548492173, "keywordWeight": 0.4, @@ -1753,14 +1753,14 @@ }, { "rank": 3, - "score": 0.012937062937062937, + "score": 0.7891608391608392, "filePath": "../OpenCodeRAG-main/src/opencode/create-read-tool.ts", "startLine": 191, "endLine": 215, "language": "typescript", "explanation": { - "vectorScore": 0.00909090909090909, - "keywordScore": 0.0038461538461538464, + "vectorScore": 0.5545454545454546, + "keywordScore": 0.23461538461538464, "rawVectorScore": 0.7375127971172333, "rawKeywordScore": 7.645716883962097, "keywordWeight": 0.4, @@ -1775,14 +1775,14 @@ }, { "rank": 4, - "score": 0.01216931216931217, + "score": 0.7423280423280424, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 164, "endLine": 173, "language": "typescript", "explanation": { - "vectorScore": 0.007407407407407407, - "keywordScore": 0.004761904761904762, + "vectorScore": 0.4518518518518519, + "keywordScore": 0.2904761904761905, "rawVectorScore": 0.7146406471729279, "rawKeywordScore": 9.071129937955403, "keywordWeight": 0.4, @@ -1805,23 +1805,23 @@ }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 19, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -1829,18 +1829,18 @@ "query": "How does the background indexer handle file changes?", "queryIndex": 12, "resultCount": 20, - "latencyMs": 161.2, + "latencyMs": 151.5, "topResults": [ { "rank": 0, - "score": 0.016185271922976842, + "score": 0.9873015873015873, "filePath": "../OpenCodeRAG-main/src/watcher.ts", "startLine": 78, "endLine": 177, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.006349206349206349, + "vectorScore": 0.6, + "keywordScore": 0.3873015873015873, "rawVectorScore": 0.834298312664032, "rawKeywordScore": 21.127461055894198, "keywordWeight": 0.4, @@ -1859,14 +1859,14 @@ }, { "rank": 1, - "score": 0.01597542242703533, + "score": 0.9745007680491553, "filePath": "../OpenCodeRAG-main/src/watcher.ts", "startLine": 27, "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.580952380952381, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.8211431503295898, "rawKeywordScore": 21.285792055016966, "keywordWeight": 0.4, @@ -1885,14 +1885,14 @@ }, { "rank": 2, - "score": 0.015311222171740118, + "score": 0.9339845524761472, "filePath": "../OpenCodeRAG-main/src/watcher.ts", "startLine": 21, "endLine": 24, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005633802816901409, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.34366197183098596, "rawVectorScore": 0.8222635090351105, "rawKeywordScore": 12.050435007069142, "keywordWeight": 0.4, @@ -1908,14 +1908,14 @@ }, { "rank": 3, - "score": 0.01471022128556375, + "score": 0.897323498419389, "filePath": "../OpenCodeRAG-main/src/watcher.ts", "startLine": 178, "endLine": 189, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.005479452054794521, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.33424657534246577, "rawVectorScore": 0.7941692173480988, "rawKeywordScore": 11.193626160405827, "keywordWeight": 0.4, @@ -1931,14 +1931,14 @@ }, { "rank": 4, - "score": 0.013701578192252512, + "score": 0.8357962697274032, "filePath": "../OpenCodeRAG-main/src/indexer/stats.ts", "startLine": 41, "endLine": 58, "language": "typescript", "explanation": { - "vectorScore": 0.008823529411764706, - "keywordScore": 0.004878048780487805, + "vectorScore": 0.538235294117647, + "keywordScore": 0.29756097560975614, "rawVectorScore": 0.7871012985706329, "rawKeywordScore": 9.676628481669152, "keywordWeight": 0.4, @@ -1956,28 +1956,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -1985,18 +1985,18 @@ "query": "Where is the config validation logic?", "queryIndex": 13, "resultCount": 20, - "latencyMs": 198, + "latencyMs": 147.2, "topResults": [ { "rank": 0, - "score": 0.01293827160493827, + "score": 0.7892345679012347, "filePath": "../OpenCodeRAG-main/src/retriever/context-optimizer.ts", "startLine": 8, "endLine": 19, "language": "typescript", "explanation": { - "vectorScore": 0.008, - "keywordScore": 0.0049382716049382715, + "vectorScore": 0.48800000000000004, + "keywordScore": 0.3012345679012346, "rawVectorScore": 0.7181599140167236, "rawKeywordScore": 5.580408127401643, "keywordWeight": 0.4, @@ -2011,14 +2011,14 @@ }, { "rank": 1, - "score": 0.011868131868131869, + "score": 0.723956043956044, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 799, "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.005714285714285714, - "keywordScore": 0.006153846153846154, + "vectorScore": 0.3485714285714286, + "keywordScore": 0.3753846153846154, "rawVectorScore": 0.7007447183132172, "rawKeywordScore": 8.42044763650828, "keywordWeight": 0.4, @@ -2033,14 +2033,14 @@ }, { "rank": 2, - "score": 0.011382978723404255, + "score": 0.6943617021276596, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 1313, "endLine": 1391, "language": "typescript", "explanation": { - "vectorScore": 0.006382978723404255, - "keywordScore": 0.005, + "vectorScore": 0.3893617021276596, + "keywordScore": 0.30500000000000005, "rawVectorScore": 0.7044038772583008, "rawKeywordScore": 5.580408127401643, "keywordWeight": 0.4, @@ -2055,14 +2055,14 @@ }, { "rank": 3, - "score": 0.010948275862068965, + "score": 0.667844827586207, "filePath": "../OpenCodeRAG-main/src/tui.ts", "startLine": 283, "endLine": 294, "language": "typescript", "explanation": { - "vectorScore": 0.0075, - "keywordScore": 0.003448275862068966, + "vectorScore": 0.4575, + "keywordScore": 0.21034482758620693, "rawVectorScore": 0.7114178240299225, "rawKeywordScore": 3.7039074297184973, "keywordWeight": 0.4, @@ -2076,14 +2076,14 @@ }, { "rank": 4, - "score": 0.01036699149906697, + "score": 0.6323864814430853, "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", "startLine": 36, "endLine": 53, "language": "typescript", "explanation": { - "vectorScore": 0.006593406593406593, - "keywordScore": 0.0037735849056603774, + "vectorScore": 0.4021978021978022, + "keywordScore": 0.23018867924528305, "rawVectorScore": 0.7052006125450134, "rawKeywordScore": 3.7039074297184973, "keywordWeight": 0.4, @@ -2104,23 +2104,23 @@ }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -2128,18 +2128,18 @@ "query": "How are PDF documents chunked and indexed?", "queryIndex": 14, "resultCount": 20, - "latencyMs": 140.3, + "latencyMs": 143.7, "topResults": [ { "rank": 0, - "score": 0.0141690408357075, + "score": 0.8643114909781577, "filePath": "../OpenCodeRAG-main/src/content/pdf.ts", "startLine": 15, "endLine": 23, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.0049382716049382715, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.3012345679012346, "rawVectorScore": 0.7934660017490387, "rawKeywordScore": 6.705533799836411, "keywordWeight": 0.4, @@ -2153,14 +2153,14 @@ }, { "rank": 1, - "score": 0.013824884792626727, + "score": 0.8433179723502304, "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", "startLine": 120, "endLine": 125, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.004301075268817204, + "vectorScore": 0.580952380952381, + "keywordScore": 0.2623655913978495, "rawVectorScore": 0.7998655140399933, "rawKeywordScore": 6.140786969306384, "keywordWeight": 0.4, @@ -2175,14 +2175,14 @@ }, { "rank": 2, - "score": 0.012532299741602068, + "score": 0.7644702842377261, "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", "startLine": 20, "endLine": 47, "language": "typescript", "explanation": { - "vectorScore": 0.0069767441860465115, - "keywordScore": 0.005555555555555556, + "vectorScore": 0.4255813953488372, + "keywordScore": 0.3388888888888889, "rawVectorScore": 0.7648292779922485, "rawKeywordScore": 8.374928490470245, "keywordWeight": 0.4, @@ -2198,14 +2198,14 @@ }, { "rank": 3, - "score": 0.012395604395604396, + "score": 0.7561318681318683, "filePath": "../OpenCodeRAG-main/src/indexer/pipeline.ts", "startLine": 749, "endLine": 819, "language": "typescript", "explanation": { - "vectorScore": 0.008, - "keywordScore": 0.004395604395604396, + "vectorScore": 0.48800000000000004, + "keywordScore": 0.2681318681318682, "rawVectorScore": 0.7735616862773895, "rawKeywordScore": 6.140786969306384, "keywordWeight": 0.4, @@ -2220,14 +2220,14 @@ }, { "rank": 4, - "score": 0.012345054389071592, + "score": 0.7530483177333671, "filePath": "../OpenCodeRAG-main/src/indexer/description-stage.ts", "startLine": 32, "endLine": 119, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.0033898305084745766, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.20677966101694917, "rawVectorScore": 0.784144252538681, "rawKeywordScore": 4.839129870180977, "keywordWeight": 0.4, @@ -2243,28 +2243,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 12, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -2272,18 +2272,18 @@ "query": "What embedding providers are supported?", "queryIndex": 15, "resultCount": 20, - "latencyMs": 135.9, + "latencyMs": 138.8, "topResults": [ { "rank": 0, - "score": 0.014884135472370767, + "score": 0.9079322638146168, "filePath": "../OpenCodeRAG-main/src/core/provider-defaults.ts", "startLine": 7, "endLine": 16, "language": "typescript", "explanation": { - "vectorScore": 0.008823529411764706, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.538235294117647, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.8289196789264679, "rawKeywordScore": 10.448091959118075, "keywordWeight": 0.4, @@ -2299,14 +2299,14 @@ }, { "rank": 1, - "score": 0.013919413919413919, + "score": 0.8490842490842492, "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", "startLine": 23, "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.004395604395604396, + "vectorScore": 0.580952380952381, + "keywordScore": 0.2681318681318682, "rawVectorScore": 0.8618934750556946, "rawKeywordScore": 6.530629230394111, "keywordWeight": 0.4, @@ -2321,14 +2321,14 @@ }, { "rank": 2, - "score": 0.013887945670628184, + "score": 0.8471646859083193, "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", "startLine": 45, "endLine": 61, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.004210526315789474, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.2568421052631579, "rawVectorScore": 0.8624624907970428, "rawKeywordScore": 6.530629230394111, "keywordWeight": 0.4, @@ -2343,14 +2343,14 @@ }, { "rank": 3, - "score": 0.013876469614174531, + "score": 0.8464646464646465, "filePath": "../OpenCodeRAG-main/src/embedder/ollama.ts", "startLine": 51, "endLine": 97, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.00404040404040404, + "vectorScore": 0.6, + "keywordScore": 0.2464646464646465, "rawVectorScore": 0.8716892302036285, "rawKeywordScore": 6.530629230394111, "keywordWeight": 0.4, @@ -2365,14 +2365,14 @@ }, { "rank": 4, - "score": 0.013828470380194517, + "score": 0.8435366931918657, "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", "startLine": 56, "endLine": 66, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.004597701149425287, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.28045977011494255, "rawVectorScore": 0.8396036028862, "rawKeywordScore": 6.530629230394111, "keywordWeight": 0.4, @@ -2389,28 +2389,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 18, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -2418,18 +2418,18 @@ "query": "How does the CLI parse and dispatch commands?", "queryIndex": 16, "resultCount": 20, - "latencyMs": 136.4, + "latencyMs": 135.8, "topResults": [ { "rank": 0, - "score": 0.01571841851494696, + "score": 0.9588235294117647, "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.6, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.7982566356658936, "rawKeywordScore": 10.478336008139719, "keywordWeight": 0.4, @@ -2445,14 +2445,14 @@ }, { "rank": 1, - "score": 0.014890710382513661, + "score": 0.9083333333333333, "filePath": "../OpenCodeRAG-main/src/cli.ts", "startLine": 1, "endLine": 10, "language": "text", "explanation": { - "vectorScore": 0.008333333333333333, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.5083333333333333, + "keywordScore": 0.4, "rawVectorScore": 0.7459721565246582, "rawKeywordScore": 15.680509514134853, "keywordWeight": 0.4, @@ -2469,14 +2469,14 @@ }, { "rank": 2, - "score": 0.014724711907810498, + "score": 0.8982074263764406, "filePath": "../OpenCodeRAG-main/src/cli/types.ts", "startLine": 7, "endLine": 24, "language": "typescript", "explanation": { - "vectorScore": 0.00909090909090909, - "keywordScore": 0.005633802816901409, + "vectorScore": 0.5545454545454546, + "keywordScore": 0.34366197183098596, "rawVectorScore": 0.7648557126522064, "rawKeywordScore": 8.448904887034544, "keywordWeight": 0.4, @@ -2491,14 +2491,14 @@ }, { "rank": 3, - "score": 0.01461569095977698, + "score": 0.8915571485463959, "filePath": "../OpenCodeRAG-main/src/cli/commands/eval.ts", "startLine": 71, "endLine": 134, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.0049382716049382715, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.3012345679012346, "rawVectorScore": 0.7839367687702179, "rawKeywordScore": 6.214763365870683, "keywordWeight": 0.4, @@ -2512,14 +2512,14 @@ }, { "rank": 4, - "score": 0.014492753623188406, + "score": 0.8840579710144929, "filePath": "../OpenCodeRAG-main/src/cli/commands/ui.ts", "startLine": 22, "endLine": 82, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.7595089375972748, "rawKeywordScore": 10.478336008139719, "keywordWeight": 0.4, @@ -2537,28 +2537,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 17, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 19, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -2566,18 +2566,18 @@ "query": "How does the session logger persist events?", "queryIndex": 17, "resultCount": 20, - "latencyMs": 133.7, + "latencyMs": 156.9, "topResults": [ { "rank": 0, - "score": 0.01571841851494696, + "score": 0.9588235294117647, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 43, "endLine": 52, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.6, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.8729149699211121, "rawKeywordScore": 11.348286077861328, "keywordWeight": 0.4, @@ -2593,14 +2593,14 @@ }, { "rank": 1, - "score": 0.015474520804114072, + "score": 0.9439457690509585, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 58, "endLine": 157, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.866875559091568, "rawKeywordScore": 11.348286077861328, "keywordWeight": 0.4, @@ -2616,14 +2616,14 @@ }, { "rank": 2, - "score": 0.015238095238095238, + "score": 0.9295238095238096, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 158, "endLine": 183, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.005714285714285714, + "vectorScore": 0.580952380952381, + "keywordScore": 0.3485714285714286, "rawVectorScore": 0.8487854301929474, "rawKeywordScore": 10.575222993947818, "keywordWeight": 0.4, @@ -2639,14 +2639,14 @@ }, { "rank": 3, - "score": 0.014864572047670638, + "score": 0.9067388949079092, "filePath": "../OpenCodeRAG-main/src/eval/storage.ts", "startLine": 26, "endLine": 35, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.005633802816901409, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.34366197183098596, "rawVectorScore": 0.8379587531089783, "rawKeywordScore": 10.575222993947818, "keywordWeight": 0.4, @@ -2662,14 +2662,14 @@ }, { "rank": 4, - "score": 0.014360629286002421, + "score": 0.8759983864461476, "filePath": "../OpenCodeRAG-main/src/eval/storage.ts", "startLine": 165, "endLine": 178, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.005405405405405406, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.32972972972972975, "rawVectorScore": 0.8185106813907623, "rawKeywordScore": 10.02807074011448, "keywordWeight": 0.4, @@ -2686,28 +2686,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 9, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 13, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 18, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -2715,18 +2715,18 @@ "query": "What is the manifest schema version used for?", "queryIndex": 18, "resultCount": 20, - "latencyMs": 151.1, + "latencyMs": 141.6, "topResults": [ { "rank": 0, - "score": 0.013972701149425287, + "score": 0.8523347701149426, "filePath": "../OpenCodeRAG-main/src/indexer/pipeline.ts", "startLine": 749, "endLine": 819, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.004597701149425287, + "vectorScore": 0.571875, + "keywordScore": 0.28045977011494255, "rawVectorScore": 0.7366407811641693, "rawKeywordScore": 6.471085544344631, "keywordWeight": 0.4, @@ -2741,14 +2741,14 @@ }, { "rank": 1, - "score": 0.013565085962592103, + "score": 0.8274702437181183, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 799, "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.007594936708860759, - "keywordScore": 0.005970149253731343, + "vectorScore": 0.46329113924050636, + "keywordScore": 0.364179104477612, "rawVectorScore": 0.7220064103603363, "rawKeywordScore": 11.938081691282836, "keywordWeight": 0.4, @@ -2765,14 +2765,14 @@ }, { "rank": 2, - "score": 0.013212608987256874, + "score": 0.8059691482226694, "filePath": "../OpenCodeRAG-main/src/indexer/stats.ts", "startLine": 41, "endLine": 58, "language": "typescript", "explanation": { - "vectorScore": 0.008450704225352112, - "keywordScore": 0.004761904761904762, + "vectorScore": 0.5154929577464789, + "keywordScore": 0.2904761904761905, "rawVectorScore": 0.7307842373847961, "rawKeywordScore": 7.107263334005611, "keywordWeight": 0.4, @@ -2787,14 +2787,14 @@ }, { "rank": 3, - "score": 0.012372448979591836, + "score": 0.7547193877551022, "filePath": "../OpenCodeRAG-main/src/indexer/pipeline.ts", "startLine": 153, "endLine": 252, "language": "typescript", "explanation": { - "vectorScore": 0.006122448979591836, - "keywordScore": 0.00625, + "vectorScore": 0.3734693877551021, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.708729088306427, "rawKeywordScore": 12.41797939417377, "keywordWeight": 0.4, @@ -2811,14 +2811,14 @@ }, { "rank": 4, - "score": 0.012267080745341614, + "score": 0.7482919254658386, "filePath": "../OpenCodeRAG-main/src/tui.ts", "startLine": 89, "endLine": 128, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.0035714285714285718, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.2178571428571429, "rawVectorScore": 0.732252299785614, "rawKeywordScore": 4.594584846661485, "keywordWeight": 0.4, @@ -2834,28 +2834,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 6, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 18, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -2863,18 +2863,18 @@ "query": "How does the OpenCode plugin register tools?", "queryIndex": 19, "resultCount": 20, - "latencyMs": 140.8, + "latencyMs": 150.8, "topResults": [ { "rank": 0, - "score": 0.015682382133995035, + "score": 0.9566253101736975, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 499, "endLine": 598, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.8066220283508301, "rawKeywordScore": 25.1592075988563, "keywordWeight": 0.4, @@ -2894,14 +2894,14 @@ }, { "rank": 1, - "score": 0.01555977229601518, + "score": 0.9491461100569261, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 699, "endLine": 798, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.8430216610431671, "rawKeywordScore": 20.274502744032308, "keywordWeight": 0.4, @@ -2920,14 +2920,14 @@ }, { "rank": 2, - "score": 0.015512600929777343, + "score": 0.9462686567164179, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 799, "endLine": 898, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.4, "rawVectorScore": 0.7970275580883026, "rawKeywordScore": 29.273717830672997, "keywordWeight": 0.4, @@ -2948,14 +2948,14 @@ }, { "rank": 3, - "score": 0.015238095238095238, + "score": 0.9295238095238096, "filePath": "../OpenCodeRAG-main/src/plugin-entry.ts", "startLine": 1, "endLine": 19, "language": "text", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.005714285714285714, + "vectorScore": 0.580952380952381, + "keywordScore": 0.3485714285714286, "rawVectorScore": 0.8296231329441071, "rawKeywordScore": 17.942419523272093, "keywordWeight": 0.4, @@ -2974,14 +2974,14 @@ }, { "rank": 4, - "score": 0.014714114354258297, + "score": 0.8975609756097561, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 1213, "endLine": 1312, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.004878048780487805, + "vectorScore": 0.6, + "keywordScore": 0.29756097560975614, "rawVectorScore": 0.8487226665019989, "rawKeywordScore": 12.828963521467251, "keywordWeight": 0.4, @@ -3000,28 +3000,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 9, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 13, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -3029,18 +3029,18 @@ "query": "Where is the globMatch function defined?", "queryIndex": 20, "resultCount": 20, - "latencyMs": 152.5, + "latencyMs": 136.7, "topResults": [ { "rank": 0, - "score": 0.01500808127453244, + "score": 0.9154929577464789, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 528, "endLine": 627, "language": "typescript", "explanation": { - "vectorScore": 0.008450704225352112, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.5154929577464789, + "keywordScore": 0.4, "rawVectorScore": 0.7083643674850464, "rawKeywordScore": 24.972142610413826, "keywordWeight": 0.4, @@ -3059,14 +3059,14 @@ }, { "rank": 1, - "score": 0.014175104228707564, + "score": 0.8646813579511614, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 366, "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.005479452054794521, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.33424657534246577, "rawVectorScore": 0.7087934911251068, "rawKeywordScore": 5.98690745514285, "keywordWeight": 0.4, @@ -3081,14 +3081,14 @@ }, { "rank": 2, - "score": 0.014137140842587695, + "score": 0.8623655913978494, "filePath": "../OpenCodeRAG-main/src/chunker/ssl.ts", "startLine": 145, "endLine": 165, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.004301075268817204, + "vectorScore": 0.6, + "keywordScore": 0.2623655913978495, "rawVectorScore": 0.7416016161441803, "rawKeywordScore": 3.9574763340376746, "keywordWeight": 0.4, @@ -3102,14 +3102,14 @@ }, { "rank": 3, - "score": 0.013026017111925964, + "score": 0.7945870438274839, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 428, "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.007228915662650602, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.44096385542168676, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.694938063621521, "rawKeywordScore": 7.863408152825995, "keywordWeight": 0.4, @@ -3125,14 +3125,14 @@ }, { "rank": 4, - "score": 0.012650406504065041, + "score": 0.7716747967479676, "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", "startLine": 126, "endLine": 140, "language": "typescript", "explanation": { - "vectorScore": 0.007317073170731707, - "keywordScore": 0.005333333333333334, + "vectorScore": 0.44634146341463415, + "keywordScore": 0.32533333333333336, "rawVectorScore": 0.6954189538955688, "rawKeywordScore": 5.833977031720821, "keywordWeight": 0.4, @@ -3149,28 +3149,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 7, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 18, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -3178,18 +3178,18 @@ "query": "How does the proxy-aware HTTP client work?", "queryIndex": 21, "resultCount": 20, - "latencyMs": 150.9, + "latencyMs": 143, "topResults": [ { "rank": 0, - "score": 0.015469868390671899, + "score": 0.943661971830986, "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", "startLine": 152, "endLine": 164, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.005633802816901409, + "vectorScore": 0.6, + "keywordScore": 0.34366197183098596, "rawVectorScore": 0.7926509976387024, "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, @@ -3203,14 +3203,14 @@ }, { "rank": 1, - "score": 0.015232974910394267, + "score": 0.9292114695340502, "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", "startLine": 484, "endLine": 501, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005555555555555556, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.3388888888888889, "rawVectorScore": 0.7894213199615479, "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, @@ -3224,14 +3224,14 @@ }, { "rank": 2, - "score": 0.01485445205479452, + "score": 0.9061215753424658, "filePath": "../OpenCodeRAG-main/src/embedder/http.ts", "startLine": 504, "endLine": 557, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.005479452054794521, + "vectorScore": 0.571875, + "keywordScore": 0.33424657534246577, "rawVectorScore": 0.781430721282959, "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, @@ -3245,14 +3245,14 @@ }, { "rank": 3, - "score": 0.01328722242446305, + "score": 0.8105205678922461, "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", "startLine": 158, "endLine": 192, "language": "typescript", "explanation": { - "vectorScore": 0.007317073170731707, - "keywordScore": 0.005970149253731343, + "vectorScore": 0.44634146341463415, + "keywordScore": 0.364179104477612, "rawVectorScore": 0.7241736650466919, "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, @@ -3266,14 +3266,14 @@ }, { "rank": 4, - "score": 0.013025210084033612, + "score": 0.7945378151260505, "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", "startLine": 200, "endLine": 232, "language": "typescript", "explanation": { - "vectorScore": 0.007142857142857143, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.4357142857142857, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.7169309258460999, "rawKeywordScore": 6.059193994548162, "keywordWeight": 0.4, @@ -3289,28 +3289,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -3318,18 +3318,18 @@ "query": "What is the FETCH_OVERFETCH_FACTOR constant?", "queryIndex": 22, "resultCount": 20, - "latencyMs": 151.4, + "latencyMs": 155.8, "topResults": [ { "rank": 0, - "score": 0.013375558867362147, + "score": 0.8159090909090909, "filePath": "../OpenCodeRAG-main/src/eval/token-analysis.ts", "startLine": 183, "endLine": 218, "language": "typescript", "explanation": { - "vectorScore": 0.006818181818181818, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.41590909090909095, + "keywordScore": 0.4, "rawVectorScore": 0.7063843607902527, "rawKeywordScore": 9.611335504612896, "keywordWeight": 0.4, @@ -3343,14 +3343,14 @@ }, { "rank": 1, - "score": 0.011292016806722689, + "score": 0.6888130252100841, "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.0050420168067226885, - "keywordScore": 0.00625, + "vectorScore": 0.30756302521008405, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.6948564350605011, "rawKeywordScore": 7.823394547512285, "keywordWeight": 0.4, @@ -3365,14 +3365,14 @@ }, { "rank": 2, - "score": 0.010998877665544332, + "score": 0.6709315375982043, "filePath": "../OpenCodeRAG-main/src/cli/commands/setup.ts", "startLine": 28, "endLine": 40, "language": "typescript", "explanation": { - "vectorScore": 0.006060606060606061, - "keywordScore": 0.0049382716049382715, + "vectorScore": 0.3696969696969697, + "keywordScore": 0.3012345679012346, "rawVectorScore": 0.7020108103752136, "rawKeywordScore": 3.90593181878832, "keywordWeight": 0.4, @@ -3386,14 +3386,14 @@ }, { "rank": 3, - "score": 0.0106203007518797, + "score": 0.6478383458646617, "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", "startLine": 309, "endLine": 351, "language": "typescript", "explanation": { - "vectorScore": 0.005357142857142857, - "keywordScore": 0.005263157894736842, + "vectorScore": 0.3267857142857143, + "keywordScore": 0.3210526315789474, "rawVectorScore": 0.6967871785163879, "rawKeywordScore": 3.9174627287239643, "keywordWeight": 0.4, @@ -3406,13 +3406,13 @@ }, { "rank": 4, - "score": 0.009836065573770491, + "score": 0.6, "filePath": "../OpenCodeRAG-main/src/core/runtime-overrides.ts", "startLine": 12, "endLine": 54, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, + "vectorScore": 0.6, "keywordScore": 0, "rawVectorScore": 0.7472843527793884, "rawKeywordScore": 0, @@ -3429,23 +3429,23 @@ }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 1, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 18, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -3453,18 +3453,18 @@ "query": "How does the TUI settings menu work?", "queryIndex": 23, "resultCount": 20, - "latencyMs": 187.8, + "latencyMs": 138.1, "topResults": [ { "rank": 0, - "score": 0.016129032258064516, + "score": 0.9838709677419355, "filePath": "../OpenCodeRAG-main/src/tui.ts", "startLine": 608, "endLine": 707, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.8096809387207031, "rawKeywordScore": 17.559910313957428, "keywordWeight": 0.4, @@ -3480,14 +3480,14 @@ }, { "rank": 1, - "score": 0.01548076923076923, + "score": 0.9443269230769231, "filePath": "../OpenCodeRAG-main/src/tui.ts", "startLine": 427, "endLine": 526, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.00625, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.7658225297927856, "rawKeywordScore": 13.424422351489037, "keywordWeight": 0.4, @@ -3503,14 +3503,14 @@ }, { "rank": 2, - "score": 0.015315517628565012, + "score": 0.9342465753424658, "filePath": "../OpenCodeRAG-main/src/tui.ts", "startLine": 283, "endLine": 294, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.005479452054794521, + "vectorScore": 0.6, + "keywordScore": 0.33424657534246577, "rawVectorScore": 0.8115052282810211, "rawKeywordScore": 6.0403940743882245, "keywordWeight": 0.4, @@ -3524,14 +3524,14 @@ }, { "rank": 3, - "score": 0.015238095238095238, + "score": 0.9295238095238096, "filePath": "../OpenCodeRAG-main/src/tui.ts", "startLine": 297, "endLine": 306, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.005714285714285714, + "vectorScore": 0.580952380952381, + "keywordScore": 0.3485714285714286, "rawVectorScore": 0.7998878359794617, "rawKeywordScore": 8.52547877100301, "keywordWeight": 0.4, @@ -3545,14 +3545,14 @@ }, { "rank": 4, - "score": 0.014849498327759197, + "score": 0.9058193979933111, "filePath": "../OpenCodeRAG-main/src/tui.ts", "startLine": 196, "endLine": 260, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.006153846153846154, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.3753846153846154, "rawVectorScore": 0.7494852542877197, "rawKeywordScore": 12.357736807962294, "keywordWeight": 0.4, @@ -3569,28 +3569,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -3598,18 +3598,18 @@ "query": "How are image descriptions generated?", "queryIndex": 24, "resultCount": 20, - "latencyMs": 139.7, + "latencyMs": 131.2, "topResults": [ { "rank": 0, - "score": 0.01525735294117647, + "score": 0.9306985294117648, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 334, "endLine": 415, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.571875, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.8315328061580658, "rawKeywordScore": 11.833676737018862, "keywordWeight": 0.4, @@ -3625,14 +3625,14 @@ }, { "rank": 1, - "score": 0.014805194805194804, + "score": 0.9031168831168832, "filePath": "../OpenCodeRAG-main/src/indexer/description-stage.ts", "startLine": 32, "endLine": 119, "language": "typescript", "explanation": { - "vectorScore": 0.00909090909090909, - "keywordScore": 0.005714285714285714, + "vectorScore": 0.5545454545454546, + "keywordScore": 0.3485714285714286, "rawVectorScore": 0.8292976319789886, "rawKeywordScore": 11.08600348338972, "keywordWeight": 0.4, @@ -3648,14 +3648,14 @@ }, { "rank": 2, - "score": 0.013955223880597015, + "score": 0.8512686567164179, "filePath": "../OpenCodeRAG-main/src/chunker/image.ts", "startLine": 315, "endLine": 373, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.005, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.30500000000000005, "rawVectorScore": 0.8289483487606049, "rawKeywordScore": 5.636967115998509, "keywordWeight": 0.4, @@ -3669,14 +3669,14 @@ }, { "rank": 3, - "score": 0.013828470380194517, + "score": 0.8435366931918657, "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", "startLine": 39, "endLine": 45, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.004597701149425287, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.28045977011494255, "rawVectorScore": 0.8301655352115631, "rawKeywordScore": 5.035852843783428, "keywordWeight": 0.4, @@ -3690,14 +3690,14 @@ }, { "rank": 4, - "score": 0.013748782862706914, + "score": 0.8386757546251218, "filePath": "../OpenCodeRAG-main/src/describer/anthropic.ts", "startLine": 48, "endLine": 80, "language": "typescript", "explanation": { - "vectorScore": 0.007594936708860759, - "keywordScore": 0.006153846153846154, + "vectorScore": 0.46329113924050636, + "keywordScore": 0.3753846153846154, "rawVectorScore": 0.7916759252548218, "rawKeywordScore": 13.012556175062718, "keywordWeight": 0.4, @@ -3715,28 +3715,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 17, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -3744,18 +3744,18 @@ "query": "retrieve function", "queryIndex": 25, "resultCount": 20, - "latencyMs": 134.2, + "latencyMs": 136.4, "topResults": [ { "rank": 0, - "score": 0.015391621129326048, + "score": 0.9388888888888889, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 343, "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.005555555555555556, + "vectorScore": 0.6, + "keywordScore": 0.3388888888888889, "rawVectorScore": 0.7735368311405182, "rawKeywordScore": 7.606676678864138, "keywordWeight": 0.4, @@ -3770,14 +3770,14 @@ }, { "rank": 1, - "score": 0.015253029223093371, + "score": 0.9304347826086957, "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.4, "rawVectorScore": 0.7253389954566956, "rawKeywordScore": 7.606676678864138, "keywordWeight": 0.4, @@ -3792,14 +3792,14 @@ }, { "rank": 2, - "score": 0.015157612340710933, + "score": 0.924614352783367, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 321, "endLine": 336, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.005633802816901409, + "vectorScore": 0.580952380952381, + "keywordScore": 0.34366197183098596, "rawVectorScore": 0.7688738703727722, "rawKeywordScore": 7.606676678864138, "keywordWeight": 0.4, @@ -3814,14 +3814,14 @@ }, { "rank": 3, - "score": 0.014604550379198266, + "score": 0.8908775731310943, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 366, "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.008450704225352112, - "keywordScore": 0.006153846153846154, + "vectorScore": 0.5154929577464789, + "keywordScore": 0.3753846153846154, "rawVectorScore": 0.7230896055698395, "rawKeywordScore": 7.606676678864138, "keywordWeight": 0.4, @@ -3836,14 +3836,14 @@ }, { "rank": 4, - "score": 0.014218381775333858, + "score": 0.8673212882953654, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 293, "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.005263157894736842, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.3210526315789474, "rawVectorScore": 0.7464181780815125, "rawKeywordScore": 6.629293724495999, "keywordWeight": 0.4, @@ -3859,28 +3859,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 13, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -3888,18 +3888,18 @@ "query": "KeywordIndex class", "queryIndex": 26, "resultCount": 20, - "latencyMs": 142.4, + "latencyMs": 128.6, "topResults": [ { "rank": 0, - "score": 0.015474520804114072, + "score": 0.9439457690509585, "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", "startLine": 69, "endLine": 76, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.793863832950592, "rawKeywordScore": 7.033284721889844, "keywordWeight": 0.4, @@ -3914,14 +3914,14 @@ }, { "rank": 1, - "score": 0.015015829941203075, + "score": 0.9159656264133876, "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.7466518878936768, "rawKeywordScore": 7.033284721889844, "keywordWeight": 0.4, @@ -3936,14 +3936,14 @@ }, { "rank": 2, - "score": 0.014457314457314458, + "score": 0.8818961818961819, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 428, "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.008108108108108109, - "keywordScore": 0.006349206349206349, + "vectorScore": 0.4945945945945946, + "keywordScore": 0.3873015873015873, "rawVectorScore": 0.7277529537677765, "rawKeywordScore": 9.758726665703923, "keywordWeight": 0.4, @@ -3959,14 +3959,14 @@ }, { "rank": 3, - "score": 0.014231669969374887, + "score": 0.8681318681318682, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 1044, "endLine": 1061, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.004395604395604396, + "vectorScore": 0.6, + "keywordScore": 0.2681318681318682, "rawVectorScore": 0.802352249622345, "rawKeywordScore": 7.033284721889844, "keywordWeight": 0.4, @@ -3981,14 +3981,14 @@ }, { "rank": 4, - "score": 0.014136904761904762, + "score": 0.8623511904761905, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 293, "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.004761904761904762, + "vectorScore": 0.571875, + "keywordScore": 0.2904761904761905, "rawVectorScore": 0.7543212175369263, "rawKeywordScore": 7.033284721889844, "keywordWeight": 0.4, @@ -4005,28 +4005,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 5, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 15, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -4034,18 +4034,18 @@ "query": "embedder factory", "queryIndex": 27, "resultCount": 20, - "latencyMs": 143.9, + "latencyMs": 150.1, "topResults": [ { "rank": 0, - "score": 0.015550351288056204, + "score": 0.9485714285714286, "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", "startLine": 23, "endLine": 46, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.005714285714285714, + "vectorScore": 0.6, + "keywordScore": 0.3485714285714286, "rawVectorScore": 0.8378231525421143, "rawKeywordScore": 5.0638886572435915, "keywordWeight": 0.4, @@ -4059,14 +4059,14 @@ }, { "rank": 1, - "score": 0.015493958777540867, + "score": 0.945131485429993, "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", "startLine": 56, "endLine": 66, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.005970149253731343, + "vectorScore": 0.580952380952381, + "keywordScore": 0.364179104477612, "rawVectorScore": 0.7654164731502533, "rawKeywordScore": 5.0638886572435915, "keywordWeight": 0.4, @@ -4080,14 +4080,14 @@ }, { "rank": 2, - "score": 0.015311222171740118, + "score": 0.9339845524761472, "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", "startLine": 62, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005633802816901409, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.34366197183098596, "rawVectorScore": 0.7703590393066406, "rawKeywordScore": 5.0638886572435915, "keywordWeight": 0.4, @@ -4101,14 +4101,14 @@ }, { "rank": 3, - "score": 0.0130450194966324, + "score": 0.7957461892945765, "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", "startLine": 388, "endLine": 436, "language": "typescript", "explanation": { - "vectorScore": 0.006593406593406593, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.4021978021978022, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.7087774276733398, "rawKeywordScore": 10.266062163238725, "keywordWeight": 0.4, @@ -4123,14 +4123,14 @@ }, { "rank": 4, - "score": 0.012981082844096542, + "score": 0.7918460534898892, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 321, "endLine": 336, "language": "typescript", "explanation": { - "vectorScore": 0.00821917808219178, - "keywordScore": 0.004761904761904762, + "vectorScore": 0.5013698630136987, + "keywordScore": 0.2904761904761905, "rawVectorScore": 0.7348208427429199, "rawKeywordScore": 5.0638886572435915, "keywordWeight": 0.4, @@ -4146,28 +4146,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 3, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -4175,18 +4175,18 @@ "query": "vector store LanceDB", "queryIndex": 28, "resultCount": 20, - "latencyMs": 150.6, + "latencyMs": 136.6, "topResults": [ { "rank": 0, - "score": 0.016287678476996297, + "score": 0.9935483870967743, "filePath": "../OpenCodeRAG-main/src/vectorstore/factory.ts", "startLine": 22, "endLine": 38, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.6, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.8406621813774109, "rawKeywordScore": 14.404583382084791, "keywordWeight": 0.4, @@ -4202,14 +4202,14 @@ }, { "rank": 1, - "score": 0.015831265508684862, + "score": 0.9657071960297767, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 165, "endLine": 186, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.006153846153846154, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.3753846153846154, "rawVectorScore": 0.8001228272914886, "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, @@ -4223,14 +4223,14 @@ }, { "rank": 2, - "score": 0.015584415584415583, + "score": 0.9506493506493507, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 189, "endLine": 192, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.580952380952381, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.7964996695518494, "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, @@ -4244,14 +4244,14 @@ }, { "rank": 3, - "score": 0.014837576821773486, + "score": 0.9050921861281827, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 230, "endLine": 242, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.7671596109867096, "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, @@ -4265,14 +4265,14 @@ }, { "rank": 4, - "score": 0.014665801427644388, + "score": 0.8946138870863076, "filePath": "../OpenCodeRAG-main/src/web/api.ts", "startLine": 199, "endLine": 227, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.005970149253731343, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.364179104477612, "rawVectorScore": 0.7630512416362762, "rawKeywordScore": 5.940918836457924, "keywordWeight": 0.4, @@ -4288,28 +4288,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 6, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 17, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -4317,18 +4317,18 @@ "query": "find usages SearchResult", "queryIndex": 29, "resultCount": 20, - "latencyMs": 158.6, + "latencyMs": 144, "topResults": [ { "rank": 0, - "score": 0.016393442622950817, + "score": 1, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 366, "endLine": 465, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.6, + "keywordScore": 0.4, "rawVectorScore": 0.8429126143455505, "rawKeywordScore": 17.003368879563602, "keywordWeight": 0.4, @@ -4346,14 +4346,14 @@ }, { "rank": 1, - "score": 0.015773809523809523, + "score": 0.962202380952381, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 280, "endLine": 287, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.00625, + "vectorScore": 0.580952380952381, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.8319400548934937, "rawKeywordScore": 13.802037364346312, "keywordWeight": 0.4, @@ -4370,14 +4370,14 @@ }, { "rank": 2, - "score": 0.015682382133995035, + "score": 0.9566253101736975, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 428, "endLine": 527, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.8200908601284027, "rawKeywordScore": 17.003368879563602, "keywordWeight": 0.4, @@ -4395,14 +4395,14 @@ }, { "rank": 3, - "score": 0.01543560606060606, + "score": 0.9415719696969698, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 528, "endLine": 627, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.006060606060606061, + "vectorScore": 0.571875, + "keywordScore": 0.36969696969696975, "rawVectorScore": 0.8217239081859589, "rawKeywordScore": 13.802037364346312, "keywordWeight": 0.4, @@ -4419,14 +4419,14 @@ }, { "rank": 4, - "score": 0.01515687140963323, + "score": 0.924569155987627, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 290, "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005479452054794521, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.33424657534246577, "rawVectorScore": 0.8417533338069916, "rawKeywordScore": 11.510994031792437, "keywordWeight": 0.4, @@ -4444,28 +4444,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 8, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 15, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -4473,18 +4473,18 @@ "query": "chunkFile method", "queryIndex": 30, "resultCount": 20, - "latencyMs": 145.9, + "latencyMs": 142.1, "topResults": [ { "rank": 0, - "score": 0.014776555131372108, + "score": 0.9013698630136987, "filePath": "../OpenCodeRAG-main/src/chunker/factory.ts", "startLine": 232, "endLine": 256, "language": "typescript", "explanation": { - "vectorScore": 0.00821917808219178, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.5013698630136987, + "keywordScore": 0.4, "rawVectorScore": 0.7935350239276886, "rawKeywordScore": 13.080329580273405, "keywordWeight": 0.4, @@ -4500,14 +4500,14 @@ }, { "rank": 1, - "score": 0.01409138472270666, + "score": 0.8595744680851064, "filePath": "../OpenCodeRAG-main/src/chunker/docx.ts", "startLine": 39, "endLine": 108, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.00425531914893617, + "vectorScore": 0.6, + "keywordScore": 0.2595744680851064, "rawVectorScore": 0.8315305709838867, "rawKeywordScore": 2.6759825682831373, "keywordWeight": 0.4, @@ -4521,14 +4521,14 @@ }, { "rank": 2, - "score": 0.013871635610766046, + "score": 0.8461697722567288, "filePath": "../OpenCodeRAG-main/src/chunker/doc.ts", "startLine": 40, "endLine": 109, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.004347826086956522, + "vectorScore": 0.580952380952381, + "keywordScore": 0.26521739130434785, "rawVectorScore": 0.8236623108386993, "rawKeywordScore": 2.6759825682831373, "keywordWeight": 0.4, @@ -4542,14 +4542,14 @@ }, { "rank": 3, - "score": 0.013585526315789473, + "score": 0.8287171052631579, "filePath": "../OpenCodeRAG-main/src/chunker/excel.ts", "startLine": 49, "endLine": 108, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.004210526315789474, + "vectorScore": 0.571875, + "keywordScore": 0.2568421052631579, "rawVectorScore": 0.8127363920211792, "rawKeywordScore": 2.6759825682831373, "keywordWeight": 0.4, @@ -4563,14 +4563,14 @@ }, { "rank": 4, - "score": 0.013578122011856951, + "score": 0.8282654427232741, "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", "startLine": 148, "endLine": 247, "language": "typescript", "explanation": { - "vectorScore": 0.007228915662650602, - "keywordScore": 0.006349206349206349, + "vectorScore": 0.44096385542168676, + "keywordScore": 0.3873015873015873, "rawVectorScore": 0.7728691697120667, "rawKeywordScore": 13.080329580273405, "keywordWeight": 0.4, @@ -4588,28 +4588,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 2, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 15, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -4617,18 +4617,18 @@ "query": "embedBatch function", "queryIndex": 31, "resultCount": 20, - "latencyMs": 149.1, + "latencyMs": 143.7, "topResults": [ { "rank": 0, - "score": 0.016393442622950817, + "score": 1, "filePath": "../OpenCodeRAG-main/src/embedder/factory.ts", "startLine": 62, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.6, + "keywordScore": 0.4, "rawVectorScore": 0.8466528654098511, "rawKeywordScore": 12.716554521182438, "keywordWeight": 0.4, @@ -4644,14 +4644,14 @@ }, { "rank": 1, - "score": 0.014493927125506071, + "score": 0.8841295546558705, "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", "startLine": 91, "endLine": 112, "language": "typescript", "explanation": { - "vectorScore": 0.00923076923076923, - "keywordScore": 0.005263157894736842, + "vectorScore": 0.5630769230769231, + "keywordScore": 0.3210526315789474, "rawVectorScore": 0.7636113166809082, "rawKeywordScore": 4.362664880724394, "keywordWeight": 0.4, @@ -4665,14 +4665,14 @@ }, { "rank": 2, - "score": 0.014358108108108109, + "score": 0.8758445945945946, "filePath": "../OpenCodeRAG-main/src/indexer/pipeline.ts", "startLine": 553, "endLine": 652, "language": "typescript", "explanation": { - "vectorScore": 0.008108108108108109, - "keywordScore": 0.00625, + "vectorScore": 0.4945945945945946, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.7298257946968079, "rawKeywordScore": 11.7391715668143, "keywordWeight": 0.4, @@ -4687,14 +4687,14 @@ }, { "rank": 3, - "score": 0.014329454990814453, + "score": 0.8740967544396816, "filePath": "../OpenCodeRAG-main/src/core/bootstrap.ts", "startLine": 56, "endLine": 66, "language": "typescript", "explanation": { - "vectorScore": 0.008695652173913044, - "keywordScore": 0.005633802816901409, + "vectorScore": 0.5304347826086957, + "keywordScore": 0.34366197183098596, "rawVectorScore": 0.7416476011276245, "rawKeywordScore": 4.362664880724394, "keywordWeight": 0.4, @@ -4708,14 +4708,14 @@ }, { "rank": 4, - "score": 0.014285714285714285, + "score": 0.8714285714285714, "filePath": "../OpenCodeRAG-main/src/indexer/worker.ts", "startLine": 327, "endLine": 370, "language": "typescript", "explanation": { - "vectorScore": 0.00909090909090909, - "keywordScore": 0.005194805194805195, + "vectorScore": 0.5545454545454546, + "keywordScore": 0.31688311688311693, "rawVectorScore": 0.7532026171684265, "rawKeywordScore": 4.362664880724394, "keywordWeight": 0.4, @@ -4731,28 +4731,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 12, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 18, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -4760,18 +4760,18 @@ "query": "retriever retrieve vector search", "queryIndex": 32, "resultCount": 20, - "latencyMs": 153.3, + "latencyMs": 140.7, "topResults": [ { "rank": 0, - "score": 0.01571841851494696, + "score": 0.9588235294117647, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 343, "endLine": 367, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.6, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.8376761972904205, "rawKeywordScore": 11.778199536380743, "keywordWeight": 0.4, @@ -4787,14 +4787,14 @@ }, { "rank": 1, - "score": 0.015647568608570053, + "score": 0.9545016851227732, "filePath": "../OpenCodeRAG-main/src/plugin.ts", "startLine": 321, "endLine": 336, "language": "typescript", "explanation": { - "vectorScore": 0.00967741935483871, - "keywordScore": 0.005970149253731343, + "vectorScore": 0.5903225806451613, + "keywordScore": 0.364179104477612, "rawVectorScore": 0.8346504867076874, "rawKeywordScore": 11.778199536380743, "keywordWeight": 0.4, @@ -4810,14 +4810,14 @@ }, { "rank": 2, - "score": 0.015625, + "score": 0.953125, "filePath": "../OpenCodeRAG-main/src/mcp/handlers.ts", "startLine": 184, "endLine": 236, "language": "typescript", "explanation": { - "vectorScore": 0.009375, - "keywordScore": 0.00625, + "vectorScore": 0.571875, + "keywordScore": 0.38125000000000003, "rawVectorScore": 0.7943508625030518, "rawKeywordScore": 11.778199536380743, "keywordWeight": 0.4, @@ -4833,14 +4833,14 @@ }, { "rank": 3, - "score": 0.014902317128577917, + "score": 0.909041344843253, "filePath": "../OpenCodeRAG-main/src/cli/commands/query.ts", "startLine": 25, "endLine": 101, "language": "typescript", "explanation": { - "vectorScore": 0.008450704225352112, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.5154929577464789, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.7678912580013275, "rawKeywordScore": 11.778199536380743, "keywordWeight": 0.4, @@ -4856,14 +4856,14 @@ }, { "rank": 4, - "score": 0.014752325329872378, + "score": 0.8998918451222151, "filePath": "../OpenCodeRAG-main/src/opencode/tools.ts", "startLine": 293, "endLine": 299, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.005797101449275362, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.35362318840579715, "rawVectorScore": 0.777654618024826, "rawKeywordScore": 9.487156203826869, "keywordWeight": 0.4, @@ -4880,28 +4880,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 6, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 14, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -4909,18 +4909,18 @@ "query": "session logger token", "queryIndex": 33, "resultCount": 20, - "latencyMs": 137.9, + "latencyMs": 147, "topResults": [ { "rank": 0, - "score": 0.01597542242703533, + "score": 0.9745007680491553, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 43, "endLine": 52, "language": "typescript", "explanation": { - "vectorScore": 0.009523809523809523, - "keywordScore": 0.0064516129032258064, + "vectorScore": 0.580952380952381, + "keywordScore": 0.39354838709677425, "rawVectorScore": 0.800042986869812, "rawKeywordScore": 10.552134307163826, "keywordWeight": 0.4, @@ -4936,14 +4936,14 @@ }, { "rank": 1, - "score": 0.01492537313432836, + "score": 0.9104477611940298, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 158, "endLine": 183, "language": "typescript", "explanation": { - "vectorScore": 0.008955223880597015, - "keywordScore": 0.005970149253731343, + "vectorScore": 0.5462686567164179, + "keywordScore": 0.364179104477612, "rawVectorScore": 0.7745591402053833, "rawKeywordScore": 7.749640102145139, "keywordWeight": 0.4, @@ -4958,14 +4958,14 @@ }, { "rank": 2, - "score": 0.01456838443139813, + "score": 0.8886714503152859, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 58, "endLine": 157, "language": "typescript", "explanation": { - "vectorScore": 0.00821917808219178, - "keywordScore": 0.006349206349206349, + "vectorScore": 0.5013698630136987, + "keywordScore": 0.3873015873015873, "rawVectorScore": 0.7639272212982178, "rawKeywordScore": 10.552134307163826, "keywordWeight": 0.4, @@ -4981,14 +4981,14 @@ }, { "rank": 3, - "score": 0.014452113891285591, + "score": 0.881578947368421, "filePath": "../OpenCodeRAG-main/src/eval/index.ts", "startLine": 1, "endLine": 39, "language": "text", "explanation": { - "vectorScore": 0.007894736842105263, - "keywordScore": 0.006557377049180328, + "vectorScore": 0.48157894736842105, + "keywordScore": 0.4, "rawVectorScore": 0.7571290135383606, "rawKeywordScore": 10.552134307163826, "keywordWeight": 0.4, @@ -5004,14 +5004,14 @@ }, { "rank": 4, - "score": 0.01371956071940156, + "score": 0.8368932038834951, "filePath": "../OpenCodeRAG-main/src/eval/session-logger.ts", "startLine": 26, "endLine": 40, "language": "typescript", "explanation": { - "vectorScore": 0.009836065573770491, - "keywordScore": 0.0038834951456310682, + "vectorScore": 0.6, + "keywordScore": 0.23689320388349516, "rawVectorScore": 0.8073388338088989, "rawKeywordScore": 5.11740873760028, "keywordWeight": 0.4, @@ -5027,28 +5027,28 @@ "thresholdAnalysis": [ { "threshold": 0.85, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 10, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 18, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] }, @@ -5056,18 +5056,18 @@ "query": "config validation", "queryIndex": 34, "resultCount": 20, - "latencyMs": 133.7, + "latencyMs": 141.4, "topResults": [ { "rank": 0, - "score": 0.012955465587044534, + "score": 0.7902834008097166, "filePath": "../OpenCodeRAG-main/src/cli/commands/eval.ts", "startLine": 144, "endLine": 174, "language": "typescript", "explanation": { - "vectorScore": 0.007692307692307692, - "keywordScore": 0.005263157894736842, + "vectorScore": 0.46923076923076923, + "keywordScore": 0.3210526315789474, "rawVectorScore": 0.6872305274009705, "rawKeywordScore": 1.6744763086133228, "keywordWeight": 0.4, @@ -5080,14 +5080,14 @@ }, { "rank": 1, - "score": 0.012941176470588234, + "score": 0.7894117647058825, "filePath": "../OpenCodeRAG-main/src/chunker/image.ts", "startLine": 383, "endLine": 400, "language": "typescript", "explanation": { - "vectorScore": 0.007058823529411764, - "keywordScore": 0.0058823529411764705, + "vectorScore": 0.43058823529411766, + "keywordScore": 0.35882352941176476, "rawVectorScore": 0.6849385499954224, "rawKeywordScore": 1.6744763086133228, "keywordWeight": 0.4, @@ -5100,14 +5100,14 @@ }, { "rank": 2, - "score": 0.012695139911634758, + "score": 0.7744035346097202, "filePath": "../OpenCodeRAG-main/src/core/resolve-api-key.ts", "startLine": 12, "endLine": 23, "language": "typescript", "explanation": { - "vectorScore": 0.008571428571428572, - "keywordScore": 0.004123711340206186, + "vectorScore": 0.5228571428571429, + "keywordScore": 0.2515463917525773, "rawVectorScore": 0.693453848361969, "rawKeywordScore": 1.6744763086133228, "keywordWeight": 0.4, @@ -5120,14 +5120,14 @@ }, { "rank": 3, - "score": 0.012403846153846154, + "score": 0.7566346153846155, "filePath": "../OpenCodeRAG-main/src/chunker/image.ts", "startLine": 143, "endLine": 149, "language": "typescript", "explanation": { - "vectorScore": 0.0062499999999999995, - "keywordScore": 0.006153846153846154, + "vectorScore": 0.38125000000000003, + "keywordScore": 0.3753846153846154, "rawVectorScore": 0.6809921264648438, "rawKeywordScore": 1.6744763086133228, "keywordWeight": 0.4, @@ -5140,14 +5140,14 @@ }, { "rank": 4, - "score": 0.012242332830568125, + "score": 0.7467823026646556, "filePath": "../OpenCodeRAG-main/src/embedder/health.ts", "startLine": 64, "endLine": 86, "language": "typescript", "explanation": { - "vectorScore": 0.008823529411764706, - "keywordScore": 0.003418803418803419, + "vectorScore": 0.538235294117647, + "keywordScore": 0.20854700854700856, "rawVectorScore": 0.6992982029914856, "rawKeywordScore": 1.6744763086133228, "keywordWeight": 0.4, @@ -5167,23 +5167,23 @@ }, { "threshold": 0.75, - "passedCount": 0, - "wouldInject": false + "passedCount": 4, + "wouldInject": true }, { "threshold": 0.65, - "passedCount": 0, - "wouldInject": false + "passedCount": 11, + "wouldInject": true }, { "threshold": 0.5, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true }, { "threshold": 0.35, - "passedCount": 0, - "wouldInject": false + "passedCount": 20, + "wouldInject": true } ] } diff --git a/src/__tests__/opencode/create-read-tool.test.ts b/src/__tests__/opencode/create-read-tool.test.ts index 4db52b4..e52e01c 100644 --- a/src/__tests__/opencode/create-read-tool.test.ts +++ b/src/__tests__/opencode/create-read-tool.test.ts @@ -358,8 +358,8 @@ describe("createRagReadTool", () => { // Related files section with otherFile and other2File (not mainFile) assert.match(result.output, /Please consider reading other relevant files/); - assert.match(result.output, /other\.ts \(Score: 0\.01\)/); - assert.match(result.output, /other2\.ts \(Score: 0\.01\)/); + assert.match(result.output, /other\.ts \(Score: 0\.\d+\)/); + assert.match(result.output, /other2\.ts \(Score: 0\.\d+\)/); // Should NOT include the requested file in related files assert.doesNotMatch(result.output, /src\/main\.ts \(Score:/); @@ -393,7 +393,7 @@ describe("createRagReadTool", () => { // Should have at most 1 related file assert.match(result.output, /Please consider reading other relevant files/); - assert.match(result.output, /other\.ts \(Score: 0\.01\)/); + assert.match(result.output, /other\.ts \(Score: 0\.\d+\)/); assert.doesNotMatch(result.output, /other2\.ts/); assert.doesNotMatch(result.output, /other3\.ts/); }); @@ -470,7 +470,7 @@ describe("createRagReadTool", () => { // Only one entry for other.ts, with best score 0.01 assert.match(result.output, /Please consider reading other relevant files/); - assert.match(result.output, /other\.ts \(Score: 0\.01\)/); + assert.match(result.output, /other\.ts \(Score: 0\.\d+\)/); // Should NOT show lower scores for same file const matches = result.output.match(/other\.ts \(Score:/g); assert.equal(matches?.length, 1, "expected exactly one related entry per file"); diff --git a/src/__tests__/retriever/retriever.test.ts b/src/__tests__/retriever/retriever.test.ts index dc140a4..ca4d673 100644 --- a/src/__tests__/retriever/retriever.test.ts +++ b/src/__tests__/retriever/retriever.test.ts @@ -59,8 +59,8 @@ describe("retrieve", () => { const results = await retrieve("test query", embedder, store); assert.equal(results.length, 1); - // RRF contribution for single vector result at rank 0: (1-0.4)/(60+0+1) = 0.6/61 - const expectedScore = (1 - 0.4) / (60 + 0 + 1); + // Normalized RRF for single vector result at rank 0: (1-0.4)*(60+1)/(60+0+1) = 0.6 + const expectedScore = (1 - 0.4); assert.ok(Math.abs(results[0]!.score - expectedScore) < 1e-10); assert.equal(results[0]!.chunk.id, "chunk-1"); }); @@ -141,10 +141,10 @@ describe("retrieve", () => { { score: 0.7, chunk: { id: "c", content: "mid", metadata: { filePath: "c.ts", startLine: 1, endLine: 2, language: "ts" } } }, ]); - const results = await retrieve("query", embedder, store, { minScore: 0.0096 }); + const results = await retrieve("query", embedder, store, { minScore: 0.59 }); assert.equal(results.length, 2); - // RRF contributions: rank 0 → 0.6/61, rank 1 → 0.6/62 - const expectedScores = [(1 - 0.4) / (60 + 0 + 1), (1 - 0.4) / (60 + 1 + 1)]; + // Normalized RRF: rank 0 → 0.6*61/61 = 0.6, rank 1 → 0.6*61/62 + const expectedScores = [(1 - 0.4), (1 - 0.4) * 61 / (60 + 1 + 1)]; assert.ok(Math.abs(results[0]!.score - expectedScores[0]!) < 1e-10); assert.ok(Math.abs(results[1]!.score - expectedScores[1]!) < 1e-10); }); @@ -223,7 +223,7 @@ describe("retrieve", () => { { score: 0.1, chunk: { id: "a", content: "low relevance", metadata: { filePath: "a.ts", startLine: 1, endLine: 2, language: "ts" } } }, ]); const ki = makeKeywordIndex([]); - const results = await retrieve("test", embedder, store, { keywordIndex: ki, minScore: 0.5 }); + const results = await retrieve("test", embedder, store, { keywordIndex: ki, minScore: 0.7 }); assert.equal(results.length, 0); }); @@ -315,8 +315,8 @@ describe("retrieve", () => { assert.equal(exp!.matchedTerms, undefined); assert.equal(exp!.scoreBreakdown.vectorRank, 0); assert.equal(exp!.scoreBreakdown.keywordRank, undefined); - // RRF contribution: (1-0.4) / (60 + 0 + 1) = 0.6 / 61 - const expectedVScore = (1 - 0.4) / (60 + 0 + 1); + // Normalized RRF: (1-0.4)*(60+1)/(60+0+1) = 0.6 + const expectedVScore = (1 - 0.4); assert.ok(Math.abs(exp!.scoreBreakdown.vectorScore - expectedVScore) < 1e-10); }); @@ -341,10 +341,9 @@ describe("retrieve", () => { // RRF: chunk "a" is vector-only at rank 0, no keyword match assert.equal(exp!.scoreBreakdown.vectorRank, 0); assert.equal(exp!.scoreBreakdown.keywordRank, undefined); - const expectedVScore = (1 - 0.4) / (60 + 0 + 1); + const expectedVScore = (1 - 0.4); assert.ok(Math.abs(exp!.scoreBreakdown.vectorScore - expectedVScore) < 1e-10); }); - it("includes matchedTerms when keywordIndex matches the chunk", async () => { const embedder = makeEmbedder([[0.1, 0.2, 0.3]]); const store = makeStore([ diff --git a/src/__tests__/vectorstore/lancedb.test.ts b/src/__tests__/vectorstore/lancedb.test.ts index 0dddedf..9826e42 100644 --- a/src/__tests__/vectorstore/lancedb.test.ts +++ b/src/__tests__/vectorstore/lancedb.test.ts @@ -14,7 +14,7 @@ describe("LanceDbStore (memory)", () => { }); after(async () => { - await store.clear(); + await store.clear({ noBackup: true }); }); it("starts with zero count", async () => { @@ -74,7 +74,7 @@ describe("LanceDbStore (memory)", () => { }); it("clears all chunks", async () => { - await store.clear(); + await store.clear({ noBackup: true }); const count = await store.count(); assert.equal(count, 0); }); @@ -100,7 +100,7 @@ describe("LanceDbStore (memory)", () => { }); it("filters out chunks without embeddings in addChunks", async () => { - await store.clear(); + await store.clear({ noBackup: true }); const chunks = [ { @@ -133,7 +133,7 @@ describe("LanceDbStore (memory)", () => { }); it("deletes all chunks for a specific file path", async () => { - await store.clear(); + await store.clear({ noBackup: true }); await store.addChunks([ { @@ -182,7 +182,7 @@ describe("LanceDbStore (memory)", () => { }); it("stores and retrieves description field", async () => { - await store.clear(); + await store.clear({ noBackup: true }); const chunks = [ { @@ -229,7 +229,7 @@ describe("LanceDbStore (memory)", () => { }); it("lists files with chunk counts", async () => { - await store.clear(); + await store.clear({ noBackup: true }); await store.addChunks([ { @@ -265,13 +265,13 @@ describe("LanceDbStore (memory)", () => { }); it("returns empty array for listFiles on empty store", async () => { - await store.clear(); + await store.clear({ noBackup: true }); const files = await store.listFiles(); assert.deepEqual(files, []); }); it("retrieves chunks by file path sorted by startLine", async () => { - await store.clear(); + await store.clear({ noBackup: true }); await store.addChunks([ { @@ -303,13 +303,13 @@ describe("LanceDbStore (memory)", () => { }); it("returns empty array for getChunksByFilePath with no match", async () => { - await store.clear(); + await store.clear({ noBackup: true }); const chunks = await store.getChunksByFilePath("nonexistent.ts"); assert.deepEqual(chunks, []); }); it("retrieves chunks with pagination via getChunks", async () => { - await store.clear(); + await store.clear({ noBackup: true }); await store.addChunks([ { @@ -343,13 +343,13 @@ describe("LanceDbStore (memory)", () => { }); it("returns empty array for getChunks beyond range", async () => { - await store.clear(); + await store.clear({ noBackup: true }); const chunks = await store.getChunks(100, 10); assert.deepEqual(chunks, []); }); it("getFilePaths returns all unique file paths", async () => { - await store.clear(); + await store.clear({ noBackup: true }); await store.addChunks([ { @@ -379,7 +379,7 @@ describe("LanceDbStore (memory)", () => { }); it("getFilePaths returns empty array on empty store", async () => { - await store.clear(); + await store.clear({ noBackup: true }); const paths = await store.getFilePaths(); assert.deepEqual(paths, []); }); diff --git a/src/eval/fast-index.ts b/src/eval/fast-index.ts index 707e191..5850ec5 100644 --- a/src/eval/fast-index.ts +++ b/src/eval/fast-index.ts @@ -100,16 +100,19 @@ function walkFiles(dir: string): string[] { return results; } -function parseArgs(): { descriptionsPath: string } { +function parseArgs(): { descriptionsPath: string; force: boolean } { const args = process.argv.slice(2); let descriptionsPath = path.join(WORKTREE, "doc", "chunk-descriptions.json"); + let force = false; for (let i = 0; i < args.length; i++) { if (args[i] === "--descriptions" && args[i + 1]) { descriptionsPath = path.resolve(WORKTREE, args[i + 1]!); - break; + i++; + } else if (args[i] === "--force") { + force = true; } } - return { descriptionsPath }; + return { descriptionsPath, force }; } function getConfig() { @@ -127,7 +130,7 @@ function getConfig() { } async function main() { - const { descriptionsPath } = parseArgs(); + const { descriptionsPath, force } = parseArgs(); console.log(`\n Fast Indexer — skipping description generation`); console.log(` Descriptions: ${descriptionsPath}\n`); @@ -186,10 +189,20 @@ async function main() { const dimension = probe[0]?.length ?? 384; console.log(` Embedding dimension: ${dimension}\n`); - // Clear existing store + // Clear existing store (requires --force if data exists) const store = createVectorStore(cfg, STORE_PATH, dimension); - await store.clear(); - console.log(" Cleared existing store\n"); + const existingCount = await store.count(); + if (existingCount > 0 && !force) { + console.error(` Store already has ${existingCount} chunks. Use --force to overwrite.`); + await store.close(); + process.exit(1); + } + if (existingCount > 0) { + await store.clear(); + console.log(` Cleared existing store (backed up ${existingCount} chunks)\n`); + } else { + console.log(" Store is empty\n"); + } // Walk files const srcDir = path.join(WORKTREE, "src"); diff --git a/src/retriever/retriever.ts b/src/retriever/retriever.ts index 1ee9c5b..dc112d8 100644 --- a/src/retriever/retriever.ts +++ b/src/retriever/retriever.ts @@ -8,6 +8,8 @@ import type { EmbeddingProvider, KeywordIndex, VectorStore, SearchResult, Metada * we slice back to the requested topK. */ const FETCH_OVERFETCH_FACTOR = 3; const RRF_K = 60; +/** Multiply raw RRF scores by (K+1) to normalize to ~[0,1]. */ +const RRF_NORMALIZE = RRF_K + 1; /** Options controlling the retrieval behavior. */ export interface RetrieveOptions { @@ -75,8 +77,8 @@ export async function retrieve( const combinedResults: SearchResult[] = [...allIds].map((id) => { const vR = vRank.get(id); const kR = kRank.get(id); - const vContrib = vR !== undefined ? (1 - kw) / (RRF_K + vR + 1) : 0; - const kContrib = kR !== undefined ? kw / (RRF_K + kR + 1) : 0; + const vContrib = vR !== undefined ? ((1 - kw) * RRF_NORMALIZE) / (RRF_K + vR + 1) : 0; + const kContrib = kR !== undefined ? (kw * RRF_NORMALIZE) / (RRF_K + kR + 1) : 0; const score = vContrib + kContrib; const result: SearchResult = { chunk: chunkById.get(id)!.chunk, score }; if (options.explain) { diff --git a/src/vectorstore/lancedb.ts b/src/vectorstore/lancedb.ts index 6e00d45..11614a1 100644 --- a/src/vectorstore/lancedb.ts +++ b/src/vectorstore/lancedb.ts @@ -4,6 +4,7 @@ import * as lancedb from "@lancedb/lancedb"; import type { Connection, Table, Version } from "@lancedb/lancedb"; import fs from "node:fs/promises"; +import path from "node:path"; import type { VectorStore, Chunk, SearchResult, MetadataFilter } from "../core/interfaces.js"; import { normalizeFilePath, manifestPathFor } from "../core/manifest.js"; @@ -502,11 +503,34 @@ export class LanceDbStore implements VectorStore { this.db = null; } + /** + * Back up the chunks.lance directory before a destructive operation. + * Creates a timestamped copy at chunks.lance.backup-. + * Skips if chunks.lance doesn't exist or noBackup is set. + * @returns The backup path, or null if nothing was backed up. + */ + private async backupBeforeClear(noBackup?: boolean): Promise { + if (noBackup) return null; + const lancePath = path.join(this.dbPath, "chunks.lance"); + try { + await fs.access(lancePath); + } catch { + return null; + } + const timestamp = new Date().toISOString().replace(/[:.]/g, "-"); + const backupPath = `${lancePath}.backup-${timestamp}`; + await fs.cp(lancePath, backupPath, { recursive: true }); + return backupPath; + } + /** * Remove all chunks by dropping the underlying LanceDB table. * Falls back to deleting the database directory if dropTable fails. + * @param options - Optional. Set `{ noBackup: true }` to skip backup (test use only). */ - async clear(): Promise { + async clear(options?: { noBackup?: boolean }): Promise { + const backup = await this.backupBeforeClear(options?.noBackup); + if (backup) console.warn(`[lancedb] Backed up chunks.lance to ${backup}`); await this.table?.close(); this.table = null; try { @@ -529,8 +553,25 @@ export class LanceDbStore implements VectorStore { /** * Completely remove the entire LanceDB database directory from disk. * All data is permanently lost. + * @param options - Optional. Set `{ noBackup: true }` to skip backup (test use only). */ - async dropDatabase(): Promise { + async dropDatabase(options?: { noBackup?: boolean }): Promise { + if (!options?.noBackup) { + // Back up the entire store directory since dropDatabase deletes it. + try { + await fs.access(this.dbPath); + } catch { + // nothing to back up + } + try { + const timestamp = new Date().toISOString().replace(/[:.]/g, "-"); + const backupPath = `${this.dbPath}.backup-${timestamp}`; + await fs.cp(this.dbPath, backupPath, { recursive: true }); + console.warn(`[lancedb] Backed up database to ${backupPath}`); + } catch { + // backup failed, continue anyway + } + } this.table = null; this.db = null; try { From a35ce6cfb5d4149f09fac9e49968e4340ef3c381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6llinger?= Date: Mon, 6 Jul 2026 13:44:23 +0200 Subject: [PATCH 15/15] docs: update hybrid search scoring details and clarify RRF implementation --- doc/configuration.md | 2 +- doc/evaluation.md | 2 +- doc/retrieval.md | 16 +++++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/configuration.md b/doc/configuration.md index 496ef93..5fd5d70 100644 --- a/doc/configuration.md +++ b/doc/configuration.md @@ -138,7 +138,7 @@ Controls how queries are matched against the index. | `topK` | `10` | Default number of chunks fetched per query | | `minScore` | `0.35` | Minimum relevance score (0–1) | | `hybridSearch.enabled` | `true` | Enable combined TF×IDF + vector search | -| `hybridSearch.keywordWeight` | `0.4` | Weight for keyword score in fusion: `(1-kw)*vScore + kw*kScore` | +| `hybridSearch.keywordWeight` | `0.4` | Keyword weight in RRF fusion: `vContrib = (1-kw)×(K+1)/(K+vRank+1)` | | `contextOptimization.enabled` | `true` | Enable post-retrieval optimization pipeline | | `contextOptimization.maxPerFile` | `3` | Max chunks per file in final result (0 = unlimited) | | `contextOptimization.mergeAdjacent` | `true` | Merge consecutive same-file chunks separated by ≤ gap | diff --git a/doc/evaluation.md b/doc/evaluation.md index 748ac82..207a719 100644 --- a/doc/evaluation.md +++ b/doc/evaluation.md @@ -250,7 +250,7 @@ node --import tsx src/eval/run-token-test.ts | 0.65 | Aggressive — broader injection, more coverage | | 0.50 | Maximum — all retrieval results injected | -The right threshold depends on your embedding model. Larger models (e.g., `bge-m3` at 1024d) produce higher relevance scores and work well at 0.85. Smaller models (e.g., `qwen3-embedding:0.6b` at 4096d) may need 0.65. +Scores are on a [0, 1] scale where 1.0 = perfect (rank 0 in both vector and keyword signals) and 0.6 = vector-only at rank 0. Larger models (e.g., `bge-m3` at 1024d) produce tighter score clusters and work well at 0.85. Smaller models (e.g., `qwen3-embedding:0.6b` at 4096d) may need 0.65. ### Verdict diff --git a/doc/retrieval.md b/doc/retrieval.md index 75dd12f..c64d7a1 100644 --- a/doc/retrieval.md +++ b/doc/retrieval.md @@ -45,18 +45,24 @@ The `KeywordIndex` (`src/retriever/keyword-index.ts`) is a zero-dependency inver ### Score Fusion -Results are merged via weighted combination: +Results are merged via **Reciprocal Rank Fusion (RRF)** with normalization to [0, 1]: ``` -score = (1 - kw) * vScore + kw * kScore +vContrib = (1 - kw) × (K + 1) / (K + vRank + 1) +kContrib = kw × (K + 1) / (K + kRank + 1) +score = vContrib + kContrib ``` Where: - `kw` = `retrieval.hybridSearch.keywordWeight` (default 0.4) -- `vScore` = vector similarity score (0–1) -- `kScore` = keyword TF×IDF score, normalized by top keyword result +- `K` = 60 (RRF rank constant) +- `vRank` = rank in vector search results (0-indexed) +- `kRank` = rank in keyword search results +- `(K + 1)` = normalization factor mapping the maximum score to exactly 1.0 -Low-scoring chunks that don't meet `minScore` are filtered out. +This produces scores on a [0, 1] scale. A result at rank 0 in both signals scores **1.0** (perfect). A vector-only result at rank 0 scores **0.6** (= 1 − kw). A keyword-only result at rank 0 scores **0.4** (= kw). + +RRF **rewards results that rank highly in both signals** over results that rank well in only one. When only one signal contributes, the ranking matches the raw vector order (normalization preserves monotonicity). Low-scoring chunks that don't meet `minScore` are filtered out. ### `retrieve()` API