# `Arcana.Graph.RelationshipExtractor.LLM`
[🔗](https://github.com/georgeguimaraes/arcana/blob/main/lib/arcana/graph/relationship_extractor/llm.ex#L1)

LLM-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}`

# `build_prompt`

Builds the prompt for relationship extraction.

The prompt includes the source text and a list of entities
for the LLM to find relationships between.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
