Dsxir. Demo
(dsxir v0.1.0)
Copy Markdown
A demo slotted into a predictor by an optimizer.
Wraps a %Dsxir.Example{} with a provenance tag. The chat adapter and the
json adapter render %Dsxir.Demo{} and %Dsxir.Example{} identically; the
tag is preserved across save/load via Dsxir.Artifact.
kind values:
:labeled- slotted directly from the trainset, no LM call.:bootstrapped- captured from a successfulDsxir.with_trace/1round run by an optimizer (e.g.Dsxir.Optimizer.BootstrapFewShot).
source is populated only for :bootstrapped demos and carries the round
index plus the trainset example index that produced the captured trace.
Summary
Functions
Wrap ex as a bootstrapped demo captured from a successful trace round.
source records the round and trainset example that produced it.
Wrap ex as a labeled demo (provenance: directly from the trainset).
Types
@type kind() :: :labeled | :bootstrapped
@type source() :: nil | %{round: pos_integer(), example_index: non_neg_integer()}
@type t() :: %Dsxir.Demo{example: Dsxir.Example.t(), kind: kind(), source: source()}
Functions
@spec bootstrapped(Dsxir.Example.t(), source()) :: t()
Wrap ex as a bootstrapped demo captured from a successful trace round.
source records the round and trainset example that produced it.
@spec labeled(Dsxir.Example.t()) :: t()
Wrap ex as a labeled demo (provenance: directly from the trainset).