{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "google-langextract--extract-entities-with-source-grounding",
 "repo": "google/langextract",
 "repo_url": "https://github.com/google/langextract",
 "repo_slug": "google-langextract",
 "title": "Extract structured entities from text with exact sources",
 "page_title": "LangExtract tutorial: extract entities from text with exact sources",
 "summary": "Define a prompt and one good example, then extract entities tied to their exact text spans.",
 "who": "An analyst turning hundreds of free-text notes into a structured table.",
 "problem": "LLM extraction without grounding is hard to verify.",
 "outcome": "Extractions that each point to the exact source text.",
 "steps": [
  "Install the LangExtract package",
  "Write a prompt describing what to extract",
  "Provide an ExampleData with Extraction entries",
  "Run extraction on your text and review the grounded results"
 ],
 "agent_prompt": "Using google/langextract, extract <entity types> from <document> with one example, and list each extraction with its source span. Verify three spans against the original text.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Extraction quality depends heavily on the example you provide.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "Python",
  "An API key for a cloud model, or a supported local or custom provider"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "Cloud model extraction uses your API key and bills per call."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/google-langextract/extract-entities-with-source-grounding/",
 "md": "https://dedupedai.com/use-cases/google-langextract/extract-entities-with-source-grounding/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/google-langextract--extract-entities-with-source-grounding.json",
 "api_version": "v1"
}
