Skip to content

Commit e610766

Browse files
committed
Merge remote-tracking branch 'origin/main' into annie/setup-design-system
2 parents 418e3b9 + bdfbd52 commit e610766

8 files changed

Lines changed: 469 additions & 5 deletions

File tree

ai/data/dummy_data.json

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
[
2+
{
3+
"listserv": "ACSU",
4+
"host": "ACSU",
5+
"club": "ACSU",
6+
"title": "ACSU Student Faculty Luncheon",
7+
"description": "Connect with CS professors and students over lunch with other CS students.",
8+
"date": "2026-03-13",
9+
"location": "CIS 250 (Young Conference Room)",
10+
"tags": ["networking", "cs", "faculty"]
11+
},
12+
{
13+
"listserv": "ACSU",
14+
"host": "ACSU",
15+
"club": "ACSU",
16+
"title": "1:1 Faculty Coffee Chat Week",
17+
"description": "Sign up for informal 1:1 chats with professors about research opportunities, careers, and advice.",
18+
"date": "2026-03-09",
19+
"location": "Various campus locations",
20+
"tags": ["research", "mentorship", "coffee"]
21+
},
22+
{
23+
"listserv": "ACSU",
24+
"host": "Cornell AppDev & Ramp",
25+
"club": "Cornell AppDev",
26+
"title": "AppDev x Ramp - HACK→HIRED",
27+
"description": "One-day AI-focused hackathon with workshops, prizes, and a chance to interview for a Fall SWE internship at Ramp.",
28+
"date": "2026-03-14",
29+
"location": "eHub",
30+
"tags": ["hackathon", "career", "recruiting", "ai"]
31+
},
32+
{
33+
"listserv": "ACSU",
34+
"host": "Citadel GQS",
35+
"club": "",
36+
"title": "Citadel Global Quantitative Strategies Tech Talk",
37+
"description": "Tech talk on quantitative trading careers and how your research skills translate to GQS at Citadel.",
38+
"date": "2026-03-17",
39+
"location": "Upson 142",
40+
"tags": ["finance", "tech-talk", "recruiting"]
41+
},
42+
{
43+
"listserv": "WICC",
44+
"host": "WICC",
45+
"club": "WICC",
46+
"title": "Cracking Your Career (CYC)",
47+
"description": "Four-part series on pathways in computing, interviewing, resumes, and standing out in tech roles.",
48+
"date": "2026-03-03",
49+
"location": "Gates 114",
50+
"tags": ["career", "workshop"]
51+
},
52+
{
53+
"listserv": "WICC",
54+
"host": "WICC & MathWorks",
55+
"club": "WICC",
56+
"title": "WICC x MathWorks MATLAB Challenge",
57+
"description": "Hands-on MATLAB challenge using MATLAB Copilot with prizes, swag, and info on careers at MathWorks.",
58+
"date": "2026-03-16",
59+
"location": "Gates G01",
60+
"tags": ["workshop", "mathworks", "ai", "swag"]
61+
},
62+
{
63+
"listserv": "WICC",
64+
"host": "WICC & Jane Street",
65+
"club": "WICC",
66+
"title": "WICC x Jane Street Tech Talks",
67+
"description": "Talk on predictable communication at scale and Aria, Jane Street's low-latency messaging system, with food and swag.",
68+
"date": "2026-03-18",
69+
"location": "Phillips 101",
70+
"tags": ["talk", "jane-street", "systems"]
71+
},
72+
{
73+
"listserv": "WICC",
74+
"host": "External",
75+
"club": "",
76+
"title": "HackDartmouth XI",
77+
"description": "24-hour hackathon at Dartmouth with workshops, prizes, and a Lost In Space theme.",
78+
"date": "2026-04-11",
79+
"location": "Dartmouth",
80+
"tags": ["hackathon", "travel"]
81+
},
82+
{
83+
"listserv": "WICC",
84+
"host": "Jane Street",
85+
"club": "",
86+
"title": "Jane Street FOCUS Program",
87+
"description": "Multi-day NYC program for first-year students to explore trading, software development, and strategy at Jane Street.",
88+
"date": "2026-05-19",
89+
"location": "New York City",
90+
"tags": ["program", "first-year", "professional-track"]
91+
}
92+
]

ai/prompts/clubSummary.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
2+
export function clubSummaryPrompt(events: any[]) {
3+
return `
4+
You are writing a very short description of what a student club does, based only on their recent events.
5+
6+
You are given a JSON array called "events". All events belong to the **same club**, with a "club" field that contains its name.
7+
8+
### Your task
9+
- Write **2–3 concise sentences** (max **70 words total**) describing:
10+
- What the club focuses on (e.g. hackathons, career prep, mentorship, theory, community building).
11+
- The typical kinds of events they run (talks, workshops, study groups, socials, conferences, etc.).
12+
- The community/audience they serve (e.g. CS undergrads, women in computing, international students, etc.).
13+
- **Start the first sentence with the club name**, taken from the "club" field (e.g. "ACSU is...", "WICC is...").
14+
- Do **not** mention specific dates, rooms, or one‑off logistics; speak in general patterns.
15+
- Keep the tone clear and informative; no emojis.
16+
17+
### Style constraints
18+
- Output **plain text only** (no markdown headings or bullets).
19+
- Use 2–3 sentences in a single short paragraph.
20+
21+
Here are the events for this club (JSON):
22+
\`\`\`json
23+
${JSON.stringify(events, null, 2)}
24+
\`\`\`
25+
`
26+
}

ai/prompts/weeklySummary.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
2+
export function weeklySummaryPrompt(events: any[]) {
3+
return `
4+
You are generating a concise weekly opportunities digest for a single student.
5+
6+
You are given a JSON array called "events". Each event may look like:
7+
{
8+
"listserv": "ACSU", // listserv or source that advertised the event
9+
"host": "Cornell AppDev", // primary hosting org or company (may differ from listserv)
10+
"title": "AppDev x Ramp - HACK→HIRED",
11+
"description": "One‑day hackathon with prizes and recruiting",
12+
"date": "2026-03-14",
13+
"location": "eHub",
14+
"tags": ["hackathon", "career", "recruiting"]
15+
}
16+
17+
Important:
18+
- \`listserv\` = who sent/advertised the opportunity (ACSU, WICC, etc.).
19+
- \`host\` = who is actually running the event (AppDev, Ramp, a company, a conference, etc.).
20+
Many events are cross‑posted; do not assume the listserv owns the event.
21+
22+
### Your task
23+
- Write a **compact markdown digest** for this week, **no intro or outro sentences**.
24+
- **Group events by listserv** using markdown headings based on the \`listserv\` field:
25+
- Use a level-3 heading for each listserv that appears, like:
26+
- \`### ACSU\`
27+
- \`### WICC\`
28+
- \`### Cornell\`
29+
- \`### Opportunities\`
30+
- Under each heading, list at most **3 high‑value events** that were advertised on that listserv, chosen for impact (recruiting, hackathons, major talks, strong mentorship/community events).
31+
- For each event, use **one clean bullet point** in this exact format:
32+
- \`- **Title (Mar 14)** – 1‑sentence description that clearly names the **host** or event type, the key value prop, and location if available.\`
33+
- Keep each description **under 25 words**.
34+
- Prefer **hackathons, recruiting, mentorship, and flagship events** over minor or redundant ones.
35+
- If a listserv has more than 3 events, summarize only the top 3 and ignore the rest.
36+
37+
### Style constraints
38+
- Output **markdown only** (no code fences).
39+
- Use only \`###\` headings and \`- \` bullets, nothing else.
40+
- **No emojis, no unsubscribe text, no calendar links, no greetings or sign‑offs.**
41+
- **Total digest <= 220 words** across all sections.
42+
43+
Now write the digest based on this JSON:
44+
\`\`\`json
45+
${JSON.stringify(events, null, 2)}
46+
\`\`\`
47+
`
48+
}

ai/summarize.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { GoogleGenAI } from "@google/genai";
2+
3+
const ai = new GoogleGenAI({
4+
apiKey: process.env.GEMINI_API_KEY,
5+
})
6+
7+
export async function generateSummary(prompt: string) {
8+
const res = await ai.models.generateContent({
9+
model: "gemini-2.5-flash",
10+
contents: prompt
11+
})
12+
13+
return res.text
14+
}

ai/test.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import data from "./data/dummy_data.json"
2+
import { generateSummary } from "./summarize"
3+
import { weeklySummaryPrompt } from "./prompts/weeklySummary"
4+
import { clubSummaryPrompt } from "./prompts/clubSummary"
5+
6+
async function run() {
7+
// Example: a user subscribed to ACSU and WICC listservs
8+
const subscribedListservs = ["ACSU", "WICC"]
9+
const weeklyEvents = data.filter(e => subscribedListservs.includes(e.listserv))
10+
11+
const weeklyPrompt = weeklySummaryPrompt(weeklyEvents)
12+
const weeklySummary = await generateSummary(weeklyPrompt)
13+
14+
console.log("\nWEEKLY SUMMARY\n")
15+
console.log(weeklySummary)
16+
17+
// Example: summarize what ACSU does based on its hosted events
18+
const acsuEvents = data.filter(e => e.club === "ACSU")
19+
20+
const clubPrompt = clubSummaryPrompt(acsuEvents)
21+
const clubSummary = await generateSummary(clubPrompt)
22+
23+
console.log("\nACSU CLUB SUMMARY\n")
24+
console.log(clubSummary)
25+
}
26+
27+
run()

0 commit comments

Comments
 (0)