The extraction task definition: a plain-language description of what to extract, plus few-shot examples showing the expected output.
There is no schema DSL and no fine-tuned model — the template is rendered
into a few-shot prompt by LangExtract.Prompt.Builder, and the examples
are what teach the model the class vocabulary, span granularity,
attributes, and output format.
Build templates with LangExtract.template/2, which accepts plain maps
for examples (string or atom keys, so JSON-loaded task definitions work
verbatim) and validates them against the production aligner, raising on
malformed or misaligned input. The struct is public for pattern
matching and introspection.
Summary
Types
@type t() :: %LangExtract.Template{ description: String.t(), examples: [LangExtract.Template.Example.t()] }