Inspiration

A final-year engineering student gets a 6 LPA offer. Their dream company is still three weeks from interviewing. Family depends on their income. An education loan is ticking. Every AI tool we'd seen would just tell them what to pick. We didn't want to build another recommendation engine wearing a chatbot costume - we wanted something that respects the fact that the person, not the model, has to live with the consequences.

What it does

Nine layers run on a single paragraph of unstructured input:

  1. Semantic Extraction - goals, constraints, priorities, fears
  2. Belief Graph - an interactive node-edge map of the reasoning (React Flow)
  3. Assumption Stress Test - hidden assumptions rated by evidence strength and risk
  4. Contradiction Detection - internal inconsistencies, surfaced without judgment
  5. Counterfactual Scenarios - three futures, explicitly labeled exploratory, never predictive
  6. Tradeoff Analysis - a radar chart comparing futures across situation-specific dimensions, never ranked
  7. Decision Reflection - adaptive questions, then an AI-scored clarity evaluation of the user's own answers
  8. Decision Report - the full analysis exported as a formatted PDF
  9. 90-Day Action Plan - generated only after the user states their own decision, turning it into a concrete execution plan with risk mitigation

How we built it

FastAPI backend calling Gemini 2.5 Flash via Vertex AI, with response_mime_type: application/json mapped directly to Pydantic schemas. Layers that don't depend on each other run concurrently via asyncio.gather - belief graph, assumptions, contradictions, and scenarios all fire in parallel off the extraction step, then tradeoffs and reflection questions fire in parallel off that. Frontend is Next.js + TypeScript + Tailwind, with Recharts for the tradeoff radar and jsPDF for fully client-side report export.

Challenges we ran into

  • Keeping the model from implicitly ranking scenarios even when numerically scored - required enforcing the constraint at the prompt, schema, and UI level simultaneously.
  • Gemini occasionally wrapping a JSON array in an extra object instead of returning the schema directly, requiring defensive unwrapping for every list-returning call.
  • Making the belief graph readable as a narrative (goals → priorities → constraints → fears → actions) instead of a tangled force-directed mess.
  • Designing tradeoff dimensions that adapt per-situation rather than hardcoding generic categories like "career vs. family vs. money."

Accomplishments that we're proud of

  • A genuinely parallelized 9-layer pipeline, not a sequential chain - cutting what would be a ~20-second wait down meaningfully by running independent layers concurrently.
  • Zero recommendations anywhere in the system, enforced redundantly across prompt, schema, and UI, not just promised in a README.
  • A tradeoff radar chart that picks its own dimensions per situation instead of forcing every decision into the same three boxes.
  • A reflection layer that scores the user's clarity, not the decision itself - turning the AI into a mirror instead of a judge.

What we learned

That Responsible AI isn't a paragraph you bolt on afterward - it has to be enforced at every layer (prompt constraints, schema design, and UI labeling all have to agree with each other), and the hardest part of building a genuine thinking tool is resisting the urge to make it more helpful by making it more directive.

What's next for Reverie

  • Auth + persistence (Clerk/Supabase, PostgreSQL) so users can return to a decision over days or weeks instead of one sitting.
  • Multi-session belief tracking - letting the belief graph evolve as new information arrives, rather than resetting per analysis.
  • Outcome follow-up loop - an optional check-in after the 90-day window closes, asking what actually happened, to calibrate how well past assumptions held up (without ever telling the user they were "right" or "wrong" - just reflecting their own data back).
  • Expanding beyond career decisions - the extraction and scenario layers are already domain-agnostic; we'd like to validate that against other high-stakes decision types (health, relocation, major purchases).

Built With

  • fastapi
  • google-gemini-2.5-flash
  • google-vertex-ai
  • jspdf
  • next.js
  • npm
  • poetry
  • pydantic
  • python
  • react
  • react-flow
  • recharts
  • shadcn/ui
  • tailwind-css
  • tenacity
  • typescript
Share this project:

Updates