Prompt Patterns for Structured Data Extraction from Unstructured Text

2025

Large language models (LLMs) show promise for extracting structured data from unstructured text by identifying patterns, keywords (including names, organizations, locations, and topics), and relations in text.However, the performance of LLMs on tasks like precision, clarity, replicability, and uniform interpretation of results depends heavily on how users express their prompts, which are instructions users give to LLMs.Understanding these performance measures is crucial to ensure consistent and reliable data extraction across various applications and users.To enhance these measuresÐand to make the extraction process more effective and repeatable for usersÐthis paper introduces structured data extraction prompt patterns, which are reusable templates for prompting LLMs to extract desired data from unstructured text.This paper provides three contributions to research on structured data extraction.First, we present a catalog of prompt patterns for common data extraction tasks, such as semantic data extraction.Second, we describe and evaluate methods for chaining prompt patterns into pattern compounds or pattern sequences to extract complex nested data, thereby enabling more effective use of LLMs for text mining and knowledge base construction from unstructured corpora.Finally, we present a structured approach to prompt engineering that supplies developers with cohesive and flexible templates, facilitating the creation of sophisticated data extraction workflows with more dependable results than ad hoc prompting.

Read the paper · More papers on PaperTik