Skip to Content
Anuma SDKReactInternalFunctionsclassifyInjectionCandidates

classifyInjectionCandidates

classifyInjectionCandidates(candidates: readonly ExtractedCandidate[], options: InjectionClassifierOptions): Promise<{ flagged: Set<number>; }>

Defined in: src/lib/memory/injectionClassifier.ts:74 

Classify already-clean extraction candidates for signature-free injection / poisoning. Returns the set of 0-based indices (into candidates) the model flagged as poison.

FAILS CLEAN: returns an empty set on empty input, missing auth, LLM error, or any malformed response — the caller then keeps every candidate clean, so this layer can only ever ADD quarantines, never suppress a legitimate fact on failure. Makes at most ONE portal call regardless of candidate count.

Parameters

ParameterType

candidates

readonly ExtractedCandidate[]

options

InjectionClassifierOptions

Returns

Promise<{ flagged: Set<number>; }>

Last updated on