LangExtract turns unstructured text into graph-ready entities and relationships while preserving the character offsets that ground each extraction in its source sentence. This addresses a common production failure: a graph claim without provenance cannot be cited or checked. section 12.1.1
A practical extraction workflow combines:
- A task prompt and a few examples describing the desired structured output. section 12.1.1
- Chunking, parallel calls, and multiple passes over long documents to recover entities missed in one pass. section 12.1.1
- Structured subject–predicate–object triplets that can be loaded into NetworkX, igraph, Neo4j, ArangoDB, or TigerGraph. section 12.1.1
- An HTML viewer that displays extractions against the original text for schema and provenance checks. section 12.1.1
From document to grounded graph
A document is split into windows, an LLM extracts people, places, concepts, and their relationships, and each resulting triplet retains its character offsets. The graph can then support answers whose entities trace back to source text. section 12.1.1
