1 Commits

Author SHA1 Message Date
KS Jannette
f5d1718b71 test 2026-05-11 15:58:27 -04:00
2 changed files with 1 additions and 18 deletions

View File

@@ -61,24 +61,6 @@ When a user submits a query, the system enforces groundedness through a multi-l
of the cited chunks. The similarity is calibrated to a 0–1 scale and averaged, producing a single
groundedness score that is surfaced to the user with a visual indicator (green/yellow/red).
## Similarity Metrics for Semantic Understanding - basics
Cosine similarity measures how closely two vectors (representing data like words, images, or preferences) are aligned in a multi-dimensional space by calculating the cosine of the angle between them.
Archetypical cosine scores range from -1 to 1.
1: Vectors point in the exact same direction (highly similar).
0: Vectors are at a 90-degree angle (orthogonal/unrelated).
-1: Vectors point in opposite directions.
## The role of rerank models
Rerankers are high-precision, fine second (or third) stage filters. Rerankers run "from scratch" on query-source/answer-source pairs and are computationally expensive.
A reranker assigns relevance scoring by evaluating query-source/answer-source pair similarity within a multi-dimensional vector space. They should be RAG-pipeline-downstream of embedding models, which are "coarse" - and occasionally yield false positives on semantically irrelevant chunks.
Reranker are justifiable and high-value where 1. accuracy is at an absolute premium because of the magnitude of downside risk (ex. uses cases: litigation, health care and medical research science) 2. token-economization heuristics exist at earlier pipeline stages, and 3. system and network latency reduction is optimized.
## Design
Two-package monorepo:

View File

@@ -19,3 +19,4 @@ export function deleteVectorsForChunks(chunkIds: string[]): void {
vectors.delete(id);
}
}
// test