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

LLM-based combined entity and relationship extraction.

Extracts both entities and relationships in a single LLM call,
which is more efficient than separate extractors.

## Usage

    extractor = {Arcana.Graph.GraphExtractor.LLM, llm: my_llm}
    {:ok, result} = GraphExtractor.extract(extractor, text)

## Configuration

    config :arcana, :graph,
      extractor: Arcana.Graph.GraphExtractor.LLM

The LLM is automatically injected from the global `:arcana, :llm` config.

## Options

  - `:llm` - Required. An LLM tuple like `{"openai:gpt-4", api_key: "..."}` or function

# `build_prompt`

Builds the prompt for combined entity and relationship extraction.

---

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