API: extraction/evidence
better-web-search-mcp / extraction/evidence
extraction/evidence#
Interfaces#
Evidence#
Defined in: src/extraction/evidence.ts:18
A single piece of extracted content with provenance and confidence.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
confidence | number | Confidence in this evidence, 0..1. | src/extraction/evidence.ts:24 |
snippet? | string | A short snippet of the evidence, when available. | src/extraction/evidence.ts:28 |
source | EvidenceSource | Where the evidence came from (page, api, structured data, snippet). | src/extraction/evidence.ts:20 |
type | EvidenceSource | The kind of evidence, mirroring EvidenceSource. | src/extraction/evidence.ts:22 |
url | string | The URL the evidence was extracted from. | src/extraction/evidence.ts:26 |
FusedContent#
Defined in: src/extraction/evidence.ts:54
The final fused extraction returned to callers.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
api_endpoints | unknown | API endpoint payloads merged from all strategies. | src/extraction/evidence.ts:73 |
content | string | The best content, chosen by confidence. | src/extraction/evidence.ts:60 |
extraction | { confidence: number; method: FusionMethod; rendered: boolean; } | Metadata about the winning extraction method. | src/extraction/evidence.ts:62 |
extraction.confidence | number | The winning method’s confidence, 0..1. | src/extraction/evidence.ts:66 |
extraction.method | FusionMethod | The winning method name. | src/extraction/evidence.ts:64 |
extraction.rendered | boolean | Whether the content required a browser render. | src/extraction/evidence.ts:68 |
metadata | Record<string, string> | Page metadata (title, description, published, author, siteName). | src/extraction/evidence.ts:75 |
structured_data | unknown | Structured data merged from all strategies. | src/extraction/evidence.ts:71 |
title | string | The page title. | src/extraction/evidence.ts:58 |
url | string | The page URL. | src/extraction/evidence.ts:56 |
StrategyResult#
Defined in: src/extraction/evidence.ts:40
A single strategy’s contribution to the fused result.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
api_endpoints? | unknown | API endpoint payloads captured by this strategy. | src/extraction/evidence.ts:50 |
confidence | number | Confidence in this strategy’s content, 0..1. | src/extraction/evidence.ts:44 |
content | string | The extracted content (Markdown or plain text). | src/extraction/evidence.ts:46 |
method | FusionMethod | The extraction method that produced this content. | src/extraction/evidence.ts:42 |
structured_data? | unknown | Structured data (JSON-LD / hydration) found by this strategy. | src/extraction/evidence.ts:48 |
Type Aliases#
EvidenceSource#
EvidenceSource =
"page"|"api"|"structured_data"|"search_snippet"
Defined in: src/extraction/evidence.ts:11
The origin of a piece of extracted evidence.
FusionMethod#
FusionMethod =
"api"|"jsonld"|"rendered"|"readability"|"metadata"
Defined in: src/extraction/evidence.ts:32
The extraction strategies the fusion pipeline can score.