Dsxir.Optimizer.MIPROv2.Proposer.DatasetSummarizer (dsxir v0.2.0)

Copy Markdown

Asks the proposer LM to summarize the kind of task represented by a trainset.

A deterministic sample is taken (sorted by :erlang.phash2/1, first :sample_size examples), rendered as bullets, and fed to the LM. One LM call.

Summary

Functions

Summarize trainset via lm_module/lm_config. Supports the :sample_size option (default 5). Returns {:ok, summary} or {:error, exception}.

Functions

run(trainset, arg, opts \\ [])

@spec run([Dsxir.Example.t()], {module(), keyword()}, keyword()) ::
  {:ok, String.t()} | {:error, term()}

Summarize trainset via lm_module/lm_config. Supports the :sample_size option (default 5). Returns {:ok, summary} or {:error, exception}.