LLM Structured Information Extraction & Entity Annotation Template
Uses LLMs to extract structured entities from unstructured text, supporting custom schemas and few-shot examples, suitable for document parsing, report analysis, and other scenarios.
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]
How to use this prompt
- 1Copy the complete prompt above.
- 2Replace the topic, subject, or style variables.
- 3Save effective changes to build your own version.


