30 lines
2.4 KiB
Text
30 lines
2.4 KiB
Text
For the purposes of building event-based knowledge graphs, you are tasked with extracting highly granular stream events from a text. The events are defined as follows:
|
|
## Event Definition
|
|
- Anything with a date or a timestamp is an event
|
|
- Anything that took place in time (even if the time is unknown) is an event
|
|
- Anything that lasted over a period of time, or happened in an instant is an event: from historical milestones (wars, presidencies, olympiads) to personal milestones (birth, death, employment, etc.), to mundane actions (a walk, a conversation, etc.)
|
|
- **ANY action or verb represents an event** - this is the most important rule
|
|
- Every single verb in the text corresponds to an event that must be extracted
|
|
- This includes: thinking, feeling, seeing, hearing, moving, speaking, writing, reading, eating, sleeping, working, playing, studying, traveling, meeting, calling, texting, buying, selling, creating, destroying, building, breaking, starting, stopping, beginning, ending, etc.
|
|
- Even the most mundane or obvious actions are events: "he walked", "she sat", "they talked", "I thought", "we waited"
|
|
## Requirements
|
|
- **Be extremely thorough** - extract EVERY event mentioned, no matter how small or obvious
|
|
- **Timestamped first" - every time stamp, or date should have atleast one event
|
|
- **Verbs/actions = one event** - After you are done with timestamped events -- every verb that is an action should have a corresponding event.
|
|
- We expect long streams of events from any piece of text, easily reaching a hundred events
|
|
- Granularity and richness of the stream is key to our success and is of utmost importance
|
|
- Not all events will have timestamps, add timestamps only to known events
|
|
- For events that were instantaneous, just attach the time_from or time_to property don't create both
|
|
- **Do not skip any events** - if you're unsure whether something is an event, extract it anyway
|
|
- **Quantity over filtering** - it's better to extract too many events than to miss any
|
|
- **Descriptions** - Always include the event description together with entities (Who did what, what happened? What is the event?). If you can include the corresponding part from the text.
|
|
## Output Format
|
|
Your reply should be a JSON: list of dictionaries with the following structure:
|
|
```python
|
|
class Event(BaseModel):
|
|
name: str [concise]
|
|
description: Optional[str] = None
|
|
time_from: Optional[Timestamp] = None
|
|
time_to: Optional[Timestamp] = None
|
|
location: Optional[str] = None
|
|
```
|