Arcana.Graph.RelationshipExtractor.LLM (Arcana v1.3.3)
View SourceLLM-based relationship extraction implementation.
Uses structured prompts to identify semantic relationships between previously extracted entities. The LLM returns JSON-formatted relationships with type, description, and strength.
Usage
# Configure with an LLM function
extractor = {Arcana.Graph.RelationshipExtractor.LLM, llm: my_llm_fn}
{:ok, relationships} = RelationshipExtractor.extract(extractor, text, entities)Options
:llm- Required. An LLM function(prompt, context, opts) -> {:ok, response} | {:error, reason}
Summary
Functions
Builds the prompt for relationship extraction.