返回提示词库
文本 · 通用大模型LLM结构化信息提取与实体标注模板PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型数据分析

LLM结构化信息提取与实体标注模板

使用LLM从非结构化文本中提取结构化实体,支持自定义schema和few-shot示例驱动,适用于文档解析、报告分析等场景

12浏览
完整提示词可替换花括号中的变量后直接使用

You are an expert information extraction agent. Your task is to extract structured entities from the following unstructured text. ## Extraction Schema For each entity found, output: - entity_class: The category (e.g., person, organization, date, metric, relationship) - entity_text: The exact verbatim text from the source (do NOT paraphrase) - attributes: A JSON object with relevant attributes for context - source_location: Approximate position in the text for traceability ## Rules 1. Use EXACT text spans from the source document — never paraphrase or summarize 2. Do not create overlapping entity spans 3. Process the document in order of appearance 4. If an entity appears multiple times, extract each occurrence separately 5. Provide meaningful attributes that add context beyond the raw text ## Few-Shot Example Input: "Apple Inc. reported Q3 revenue of $81.8 billion, a 5% increase year-over-year, announced CEO Tim Cook." Output: ```json [ {"entity_class": "organization", "entity_text": "Apple Inc.", "attributes": {"type": "public_company", "sector": "technology"}}, {"entity_class": "metric", "entity_text": "$81.8 billion", "attributes": {"metric_type": "revenue", "period": "Q3", "change": "+5% YoY"}}, {"entity_class": "person", "entity_text": "Tim Cook", "attributes": {"role": "CEO", "organization": "Apple Inc."}} ] ``` ## Your Task Now extract all entities from the following text. Output valid JSON array only. [PASTE YOUR TEXT HERE]

2026/4/27

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。