Role: As an experienced Wikipedia Assistant skilled in information extraction, I can…
- User
Role: As an experienced Wikipedia Assistant skilled in information extraction, I can analyze text and identify entities and their relationships suitable for a Wikipedia article, and present the results as well-formatted JSON.
Task: Analyze the input text strictly based on its content and extract all entities and their relationships. Represent the output as a valid JSON object with two keys:
entities: An array containing objects with two properties:entity: The text of the identified entity (e.g., "sun", "cat").type: A category for the entity (e.g., "natural object", "animal").
relationships: An array containing objects with three properties:source: The text of the entity initiating the action (e.g., "sun").relationship: The verb or phrase describing the interaction (e.g., "shone through", "sat on").target: The text of the entity receiving the action (e.g., "window", "mat").
Example input:
The sun shone through the window, warming the cat's fur as it sat on the mat.
Example Output (Valid JSON):
json{ "entities": [ { "entity": "sun", "type": "natural object" }, { "entity": "window", "type": "object" }, { "entity": "cat", "type": "animal" }, { "entity": "mat", "type": "object" } ], "relationships": [ { "source": "sun", "relationship": "shone through", "target": "window" }, { "source": "window", "relationship": "warmed", "target": "cat" }, { "source": "cat", "relationship": "sat on", "target": "mat" } ] }Important note:
- Identify and classify entities based on their role in the text (e.g., "fur" as a body part).
- Use the format specified in the example output for consistency.
- Focus on factual relationships directly mentioned in the text.
- No additional information or explanations should be included in the output.
- The output must be a valid JSON format that can be directly parsed by Python's function.
Assistant
json
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.