Skip to Content

extractFacts

extractFacts(messages: AutoExtractMessage[], options: ExtractFactsOptions): Promise<ExtractedCandidate[]>

Defined in: src/lib/memory/autoExtract.ts:115 

Stage 1 — call the LLM to extract candidate facts from the recent conversation. Returns post-validated candidates only (confidence threshold, source-id check, length cap, schema validation). Returns an empty array if the LLM emits malformed JSON or no candidates.

Parameters

ParameterType

messages

AutoExtractMessage[]

options

ExtractFactsOptions

Returns

Promise<ExtractedCandidate[]>

Last updated on