Automatic entity and relationship extraction from ingested episodes.

Entity Extraction

CortexDB automatically extracts entities and relationships from captured experiences. Extraction runs asynchronously -- it does not block the write path.

What Gets Extracted

  • Named entities: People, organizations, technologies, services, projects, features
  • Relationships: How entities relate (owns, uses, depends_on, caused, etc.)
  • Entity types: Categorization into predefined and discovered types
  • Aliases: Different names for the same entity are resolved (e.g., "Bob", "[email protected]", "Robert")

Configuration

On self-hosted deployments, control LLM-based extraction through environment variables:

VariableDefaultDescription
CORTEX_ENRICHMENT_DELAY_SECONDSunsetEnables the background enrichment scanner that drives LLM fact/entity extraction. Unset means no background LLM extraction runs (writes still succeed).
CORTEX_ENRICHMENT_MODELunsetExtraction model (e.g. gpt-4o-mini). Must be set to enable the enrichment LLM.
CORTEX_ENRICHMENT_URLhttps://api.openai.com/v1OpenAI-compatible endpoint for the extraction LLM (falls back to CORTEX_LLM_URL).
CORTEX_ENRICHMENT_API_KEYfalls back to OPENAI_API_KEY / LLM_API_KEYCredential for the extraction LLM.

Without an LLM API key, CortexDB falls back to rule-based entity extraction — writes still succeed, but the knowledge graph is less rich.

Extraction Quality

For best results, provide well-structured content with clear entity mentions. CortexDB uses LLM-based extraction to identify entities and relationships from natural language.

Note

If the extraction service is temporarily unavailable, experiences are still captured and searchable. Extraction will catch up when the service recovers.