# `Arcana.Agent.Expander.LLM`
[🔗](https://github.com/georgeguimaraes/arcana/blob/main/lib/arcana/agent/expander/llm.ex#L1)

LLM-based query expander.

Uses the configured LLM to add synonyms and related terms to queries.
This is the default expander used by `Agent.expand/2`.

## Usage

    # With Agent pipeline (uses ctx.llm automatically)
    ctx
    |> Agent.expand()
    |> Agent.search()
    |> Agent.answer()

    # Directly
    {:ok, expanded} = Arcana.Agent.Expander.LLM.expand(
      "ML models",
      llm: &my_llm/1
    )

---

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