Extracting structured information from unstructured text using LLMs is a good tool to have in your llm toolkit.

Google’s langextract is one such python library for extracting structured information from unstructured text using LLMs with precise source grounding and interactive visualization.

The other popular library is Instructor — extracting structured data from Large Language Models (LLMs). Built on top of Pydantic, Instructor provides type-safe data extraction with automatic validation, retries, and streaming support. supports all major providers like openai, claude and local-llm like ollama etc.,