LangExtract.Extraction (LangExtract v0.8.0)

Copy Markdown View Source

A single extraction: an entity class, its verbatim source text, and arbitrary attributes.

Appears on both sides of the LLM exchange: as expected output inside few-shot examples (LangExtract.Template.Example) and as parsed output from the model's reply. Positional information is added later by the aligner on %LangExtract.Alignment.Span{}.

Summary

Types

t()

@type t() :: %LangExtract.Extraction{
  attributes: map(),
  class: String.t(),
  text: String.t()
}