How do I correct a wrong fact in the brain?

Correct incorrect facts in Unison by writing the corrected version — the brain uses bitemporal supersession, so old facts are retired, not deleted.

The brain learned something incorrect. How do I fix it?

Write the corrected fact. Unison uses a bitemporal data model: when you write a new fact that supersedes an old one, the old fact is retired (it becomes historically true "as of" the time it was written, but no longer "currently true"). Recall surfaces the current version.

You don't need to delete the old fact manually.

Correcting a page

If the wrong fact lives in a page you wrote directly, overwrite it:

curl -X PUT https://brain.unisonlabs.ai/v1/brain/doc \
  -H "Authorization: Bearer $UNISON_TOKEN" \
  -H 'content-type: application/json' \
  -d '{
    "path": "/private/notes/db-choice.md",
    "bodyMd": "We use PostgreSQL 16. (Earlier notes incorrectly said MySQL.)",
    "title": "DB choice"
  }'

The new content is indexed immediately and takes precedence in recall.

Correcting a fact extracted from a conversation

If the wrong fact was extracted during conversation ingest, write an explicit correcting statement — either as a direct page or as a new short conversation:

curl -X POST https://brain.unisonlabs.ai/v1/brain/ingest \
  -H "Authorization: Bearer $UNISON_TOKEN" \
  -H 'content-type: application/json' \
  -d '{
    "items": [
      {
        "type": "conversation",
        "turns": [
          {"role": "user", "content": "Correction: we are NOT using MySQL. We use PostgreSQL 16."}
        ],
        "sourceRef": "correction-db-choice-2024-01",
        "visibility": "private"
      }
    ]
  }'

Checking what the brain currently believes

Use recall to verify:

curl 'https://brain.unisonlabs.ai/v1/brain/context?q=which+database+do+we+use&mode=deep' \
  -H "Authorization: Bearer $UNISON_TOKEN"

If weakEvidence is false and the contextMd now states PostgreSQL, the correction took effect.

On this page