基于大语言模型的结构提取在生产环境中失败并非因为模型缺乏理解,而是因为输出格式在不同模型和提示之间不可靠。一个在GPT-4上返回干净JSON的提示,在Llama上可能生成带边框、段落包裹或格式错误的输出,导致严格解析器拒绝否则正确的提取。我们正式将此现象定义为格式坍塌,并引入一个双指标评估框架:ROS(严格解析,衡量操作可靠性)和CSS(后规范化,衡量语义能力)。在包含6个模型家族的37,346个示例摄像头元数据基准测试中,我们发现严重的格式坍塌(例如,Gemma-2B:ROS 0.116 versus CSS 0.246)和较大的跨模型可移植性差距(0.4到0.6 F1)。随后我们提出了PromptPort,一个结合确定性规范化与轻量级验证器(DistilBERT)和安全覆盖策略的可靠性层。PromptPort恢复了格式失败(加6到8 F1),增加了由验证器驱动的语义选择(在规范化之外增加14到16 F1),并且在不修改基础模型的情况下接近每个字段的oracle性能(0.890 versus 0.896在零样本情况下)。该方法可以推广到未见的模型家族,并在不确定时提供明确的回避,使结构提取在生产部署中可靠。
英文摘要:
Structured extraction with LLMs fails in production not because models lack understanding, but because output formatting is unreliable across models and prompts. A prompt that returns clean JSON on GPT-4 may produce fenced, prose-wrapped, or malformed output on Llama, causing strict parsers to reject otherwise correct extractions. We formalize this as format collapse and introduce a dual-metric evaluation framework: ROS (strict parsing, measuring operational reliability) and CSS (post-canonicalization, measuring semantic capability). On a 37,346-example camera metadata benchmark across six model families, we find severe format collapse (for example, Gemma-2B: ROS 0.116 versus CSS 0.246) and large cross-model portability gaps (0.4 to 0.6 F1). We then present PromptPort, a reliability layer combining deterministic canonicalization with a lightweight verifier (DistilBERT) and a safe-override policy. PromptPort recovers format failures (plus 6 to 8 F1), adds verifier-driven semantic selection (plus 14 to 16 F1 beyond canonicalization), and approaches per-field oracle performance (0.890 versus 0.896 in zero-shot) without modifying base models. The method generalizes to held-out model families and provides explicit abstention when uncertain, enabling reliable structured extraction in production deployments.
Leveraging large language models for structured information extraction from pathology reports
National Cancer Institute(美国国家癌症研究所);The Institute of Cancer Research, London(伦敦癌症研究院);Imperial College London(伦敦帝国理工学院);The Breast Cancer Now Toby Robins Research Centre, The Institute of Cancer Research, London(伦敦癌症研究院乳腺癌现在托比·罗宾斯研究中心)
SciDaSynth: Interactive Structured Data Extraction from Scientific Literature with Large Language Model
Bosch Research North America(博世北美研究院);Weill Cornell Medicine(威尔康奈尔医学院);Cornell University(康奈尔大学);Hong Kong University of Science and Technology(香港科技大学)
RadEx: A Framework for Structured Information Extraction from Radiology Reports based on Large Language Models
Institute for Patient-centered Digital Health, Bern University of Applied Sciences, Biel, Switzerland(以患者为中心的数字健康研究所,伯恩应用科学大学,比尔,瑞士);ID Suisse AG, St. Gallen, Switzerland(ID瑞士股份有限公司,圣加尔,瑞士)
From Judgments to Issues: Structured Extraction of Legal Reasoning with Citation-Hallucination Control
Quantitative and Digital Law Laboratory(量化与数字法律实验室);CIRSFID - Alma AI, Faculty of Law University of Bologna(CIRSFID - 阿尔玛AI,博洛尼亚大学法学院);Robert Schuman Centre European University Institute(罗伯特·施曼中心欧洲大学研究所)
Beyond Isolated Dots: Benchmarking Structured Table Construction as Deep Knowledge Extraction
University of Chinese Academy of Sciences(中国科学院大学);Chinese Information Processing Laboratory, Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所信息处理实验室)
SocraticKG: Knowledge Graph Construction via QA-Driven Fact Extraction
Department of Biosystems Engineering, Seoul National University(首尔国立大学生物系统工程系);Artificial Intelligence Institute, Seoul National University(首尔国立大学人工智能研究所);Interdisciplinary Program in Artificial Intelligence, Seoul National University(首尔国立大学人工智能跨学科项目);Interdisciplinary Program in Cognitive Science, Seoul National University(首尔国立大学认知科学跨学科项目)
EMRModel: A Large Language Model for Extracting Medical Consultation Dialogues into Structured Medical Records
Taihe County People’s Hospital(太和县人民医院);Innovation + Research Institute(创新+研究院);GuoChuang Cloud Technology Ltd(国创云科技有限公司);Xunfei Healthcare Technology Ltd(讯飞医疗科技有限公司);University of Southern California(南加州大学);The First Affiliated Hospital of Anhui Medical University(安徽医科大学第一附属医院)
Information Extraction from Electricity Invoices with General-Purpose Large Language Models
Centro de Tecnologías de la Imagen (CTIM)(图像技术中心);Instituto Universitario de Cibernética, Empresas y Sociedad (IUCES)(大学网络研究所、企业与社会);University of Las Palmas de Gran Canaria(大加那利岛大学)