Glossary
Temporal knowledge graph
A temporal knowledge graph is a data structure where entities (people, brands, competitors, trends) and their relationships are stored in a graph with validity timestamps (valid_from / valid_to), letting an AI agent reason about how facts change over time without hallucinating stale information.
Also known as
- knowledge graph
- temporal KG
Without a temporal dimension, a knowledge graph drifts fast: a brand that repositions, a creator who pivots to a new niche, a competitor that exits the market — all of these events produce facts that eventually become false. A KG without `valid_to` will keep propagating the old fact as current truth.
The temporal pattern, inspired by Graphiti (Apache-2.0): every relation carries a `valid_from` (when the fact became true) and a `valid_to` (when it stopped being true). When a new observation contradicts an old one, you don't delete the old record — you set its `valid_to = now()`, and the new one takes valid_from=now() with valid_to=null. The agent can then filter to "only facts valid today" without losing history.
Typical 2026 implementation: Postgres + pgvector for entity embeddings, a kg_entities + kg_relations schema with temporal columns, recall via a WITH RECURSIVE query performing a BFS limited to 2 hops.
In the getchatsocial.com product
getchatsocial.com maintains a per-workspace temporal KG with 8 entity types (brand, competitor, audience, content, trend, creator, topic, platform_account). Hybrid embedding + 1-hop relation recall is injected into the system prompt as a "Known context" block.
FAQ
Why not a classic Neo4j graph database?
For a product serving 100–1,000 workspaces, Postgres + pgvector is simpler to operate (single database, native RLS, trivial backups). Neo4j becomes relevant once you exceed several million entities per tenant.
What happens when a fact is only partially contradicted?
The extractor can create multiple relations with differentiated confidence scores. Final arbitration is delegated to a re-ranker at recall time, which weights by confidence × recency.