Nirmos
Knowledge

Retrieval configuration

Configure filters, thresholds, pagination, and search readiness.

Use filters to restrict which evidence a search can return. filters accepts bounded scalar equality conditions, including sourceType; documentIds restricts up to 100 documents. These filters supplement organization and base ownership checks.

Thresholds and scores

minScore is semantic-only. It is a similarity threshold for cosine/dot, and a maximum distance for Euclidean search. Exact scores are null; Hybrid scores are raw rank-fusion values. Do not reuse a semantic cutoff as a Hybrid threshold or read scores as relevance percentages.

Pass the returned cursor with the same query, mode, topK, filters, and threshold:

const request = {
  query: "refund request 30 days",
  mode: "hybrid" as const,
  topK: 5,
};
const firstPage = await nirmos.knowledge.search("knowledge-base-id", request);
if (firstPage.nextCursor) {
  const next = await nirmos.knowledge.search("knowledge-base-id", {
    ...request,
    cursor: firstPage.nextCursor,
  });
  console.log(next.items);
}

Semantic/Hybrid use a bounded ranked window, currently 50-400 candidates depending on topK. Ordered IDs/scores live briefly in existing Redis, with a ten-minute expiry and bounded per-organization sessions. Later pages generate no new embeddings. Each page revalidates current records; updated/deleted chunks can disappear. Cursor expiry, eviction, or changed parameters requires a new search. Exact Text scrolls matching points in deterministic point-ID order and can traverse all matches. Concurrent index changes are not a snapshot guarantee. No search streaming is exposed.

Search readiness

Existing dense-only KBs need an operator-run lexical backfill. Semantic search continues during that process. Exact becomes ready after text payload coverage and its phrase index pass audit; Hybrid waits for sparse coverage audit. Readiness can be ready, pending, backfilling, failed, or unsupported. Qdrant 1.19.1 or newer is required for lexical indexing. The dashboard shows readiness and enables supported modes. A premature request receives 409 KNOWLEDGE_SEARCH_MODE_UNAVAILABLE, rather than incomplete results.

Ask the deployment administrator to complete lexical indexing or repair an unavailable mode. Backfill can preserve existing dense embeddings; missing dense data requires ordinary reindexing. SDK consumers inspect readiness with searchStatus() (knowledge:read) before selecting a search mode.

Invalid filters or mode/threshold combinations are validation failures. 409 KNOWLEDGE_SEARCH_MODE_UNAVAILABLE indicates unavailable indexing. Cursor expiry or changed search parameters requires restarting the search. Embedding/storage failures are errors, not empty result sets.

Search guide · Knowledge methods

On this page