MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / sigmoid

Function sigmoid

src/core/reranker.ts:212–212  ·  view source on GitHub ↗
(x: number)

Source from the content-addressed store, hash-verified

210 // Rebuild the result array: reranked top-K + unchanged rest
211 // Sigmoid normalizes raw logits to [0,1] so downstream quality gating works
212 const sigmoid = (x: number) => 1 / (1 + Math.exp(-x));
213 const reranked = scored.map(({ result, crossScore }) => ({
214 ...result,
215 score: sigmoid(crossScore)

Callers 1

rerankFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected