Repository navigation
[Project]: UniFlow (Campus Connect) #27
Description
🚀 The Big Reveal
- Project Name: UniFlow (Campus Connect)
- The Mastermind(s): Rohit Sharma, Sahil Bhardwaj, Bhargava Ram Kongara, Alok Mishra (Team UniFlow, NIT Hamirpur, built at Hacktoberfest Hack Day Hamirpur × GDG Ludhiana)
📝 The Elevator Pitch
At NIT Hamirpur, campus information is scattered across WhatsApp groups, Instagram, notice boards, PDFs and college websites, and students have to work out for themselves whether an item is current and trustworthy. UniFlow puts clubs' updates and imported official notices in one feed, and each item shows where it came from. Students can type a question like "When is ChEmference 2026?" into Ask. Alpie answers using only records published on UniFlow and lists the records it used, with links to their original sources.
🛠️ Alpie Magic & Dogfooding
-
What Alpie powers: the Ask page (
/app/ask) runs onalpie-32b. The React app sends the question to a Supabase Edge Function (discover). That function checks the student's session, reads published records as that student, and makes one non-streaming chat-completions call to Alpie (temperature: 0,max_tokens: 4096). The API key is a server-side function secret and never reaches the browser. -
Grounding: Alpie receives only the 60 newest records with
status = 'published'. Drafts are filtered out explicitly, and registration links are never sent to the model. The system prompt treats the records and the question as data, not instructions, and tells the model to answer only from the records, with no outside knowledge and no invented dates, venues or links. -
Citations: Alpie returns JSON with
{ answer, sourceIds }. The server drops any id it didn't fetch and builds each citation card from the database row, never from model text. It also removes any URL in the answer that isn't a cited record's own link. If no valid source is left, a fixed "nothing published matches" sentence replaces the answer, so uncited text never reaches the student. -
What we tested: we asked three questions live through the Ask page on 2026-10-10:
- "When is ChEmference 2026?": Alpie gave 29–31 October and cited the record and its official page.
- A scholarship whose source gives no deadline: Alpie said no deadline was given and didn't invent a date.
- A question with no matching record: Alpie cited nothing.
Answers took 8–23 seconds. The Alpie client also has offline unit tests (stubbed fetch), which pass alongside the rest of the function tests (63/63).
-
Error handling, no fallback: the server waits up to 60 s for Alpie (configurable, capped at 70 s), and the browser waits 75 s so the server's error arrives first. HTTP 401, 402, 404 and 429 each map to a clear message in the app. Errors pass on only the HTTP status and Alpie's short error code, never the key or the prompt. We chose not to fall back to another model: if Alpie fails, the student sees an honest error rather than an answer from a different model.
-
Feedback for the 169Pi team:
- Latency is the main pain point. 8–23 s is long for a chat-style question, and we had to design a "Searching published records…" waiting state around it. Streaming is in the API, but our answer is a single JSON object, so it doesn't help us. Faster time-to-answer, or a non-reasoning mode, would make a big difference.
- Reasoning in the output: Alpie may return its reasoning inside
<think>…</think>incontent, so we strip it before parsing. A documented flag, or a separate field for reasoning, would be cleaner. - No structured-output option appears in the SDK's request parameters, so we ask for JSON in the prompt and validate it on the server. A JSON mode would remove a whole class of
bad_outputfailures. - Docs: we worked out the REST request shape, model id and error codes from the official
pi169Python SDK source, because we had no JavaScript/Deno client. The SDK README names the model "alpie-core" while its code and examples sendalpie-32b, which confused us at first. A short REST reference with the exact model ids would help. - What we learned: In the cases we tested, Alpie stayed within the records it was given. Even so, citations built on the server from database rows are what make the answers trustworthy enough to show students.
🔗 Drop the Links
- Source Code Repo: https://github.com/26bma038-lang/uniflow-hackathon
- Live Demo (if applicable): https://uniflow-hackathon.vercel.app/ (Ask is at /app/ask and needs a team-created account; there's no public sign-up. Contact @26bma038-lang on GitHub for a demo login.)
- Related Docs: README · Backend and Edge Functions notes
Activity