Compare commits
5 Commits
update-REA
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6387a84558 | |||
| ef44f52fa2 | |||
| ab068ba43f | |||
| 58e85c00f8 | |||
|
|
6edee1df6e |
18
README.md
18
README.md
@@ -61,6 +61,24 @@ 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
|
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).
|
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
|
## Design
|
||||||
|
|
||||||
Two-package monorepo:
|
Two-package monorepo:
|
||||||
|
|||||||
Reference in New Issue
Block a user