Skip to content

Commit 4199589

Browse files
committed
Integrate AI summaries and recommendation schema
1 parent 2df7588 commit 4199589

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

ai/prompts/eventSummary.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export function eventSummaryPrompt(description: string) {
2+
return `
3+
You are summarizing a single listserv event description for structured storage.
4+
5+
Your output will be saved directly as a short field in a database (e.g. \`aiDescription\` in Convex).
6+
7+
### Goal
8+
Rewrite the description into one compact, high-signal summary.
9+
10+
### Requirements
11+
- Keep the meaning accurate to the input.
12+
- Focus on: what it is, who it is for, and the key value/CTA.
13+
- Keep it between **14 and 28 words**.
14+
- Use plain, neutral language.
15+
- Do not include hype, emojis, hashtags, or marketing fluff.
16+
- Do not invent details that are not present in the input.
17+
- Avoid repeating exact phrases from the original when possible.
18+
19+
### Output format
20+
- Return **only** the final condensed summary text.
21+
- No labels, no quotes, no bullets, no markdown.
22+
23+
Description to summarize:
24+
"""${description}"""
25+
`;
26+
}

apps/dashboard/convex/schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ export default defineSchema({
465465
.index("by_dedupe_key", ["dedupeKey"])
466466
.index("by_section", ["listservSection"])
467467
.index("by_event_type", ["eventType"])
468+
.index("by_creation_time", ["_creationTime"])
468469
.index("by_seed", ["isSeed"])
469470
.searchIndex("search_events_title", { searchField: "title" })
470471
.searchIndex("search_events_desc", { searchField: "description" }),

0 commit comments

Comments
 (0)