Skip to main content
A minimal guide to settling a stored conflict yourself. Use it when two sources disagree on a fact that never changes over time, such as where a company was founded, so conflict review cannot pick a winner, and you want to record which fact you accept.

Before You Start

Code in Action

What Just Happened

Step 1: Remember Two Disagreeing Sources

Each source is stored as its own labelled 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

A founding city never changes, so the review stores the disagreement as a conflict but cannot choose a winner, and leaves it unresolved. 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

A later conflict review does not overturn your decision. It keeps it for as long as the selected fact exists. Calling 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.