Skip to main content

Module extract

Module extract 

Source
Expand description

Conversation chunking and LLM-powered entity/relationship extraction.

Functions§

chunk_conversation
Split conversation text into chunks of approximately target_tokens tokens.
extract_from_chunk
Extract entities and relationships from a conversation chunk using an LLM.
flatten_extraction
Convert cases, patterns, and preferences into ExtractedEntity entries so they go through the same dedup pipeline.
parse_extraction_response
Parse the LLM’s JSON response into an ExtractionResult. Defensively handles markdown fencing and malformed JSON.