Principle:1broseidon Ketch Layered Fallback
| Knowledge Sources | |
|---|---|
| Domains | Extraction, Resilience |
| Last Updated | 2026-10-27 00:00 GMT |
Overview
A design pattern in which a pipeline tries its best method first and falls back through progressively more general (but less precise) methods, so the common case is high-quality and the pathological case still returns something.
Theoretical Basis
A layered fallback trades simplicity for coverage. The first layer is the most precise but the most brittle (works only when the input declares what the layer expects); each subsequent layer handles more inputs but with lower quality. The contract is that every input produces output — the last layer is a raw conversion that cannot fail to produce something.
Keth's extraction pipeline is the canonical example: semantic extraction (reads declared structure) → readability (scores candidates) → raw HTML→markdown (converts everything). A raw-table fallback sits between readability and raw to recover data tables the readability article dropped. The same shape appears in the scrape pipeline (HTTP → browser) and the search surfaces (auto → next provider).
Usage
Use when a method has a high-quality but narrow-applicable path and broader but lower-quality alternatives. Order layers by quality descending; make the last layer unable to fail. Never let a higher layer's exception propagate past a lower layer that could have produced output.