# `Arcana.Pipeline.Expander.LLM`
[🔗](https://github.com/georgeguimaraes/arcana/blob/main/lib/arcana/pipeline/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 `Pipeline.expand/2`.

## Usage

    # With Arcana.Pipeline (uses ctx.llm automatically)
    ctx
    |> Pipeline.expand()
    |> Pipeline.search()
    |> Pipeline.answer()

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

---

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