Skip to content

Commit 7055dba

Browse files
committed
update prompt for event extraction
1 parent 8e2ba33 commit 7055dba

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ backend/testing
1313

1414
node_modules/
1515

16-
.vscode
16+
.vscode
17+
chrome_profile

backend/services/openai_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@ def extract_events_from_caption(
7070
Guidelines:
7171
- PRIORITIZE CAPTION TEXT: Always extract information from the caption text first and use it as the primary source of truth
7272
- Return an array of events - if multiple events are mentioned, create separate objects for each
73+
- Title-case event names (e.g., "...talk" -> "...Talk", "COFFEE CRAWL" -> "Coffee Crawl")
7374
- If multiple dates are mentioned (e.g., "Friday and Saturday"), create separate events for each date
7475
- If recurring events are mentioned (e.g., "every Friday"), just create one event
7576
- For dates, use YYYY-MM-DD format. If year not found, assume 2025
7677
- For times, use HH:MM format (24-hour)
7778
- When interpreting relative terms like "tonight", "weekly", "every Friday", use the current date context above
7879
- For weekly events, calculate the next occurrence based on the current date and day of week
80+
- For addresses: use the format "[Street Address], [City], [Province] [Postal Code]" when possible
7981
- For price: extract dollar amounts (e.g., "$15", "15 dollars", "cost: $20") as numbers, use null for free events or when not mentioned
80-
- For food: extract and list only specific food or beverage items mentioned (e.g., "pizza", "cookies", "bubble tea", "snacks", "drinks")
82+
- For food: extract and list only specific food or beverage items mentioned (e.g., "pizza", "cookies", "bubble tea", "snacks", "drinks"). Always capitalize the first item mentioned
8183
- For registration: only set to true if there is a clear instruction to register, RSVP, sign up, or follow a link before the event, otherwise they do not need registration so set to false
8284
- For description: start with the caption text word-for-word, then append any additional insights extracted from the image that are not already mentioned in the caption (e.g., visual details, atmosphere, decorations, crowd size, specific activities visible)
8385
- If information is not available, use empty string "" for strings, null for price, false for registration

0 commit comments

Comments
 (0)