PromptForge
Back to list
数据处理信息提取NLP结构化数据实体识别文档解析

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

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

7 views4/27/2026

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:

[
  {"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]