SamePage — Hackathon Story
Inspiration
I recently moved in with my girlfriend. We noticed a pattern: we’d debate for an hour and only later realize we’d been talking about different things all along. Same topic, different mental models. I wanted a 60-second reality check that tells two people whether they actually heard the same thing—and what to fix fast.
What it does
SamePage is a post-conversation alignment check for couples. Each partner gets a private link and types:
- key takeaway (1–2 sentences),
- next step (who/what/when),
- tone (one word).
The app returns:
- a 0–100 Alignment Score with a label (Aligned / Partial / Misaligned),
- consensus vs. divergence bullets,
- themes (tags),
- AI suggestions to reconcile wording and commitments.
We compute a hybrid, deterministic score and only call the LLM for borderline cases—so it’s fast and cheap.
Scoring: Let (t\in[0,1]) be takeaway similarity (embeddings/cosine), (r\in[0,1]) the request match, (n\in[0,1]) tone alignment.
[ S = 50,t ;+; 30,r ;+; 20,n,\quad r = 0.5,\text{actor} + 0.33,\text{action} + 0.17,\text{due} ]
Labels: [ S\ge 85\Rightarrow \text{Aligned},\quad 65\le S<85\Rightarrow \text{Partial},\quad S<65\Rightarrow \text{Misaligned}. ]
How we built it
- Frontend + API: FastAPI + Jinja2 (server-rendered), Tailwind via CDN.
- Hosting: Google Cloud Run (
us-east1) with a single service for UI + scoring. - State: Firestore (sessions, submissions, results) with 24h TTL for privacy.
- AI: Vertex AI
text-embedding-004for semantic similarity; Gemini 2.5 Pro (temp=0) for concise explanations when (60\le S\le 75). Agents (ADK): Two lightweight agents via Google ADK:
- Scorer → computes (S) and extracts consensus/divergence.
- Mediator → generates rationale + rephrasing suggestions on borderline scores.
DevOps: Docker → Artifact Registry → Cloud Build → Cloud Run; env flags
ENABLE_VERTEX,USE_ADK.
Challenges we ran into
- IAM gotchas: Cloud Build vs. runtime service accounts needed precise roles (
artifactregistry.writer/reader,datastore.user,aiplatform.user). A single missing role = 403s. - LLM latency & reliability: Kept Gemini 2.5 Pro off the hot path except for ambiguous bands; strict timeouts + graceful fallback so the page never stalls.
- Scoring craft: Designing a score that feels fair and explainable. We expose subscores (takeaway cosine, actor/action/due, tone) so users see why.
- Privacy optics: Anonymous by default, short-lived data (24h TTL), clear consent language.
Accomplishments that we’re proud of
- Under-a-minute flow that actually reduces rehashing (“did we agree?” → one card answer).
- Transparent AI: deterministic core with minimal, high-value LLM involvement; users can see the evidence behind the score.
- Real-world demo: A chores scenario that predictably lands in “Partial,” then improves after applying the suggested rephrase—showing measurable change in (S).
What we learned
- Misalignment ≠ disagreement: most friction was timeline/owner wording, not values. A tiny structure (who/what/when) fixes a lot.
- Explainability drives trust: exposing subscores and evidence reduced the “black box” feeling.
- GCP ergonomics: Cloud Run + Firestore + Artifact Registry + Cloud Build is a fast lane when IAM is nailed early.
- ADK is practical: small, single-responsibility agents (Scorer/Mediator) beat one giant prompt.
What’s next for SamePage
- Real-time capture: microphone + diarization to auto-fill takeaways and requests.
- Guided templates: presets for chores, finances, travel, parenting.
- Multi-turn alignment: track changes across sessions; show trendlines and “agreement debt.”
- Nudge engine: optional reminders for due dates (“trash by 8am”) via email/SMS.
- Therapist mode: anonymized summary export and clinician dashboard (opt-in).
- Cross-channel flows: WhatsApp/iMessage deep links that drop partners straight into their forms.
Log in or sign up for Devpost to join the conversation.