Version: latest
agrag.common.data_models.evidence.EvidenceSearchHit
Bases: BaseModel
One visible passage found by search.
Attributes:
- evidence_id (
str) – The evidence id of the passage. Pass it to fetch and check_citations. - document_key (
str) – The key of the document the passage belongs to. - title (
str) – The title of that document. - content_hash (
str) – The full sha256 content hash of the current version. - location (
EvidenceLocation) – The offsets or pages of the passage. The passage is a whole chunk, so the range can be wider than the text that matched. - heading_path (
list[str]) – The headings above the passage, from the outermost to the innermost. Empty when the passage has none. - snippet (
str) – The first characters of the passage text. - score (
float) – An ordering value. Higher scores rank first within one result. A score is not a confidence, and it is not a probability that the passage supports a claim. Its scale depends on the legs that found the passage. - legs (
list[EvidenceSearchLeg]) – The legs that found the passage. - run (
DocumentRunStatus | None) – The run that saves the document, or None when it has none. The status gives the chunks done, left and failed, so a reader can tell whether the document is still being saved.
content_hash
content_hash: str
document_key
document_key: str
evidence_id
evidence_id: str
heading_path
heading_path: list[str] = Field(default_factory=list)
legs
legs: list[EvidenceSearchLeg]
location
location: EvidenceLocation
run
run: DocumentRunStatus | None = None
score
score: float
snippet
snippet: str
title
title: str