surfaceextractionrich_triples
Extractionscalar · returns json

RICH_TRIPLES

Extract (subject, predicate, object, evidence) knowledge graph triples with source context

Per-row — runs once for each row.

extractionllmtext

Syntax

RICH_TRIPLES({{ text }})
RICH_TRIPLES({{ text }}, '{{ focus }}')
{{ text }} RICH_TRIPLES

Arguments

nametypedescription
textVARCHAR
focus(optional)VARCHARFocus area: 'people', 'organizations', 'decisions', 'events', 'all'

About

Extract knowledge graph triples with supporting evidence from text. Like TRIPLES, but each triple includes the source text snippet that supports it - perfect for tooltips, audit trails, and explainability. Output is graph-table compatible: can be transformed into relational node/edge tables using the TO_PROPERTY_GRAPH pipeline. Perfect for: - Knowledge graphs with provenance - Explainable AI pipelines - Network visualizations with tooltips - Audit trails for extracted facts

Examples

Extracts triples with supporting evidence

SELECT
  rich_triples (
    'John Smith works at Acme Corp as a software engineer. He reports to Jane Doe.'
  )

Extracts decisions with context

SELECT
  rich_triples (
    'The Q3 budget of $500K was approved by Mike on Tuesday.'
  )

Nearby rabbit holes

same domain
Climb back to The Looking Glass