Vibeleaderboard
← All Intel
Intel / article

AI Gateway now supports extraction models

Source
vercel.com
Author
Bruce Liu
Date
Why it matters

Developers can pull typed fields from invoices and contracts through one call, with per-field confidence scores to route uncertain results to review, without prompting a general .

Key takeaways · AI-distilled
  • Vercel AI Gateway now serves extraction models, which pull requested details out of text, images or PDFs and return them as separate fields. The first is ScaleDown Extract-1, which extracts single text values and lists of text values.
  • Extraction works only through the AI SDK for now: it needs ai@7.0.176 or later and the experimental_extract with model ID scaledown/extract-1. Every requested gets an entry in result.answers, and a field that is not found comes back as null.
  • Extract-1 returns a confidence score from 0 to 1 for each match, including individual list items, so uncertain results can be flagged for review. For text input it can also return character offsets showing where each match appears.
  • PDFs and images are passed as parts in the state argument. Extraction requests appear in AI Gateway logs and spend tracking.
Terms in this piece · Glossary
  • Function — A named block of instructions that takes inputs, called arguments, and hands back a result, called its return value.
  • Field — One named piece of a record, such as name or approved_on; a record is one entity's set of values, one per field.
  • Large language model — A model trained on large amounts of data to process and generate language.
  • File — A named unit of stored data that keeps its contents while no program is using it.
Recommended reads
Comments

Checking sign-in…

Loading comments…