---
title: "What is fact extraction?"
description: "Fact extraction turns raw text into structured facts: subject, value, and the time each applies to. Definition, pipeline steps, and a worked example."
canonical: https://past.dev/glossary/fact-extraction
last-updated: 2026-09-02
---
# What is fact extraction?

Source: https://past.dev/glossary/fact-extraction

Fact extraction is the step that turns raw text into structured facts: who or what each fact is about, its value, and the time it applies to. From the sentence "we moved the launch to May 12" it produces a fact with subject launch date, value May 12, stated April 3. Extraction is what makes stored text queryable as knowledge rather than only searchable as text.

## How fact extraction works

1. **Identify the subject**: what the statement is about (a person, a project, an account).
2. **Extract the value**: the claim made about it (a date, an owner, an amount, a status).
3. **Date it**: attach the event time the fact applies to, taken from the source's timestamp or from dates stated in the text.
4. **Attribute it**: link the fact to its source record for [provenance](/glossary/data-provenance).

Extraction runs at ingestion, before storage. The output is a fact that can be compared with other facts: two extracted facts about the same subject can agree, conflict, or supersede one another. Raw text supports none of those operations.

## Why it matters for AI agents

Similarity search over raw text finds related passages. It cannot decide whether two passages state the same fact, contradictory facts, or an old and a new value of one fact. Extraction makes that decision a comparison over fields.

- **Updates become explicit**: a new value for a known subject closes the old one. See [knowledge update](/glossary/knowledge-update).
- **Conflicts become detectable**: two sources disagreeing about one subject is a comparison over structured fields.
- **Entities connect**: "Elena", "E. Marti" and "the CFO" attach to one subject after [entity resolution](/glossary/entity-resolution).

past.dev runs this step at ingest: POST /api/v1/ingest takes raw text with a timestamp, and recall returns the structured, dated facts derived from it.

## Fact extraction in practice

Input, one sentence from an email Priya Shah sent on April 3, 2026:

```emailtextinput
We moved the launch to May 12 to clear the security review.
```

```extractedfactoutput
{
  "subject": "Orion launch date",
  "value": "2026-05-12",
  "eventTime": "2026-04-03",
  "source": "email from Priya Shah, 2026-04-03"
}
```

The sentence and the fact carry the same information. Only the fact supports queries for the current launch date, the launch date as of April 1, and who stated it.

## Related concepts

- **[Entity resolution](/glossary/entity-resolution)**: linking extracted subjects that refer to the same real thing.
- **[Coreference resolution](/glossary/coreference-resolution)**: resolving pronouns and mentions inside the text before extraction.
- **[Knowledge update](/glossary/knowledge-update)**: what happens when a new fact replaces an extracted value.
- **[Memory graph](/glossary/memory-graph)**: the structure extracted facts are stored into.
- **[Grounding](/glossary/grounding)**: citing the source text each extracted fact came from.

## Frequently asked questions

### What does fact extraction mean in AI memory?

It is the ingestion step that converts raw text such as emails or transcripts into structured facts, each with a subject, a value, and the time it applies to. The structure is what lets a memory system compare, update, and date what it knows.

### How is fact extraction different from embedding text?

Embeddings capture similarity and support finding related passages. Extraction captures meaning as fields, which supports detecting agreement, contradiction, and replacement between statements. Many systems use both.

### What happens if extraction gets a fact wrong?

The wrong fact is stored and can surface at recall, which is why extracted facts should keep links to their source text. Source links let a wrong fact be traced, corrected, or removed along with its source.

## Related

- [Entity resolution](https://past.dev/glossary/entity-resolution)
- [Knowledge update](https://past.dev/glossary/knowledge-update)
- [Facts that change over time](https://past.dev/guides/facts-that-change-over-time)
- [Memory API quickstart](https://past.dev/docs/memory-api/quickstart)
- [Benchmark methodology](https://past.dev/benchmarks/methodology)