You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
report hybrid leg failure when survivor is empty (#231)
* report hybrid leg failure when survivor is empty
* hybrid empty-survivor degradation and PR #231 review follow-ups
* moved fixed items on top
---------
Co-authored-by: zho <jornathanm910923@gmail.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,10 @@ Tagged releases are published to npm from GitHub Actions when a **GitHub Release
26
26
27
27
-**Breaking (library):** Trimmed internal-only re-exports from the package root and `/alliance` entry to shrink the public surface and blast radius: `trimOptional`, `createUnconfiguredAllianceContext` (core), and the concrete URL generators `generatorMailing`, `generatorSlackCpplang` (alliance). These were internal helpers, not part of the documented API; register built-ins via `registerBuiltinUrlGenerators` and build contexts via `createServer` / `createIsolatedContext`. A snapshot test now guards the runtime export surface so internal symbols cannot leak back in. See [MIGRATION.md](docs/MIGRATION.md#internal-only-re-exports-removed-203). (#203)
28
28
29
+
### Fixed
30
+
31
+
-**Hybrid query degradation:** When exactly one search leg fails and the surviving leg returns zero hits, `query` / `query_documents` / `guided_query` now set `experimental.hybrid_leg_failed` and `experimental.degraded: true` with `degradation_reason``dense_leg_failed` or `sparse_leg_failed`, so empty results from a leg failure are distinguishable from a legitimately empty namespace. (#228)
When reranking is requested but the rerank API fails, the server still returns **`status: 'success'`**with rows where `reranked: false`, plus **experimental** envelope fields:
214
+
Hybrid `query` / `query_documents` responses use **`status: 'success'`**even when confidence is reduced. The server sets **experimental** envelope fields when reranking fails or when exactly one hybrid leg fails and the surviving leg returns zero hits:
215
215
216
216
| Field | When set | Meaning |
217
217
| ----- | -------- | ------- |
218
-
|`experimental.degraded`|`true`| Rerank was attempted and failed (or another degradation path fired) |
219
-
|`experimental.degradation_reason`| string | Human-readable detail for MCP/LLM clients (e.g. `rerank_failed: timeout after 5000ms`) |
220
-
|`experimental.hybrid_leg_failed`|`'dense'`\|`'sparse'`| Exactly one hybrid search leg failed while the other returned hits |
218
+
|`experimental.degraded`|`true`| Rerank was attempted and failed, **or** one hybrid leg failed with an empty survivor |
|`experimental.hybrid_leg_failed`|`'dense'`\|`'sparse'`| Exactly one hybrid search leg failed (survivor may have hits or be empty) |
221
+
222
+
When `hybrid_leg_failed` is set and `degraded` is `false`, the survivor leg returned hits (partial hybrid). When both are set with zero `results`, a leg failed — not a confidently empty namespace.
221
223
222
224
Treat **`experimental.degraded: true`** as lower confidence even when `status` is `success`. Combine with per-row `reranked`, `preset`, and `use_reranking`. Structured stderr logs may include additional detail.
0 commit comments