Inspiration

Important documents are written for institutions, but people often have to understand them while they are busy, stressed, or short on time. A utility notice, policy update, school instruction, or account email can hide a deadline, an obligation, or a risk inside several paragraphs of formal language.

We wanted to build something more useful than a generic chatbot summary. The goal was to create a clarity layer that answers four practical questions: What changed? What matters? What should I do next? And where did that conclusion come from?

What it does

Relay AI turns a notice, email, policy, or instruction into a plain-language action brief. It extracts:

  • A short summary in simple language.
  • Important dates and deadlines.
  • Key points and obligations.
  • Possible risks that deserve a second look.
  • Three prioritized next moves.
  • Evidence from the original document for each insight.

The interface keeps the workflow focused: paste a document, click Relay this document, review the result, and move between Overview, Next moves, and Evidence. Relay also shows the inference route and clearly reports when a real document was not analyzed instead of silently displaying sample data.

How we built it

Relay is a React, TypeScript, and Vite web application with an Express backend. The Firebase integration is implemented in client/src/lib/hybridInference.ts.

The app initializes Firebase AI Logic with GoogleAIBackend and creates a generative model using getGenerativeModel. We use InferenceMode.PREFER_IN_CLOUD as the hybrid-capable configuration, inspect the returned inference source, and display the route in the interface. The analysis request uses a strict structured JSON schema for summaries, dates, obligations, risks, actions, and evidence, which makes the output predictable and easy to render.

Firebase App Check with reCAPTCHA Enterprise protects the AI-backed web experience. The public deployment is available at https://relayai-dqwrsoex.manus.space, and the source code is available at https://github.com/nooradili/relay-ai-buildhybrid.

Challenges we ran into

The biggest challenge was making the product trustworthy when AI or configuration fails. An early fallback could make every document look like the same sample analysis, which would be misleading. We changed the behavior so real documents never receive sample output: if Firebase cannot analyze the document, Relay shows a clear unavailable state.

We also had to make the AI output reliable enough for a product interface. Free-form text is difficult to map consistently into dates, risks, actions, and evidence, so we added a structured response schema and validation before rendering results.

Another challenge was connecting a public deployment to Firebase App Check. The production domain had to be registered correctly so the public app could make protected Firebase AI Logic requests without requiring a private login.

Accomplishments that we're proud of

We built a complete, publicly accessible workflow during the submission period rather than only a mockup. A judge can open the app, paste a real document, run an analysis, inspect the route badge, and trace generated insights back to source evidence.

We are especially proud of three product decisions:

  1. The output ends with exactly three prioritized next moves instead of an overwhelming list.
  2. Evidence is treated as a first-class part of every insight.
  3. Failure is explicit and safe: Relay never pretends that a sample result came from the user's document.

What we learned

We learned that a useful AI product is not just a model call. The surrounding decisions matter just as much: structured output, source evidence, visible inference state, privacy boundaries, and honest failure behavior all shape user trust.

We also learned that hybrid AI should be made visible through a meaningful user experience. Showing the inference route is more useful when it explains what happened and why, rather than presenting a technical badge with no context.

What's next for Relay AI

Next, we want to expand support for more document types and languages, add stronger document comparison for policy changes, and improve the on-device path when compatible Gemini Nano environments are available. We also want to add optional export and sharing controls while keeping user consent and evidence links at the center of the experience.

Built With

Share this project:

Updates

Submission history