# LangExtract v0.7.0 - Table of Contents

> Extract structured data from text using LLMs with source grounding.
Maps every extraction back to exact byte positions in the source.
Supports Claude, OpenAI, and Gemini providers. Elixir port of google/langextract.

## Pages

- [LangExtract](readme.md)
- [Alignment and Spans](alignment.md)
- [Telemetry](telemetry.md)
- [Running in Production](production.md)
- [Changelog](changelog.md)

## Modules

- Core
  - [LangExtract](LangExtract.md): Extracts structured data from text with source grounding.
Maps extraction strings back to exact byte positions in source text.
  - [LangExtract.Client](LangExtract.Client.md): A configured LLM client for extraction.
  - [LangExtract.Extraction](LangExtract.Extraction.md): A single extraction: an entity class, its verbatim source text, and
arbitrary attributes.
  - [LangExtract.Template](LangExtract.Template.md): The extraction task definition: a plain-language description of what to
extract, plus few-shot examples showing the expected output.
  - [LangExtract.Template.Example](LangExtract.Template.Example.md): A single few-shot example: a sample `text` paired with the extractions
expected from it.
  - [LangExtract.WireFormat](LangExtract.WireFormat.md): Port between external LLM format and internal domain.

- Prompt
  - [LangExtract.Prompt.Builder](LangExtract.Prompt.Builder.md): Renders Q&A-formatted prompts from a template for LLM extraction.
  - [LangExtract.Prompt.Validator](LangExtract.Prompt.Validator.md): Validates that few-shot examples in a `LangExtract.Template` are self-consistent.
  - [LangExtract.Prompt.Validator.Issue](LangExtract.Prompt.Validator.Issue.md): Describes a single alignment problem in a few-shot example.

  - [LangExtract.Prompt.Validator.ValidationError](LangExtract.Prompt.Validator.ValidationError.md): Raised by `LangExtract.Prompt.Validator.validate!/1` when alignment issues are found.

- Pipeline
  - [LangExtract.Chunker](LangExtract.Chunker.md): Splits text into sentence-level chunks using the Alignment.Tokenizer.
  - [LangExtract.Chunker.Chunk](LangExtract.Chunker.Chunk.md): A chunk of text with its byte offset in the source.

  - [LangExtract.Orchestrator](LangExtract.Orchestrator.md): Wires the full extraction pipeline.
  - [LangExtract.Pipeline](LangExtract.Pipeline.md): Extraction pipeline: normalize LLM output, parse extractions, align to source text.

  - [LangExtract.Pipeline.ChunkError](LangExtract.Pipeline.ChunkError.md): A failed chunk with its byte position in the source and error reason.

  - [LangExtract.Pipeline.ChunkResult](LangExtract.Pipeline.ChunkResult.md): A successfully processed chunk: its byte range in the source and the
spans extracted from it.
  - [LangExtract.Pipeline.Parser](LangExtract.Pipeline.Parser.md): Parses canonical extraction maps into `%Extraction{}` structs.

- Alignment
  - [LangExtract.Alignment.Aligner](LangExtract.Alignment.Aligner.md): Maps extraction strings to byte spans in source text.
  - [LangExtract.Alignment.Span](LangExtract.Alignment.Span.md): An aligned extraction with its byte position in the source text.

  - [LangExtract.Alignment.Token](LangExtract.Alignment.Token.md): A token with its byte position in the source text.
  - [LangExtract.Alignment.Tokenizer](LangExtract.Alignment.Tokenizer.md): Regex-based tokenizer that splits text into tokens with byte offsets.

- Providers
  - [LangExtract.Provider](LangExtract.Provider.md): Behaviour for LLM inference providers.
  - [LangExtract.Provider.Claude](LangExtract.Provider.Claude.md): Claude (Anthropic) provider for LLM inference.
  - [LangExtract.Provider.Gemini](LangExtract.Provider.Gemini.md): Gemini (Google) provider for LLM inference.
  - [LangExtract.Provider.OpenAI](LangExtract.Provider.OpenAI.md): OpenAI provider for LLM inference.

- Runner
  - [LangExtract.Runner](LangExtract.Runner.md): A caller-owned, supervised extraction runner with a shared request budget.
  - [LangExtract.Runner.Delivery](LangExtract.Runner.Delivery.md): Bounded delivery of supervised chunk results to a lazy caller-side stream.
  - [LangExtract.Runner.Limiter](LangExtract.Runner.Limiter.md): The runner's shared request budget: an RPM token bucket plus an in-flight
cap, with global backoff on `retry-after`.
  - [LangExtract.Runner.Request](LangExtract.Runner.Request.md): A single chunk request through the runner's budget, with the runner's
retry policy.

- Serialization
  - [LangExtract.Serializer](LangExtract.Serializer.md): Serialization and deserialization of extraction results.

