Skip to main content
cognee-rust mirrors Python’s summarization_model cognify knob as CognifyConfig.summary_schema, consumed by the standalone cognify pipeline. Its graph-extraction counterpart is the custom graph schema.

What it does

Replaces the default SummarizedContent shape requested from the LLM during the summarization stage with your own JSON Schema. Mirrors Python’s CognifyConfig.summarization_model.

Requirement

The schema must contain a string summary property — the pipeline reads summary to build each TextSummary. This is validated up front by validate_summary_schema, so a bad schema fails at config time rather than mid-pipeline.

Example (programmatic)

This path is consumed: the summarization task constructs SummaryExtractor::new_with_schema(llm, config.summary_schema) (crates/cognify/src/tasks.rs), and the extractor requests the custom schema when it is Some (crates/cognify/src/summarization/extractor.rs).

Via top-level config

cognee exposes a runtime setter mirroring Python’s cognee.config.set_summarization_model(...):
Settings::cognify_config applies it, so every cognify run started from these settings requests this shape. It can be set only programmatically or through a binding’s set: it has no env var and is not saved, so cognee-cli cannot set it.

Pointers