MultiDocumentGraphBuilder
org.llm4s.knowledgegraph.extraction.MultiDocumentGraphBuilder
Orchestrates multi-document knowledge graph extraction.
Composes the extraction pipeline:
- Per document: coreference resolution → schema-guided (or free-form) extraction → schema validation
- After all documents: merge graphs → entity linking → final SourceTrackedGraph
Supports incremental building: pass an existing SourceTrackedGraph to add new documents without re-extracting from previously processed ones.
Value parameters
- config
-
Configuration controlling which pipeline stages are enabled
- llmClient
-
The LLM client used by all pipeline components
Attributes
- Example
-
val builder = new MultiDocumentGraphBuilder(llmClient, ExtractionConfig( schema = Some(ExtractionSchema.simple(Seq("Person", "Org"), Seq("WORKS_FOR"))) )) val docs = Seq( ("Alice works at Acme.", DocumentSource("doc1", "Report 1")), ("Bob works at Acme.", DocumentSource("doc2", "Report 2")) ) val result = builder.extractDocuments(docs) - Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article