CouncilEx.AutoCouncil.Strategies.LLMClassify (CouncilEx v0.1.0)

Copy Markdown View Source

Stub. LLM-classifier strategy: a cheap model picks one catalog id given the prompt and the catalog descriptions. Returns the matching council.

Planned interface

AutoCouncil.new(
  strategy: :llm_classify,
  catalog:  catalog,                  # entries need :id and :desc
  options:  [
    profile:        "openai_mini",   # registered profile to call
    system_prompt:  nil,             # override default classifier prompt
    max_tokens:     200
  ]
)

Catalog entries must carry :id and :desc. The strategy will format the catalog as a JSON list, ask the model to emit {"id": "...", "reason": "..."}, parse the response, and look the id up.

Open design questions (deferred)

  • Structured output: JSON Schema vs free-form + parse.
  • What to do on parse failure: retry once, fall back, error.
  • Budget cap (cost ceiling per route).

Cache notes (also deferred — see Embedding moduledoc)

Calling resolve/2 today returns {:error, :not_implemented}.