Credentials. Cloud model extraction uses your API key and bills per call.
Who it is forAn analyst turning hundreds of free-text notes into a structured table.
The problemLLM extraction without grounding is hard to verify.
The outcomeExtractions that each point to the exact source text.
What you need first
- Python
- An API key for a cloud model, or a supported local or custom provider
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
Prompt for your agent
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.
Caveat. Extraction quality depends heavily on the example you provide.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for google/langextract and "Extract structured entities from text with exact sources"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer