Repository navigation
docs: registry-first README for @corbits/reranking (CL-8775) - #4
Merged
Merged
Conversation
Replace the git-install README with the Interchange section shape: Install / Use / Full example / How it works / Contributing.
Use Quickstart / How it works / Development / License instead of Install / Use / Full example / Contributing.
The prior Quickstart hardcoded a localhost baseURL and always-succeeds call with no failure handling. Real retrieval pipelines read the reranker endpoint from host config at boot (fail fast on a half-configured reranker) and degrade to their own fused order when a rerank call fails, so a reranker outage never fails search.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the git-install README with a registry-first README: Install, Use, Full example, How it works, Contributing.
Quickstart now models the real production call site, not a toy example: read
RERANK_BASE_URL/RERANK_MODELfrom host config at boot (fail fast on a half-configured reranker, matching how retrieval pipelines already treat this endpoint), callrerankDocumentswith typedRerankDoc[]candidates, and fall back to the caller's own fused order in acatchwhen the reranker is unavailable — the degrade-soft policy real retrieval pipelines apply so a reranker outage never fails search.Verification
npm/pnpm/yarn/bunof@corbits/reranking(nogithub:URL)rerankDocumentsfromsrc/index.ts, with real exported types (RerankDoc,RerankResult) and@intx/inference'screateDefaultScheduler— the samedeps = { fetch, scheduler }shape production hosts already build for chat and embeddings@corbits/memory's hybrid search pipeline wires its own rerank client (RERANK_BASE_URL/RERANK_MODEL, fail-fast boot, fallback to fused ranking on failure)tsconfig.json(bunx tsc --noEmit)package.jsonscripts (build,test,typecheck); Node >= 24 / Bun >= 1.2.0Fixes CL-8775
Follow-up
catch {}block silently swallowed a reranker outage.rerankFusedCandidatesnow takes anonError: (error: unknown) => voidhost callback, reports the caught error through it, then falls back to the fused order — same degrade-soft behavior, but the failure is now surfaced instead of hidden.