Behaviour for LLM-powered entity/relation extraction.
The host app provides an llm_fn that makes the actual LLM call.
Recollect handles prompting, parsing, and validation.
Summary
Callbacks
Extract entities and relations from text.
Types
Callbacks
@callback extract(text :: String.t(), opts :: keyword()) :: {:ok, extraction_result()} | {:error, term()}
Extract entities and relations from text.
Returns {:ok, %{entities: [...], relations: [...]}} or {:error, reason}.