Expand description
Knowledge distillation pipeline: fragments → structured knowledge pages.
Clusters related lifecycle records and synthesizes them into reusable knowledge pages (memory_type: “knowledge”, source_kind: Distilled).
§Phase 2: LLM-assisted synthesis
When a SamplingClient is available (MCP session with sampling
capability), synthesize_with_sampling sends fragment clusters to
the LLM for intelligent synthesis. The LLM produces structured
knowledge pages with proper sections, cross-references, and
synthesized insights. Falls back to template synthesis when sampling
is unavailable or fails.
Structs§
- Crystallize
Result - Result of a crystallize operation (LLM or template).
- Knowledge
Page Draft
Functions§
- apply_
distill - Persist knowledge page drafts as candidate records in the ledger.
- auto_
compile_ from_ config - Auto-compile 入口: 在 lifecycle write 之后检测新可合并集群,auto-propose 为 candidate。
- detect_
knowledge_ clusters - Detect clusters of fragments and synthesize knowledge page drafts.
- synthesize_
with_ sampling - Synthesize knowledge pages from detected clusters using an LLM via the MCP sampling reverse-call. Falls back to template synthesis when sampling is unavailable or returns an unparseable response.