AddThisFeature

AI Entity Extraction

Pull names, dates, places, and amounts out of free text with the source spans kept.

involved AI Analysis & Search

What it adds

Extraction of typed entities from unstructured text, each carrying its original wording, a normalized value, and its position in the source.

What your agent is told to do

5
  1. 1

    Fix the entity types up front — people, organizations, locations, products, dates, amounts, identifiers — and reject anything outside that set. An open-ended extractor produces a taxonomy nobody can query.

  2. 2

    Require a source span for every entity: the offset and the exact original text. Without it a user cannot check the extraction, and a wrong value becomes indistinguishable from a right one.

  3. 3

    Keep both forms of every value. Store the original wording as written and a normalized form beside it, so a display can show what the document said while a query can match across spellings.

  4. 4

    Validate dates, currency amounts, phone numbers, and structured identifiers with the app's own deterministic parsers after extraction. The model is good at finding candidates and unreliable at formatting them.

  5. 5

    This feature works within a single piece of text and returns spans. Assembling whole records against a schema belongs to AI Structured Data Extraction; have that feature call this one for candidate values rather than each maintaining its own extraction path.

Edge cases it handles

8
  • Every entity must be traceable to a span in the source, and the interface should highlight it on request. An extraction that cannot be located in the original text must be dropped.
  • Normalization must never overwrite the original. A company written three ways in one document needs one canonical value and three preserved surface forms, because the wording sometimes matters more than the match.
  • The same entity appearing repeatedly should be returned once with all its occurrences, and genuinely ambiguous references should be returned as separate candidates rather than merged on a guess.
  • Do not attach an extracted entity to an existing record automatically. Link only above a high confidence threshold, only where the current user may see the target record, and always with a visible way to undo.
  • Run every date, number, and identifier through a real parser and discard whatever fails. A model-produced date that no parser accepts is not a date, and ambiguous day-month ordering must be resolved against the document's locale or left unresolved.
  • Overlapping and nested spans occur naturally, such as a city inside an organization name. Define which wins and apply it consistently instead of returning both as peers.
  • Long documents must be chunked with overlap so entities are not severed at a boundary, and offsets must be mapped back to the original document rather than to the chunk.
  • When the provider fails or the response is truncated, save nothing partial. A half-extracted document presented as complete is worse than one marked unprocessed.

Definition of done

8
  • Every returned entity carries a type from the fixed set, a source span, an original form, and a normalized form.
  • Dates, amounts, and identifiers are validated by deterministic parsers and invalid ones are discarded.
  • Repeated mentions are grouped and ambiguous references remain separate candidates.
  • Automatic linking to existing records respects confidence thresholds and the viewer's permissions, and is reversible.
  • Chunked documents produce offsets correct against the original text.
  • Failed or truncated runs leave the document marked unprocessed with no partial results stored.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.