Inspiration

Cal Poly students are constantly juggling a mess of disconnected portals, discord servers, and outdated maps just to figure out what’s for lunch or where their next lab is. We wanted to build a "campus superintelligence" that lives where students already are, in their texts. No apps, no logins, just instant answers.

What it does

Relay is an SMS-native assistant tailored for the Cal Poly experience. Students can text it to find building directions, check dining hours, get weekend event headlines from PolyNow, or ask academic questions. It’s built with a "wellness-first" mindset, meaning it can detect high-stress queries and immediately surface campus mental health resources like the CAPS crisis line when it matters most.

How we built it

We built a custom orchestration pipeline using TypeScript and Vercel Edge Functions. The backend follows a 3-stage architecture:

  • Intent Router: A gpt-4o-mini model classifies incoming texts into specific intents (navigation, dining, wellness, etc.) and generates optimized search queries.
  • RAG Service: We used pgvector on Supabase to store and retrieve campus-specific context chunks (Reddit threads, department data, dining menus).
  • Synthesis Service: A gpt-4o model takes the retrieved context and generates a persona-driven reply (we call him "relay") that sounds like a helpful senior, not a corporate chatbot.

We used Linq for the SMS gateway, allowing us to handle rich media like images and attachments directly in the thread.

Challenges we ran into

The biggest hurdle was latency and execution limits. Vercel Edge Functions have tight windows, so we had to parallelize our session history fetches and intent routing to keep response times snappy. We also had to build a custom normalization layer to ensure the LLM’s markdown links and formatting translated cleanly to SMS-safe text.

Accomplishments that we're proud of

We’re hella hyped about the persona consistency. Relay doesn't just bark back facts; it understands follow-up questions and maintains context across the session. The automated escalation for sensitive topics (like Title IX or financial aid) works flawlessly to get students the official help they need.

What we learned

We learned a ton about high-throughput webhook handling and the nuances of building for a "headless" UI like SMS. Managing a 3-stage pipeline under 15-second response windows forced us to be extremely disciplined with our code and model choices.

What's next for Relay

We’re looking to move beyond the mock data and build real-time integrations with the Cal Poly Reddit and discord communities. We also want to expand the RAG layer to include real-time transit data and personal course schedule uploads for even deeper personalization

Built With

Share this project:

Updates