Before You Start
- Complete Quickstart to understand basic operations
- Ensure you have LLM Providers configured
- Read Review Conflicting Facts for how
improve(review_conflicts=True)finds and stores conflicts - Keep
EDGE_EVIDENCE_ENABLEDat its defaulttrue. Conflict review is skipped when it is off
Code in Action
What Just Happened
Step 1: Remember Two Disagreeing Sources
DataItem in one dataset. self_improvement=False keeps remember() from running improve() on its own, so the conflict review runs only when the script asks for it. The dataset id is kept because the conflict functions take an id, not a name.
Step 2: Review and List the Unresolved Conflict
cognee.list_conflicts() returns the dataset’s conflicts, and status can narrow them to "resolved" or "unresolved". Each conflict lists its competing facts with their ids and text.
Step 3: Resolve the Conflict
cognee.resolve_conflict() records which fact you accept. selected_fact_id must be the id of one of the conflict’s facts, or the call raises a validation error. The other facts are not deleted: they stay in the graph as superseded. Recall applies the decision at query time, with no further improve() run: graph completion drops the rejected facts from its context and states the accepted one, so the answer printed after the decision follows your choice.
Step 4: Confirm the Decision Is Kept
resolve_conflict() again with a different fact replaces the earlier decision. See list_conflicts() and resolve_conflict() for the full signatures, permissions, and the HTTP endpoints.
Review Conflicting Facts
How conflict review finds disagreeing facts and stores them.
Self-Improving Memory Quickstart
How
improve() runs its stages and what each one does.