MCPcopy Create free account
hub / github.com/ZenSystemAI/Zengram / clampEfSearch

Function clampEfSearch

api/src/services/pgvector.js:56–59  ·  view source on GitHub ↗
(limit)

Source from the content-addressed store, hash-verified

54// client_id post-filtering without collapsing recall on sparse tenants, capped
55// so a huge limit can't blow up query latency.
56export function clampEfSearch(limit) {
57 const n = Number.isFinite(limit) ? Math.floor(limit) : 10;
58 return Math.max(40, Math.min(n * 2, 400));
59}
60
61// Whether >2000-dim vectors force the halfvec code path.
62export function halfvecMode(dims) {

Callers 2

searchPointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected