A schema for every endpoint
Each endpoint has a strict JSON contract in its prompt, so the app can render what comes back.
LLM Application · 2025-26
The AI layer for a mobile coaching app: it turns your mood, energy and goals into coaching cards and streams its replies.

The brief
Rise is a mobile coaching app. Its AI layer turns a user's mood, energy, goals and context into actionable coaching cards: focus tasks, a day plan, interventions, a recap, a music vibe and reward progress. It can also detect mood, energy and personality from plain text. It exposes 11 FastAPI endpoints around a five-personality tone system, and coach replies stream to the app over server-sent events.
The problem
LLM output has to be reliable and safe for a mobile app to render, whichever provider produced it.
What I did
I built the whole AI microservice: prompt orchestration, a JSON schema for each endpoint, memory extraction and retrieval, one /ai/chat endpoint that orchestrates the cards, streaming coach replies, and token and cost tracking.
Choices
Each endpoint has a strict JSON contract in its prompt, so the app can render what comes back.
A provider-agnostic gateway covers Anthropic, OpenAI, Google, Groq, Mistral and Together, so the model can change without touching the app.
Token and cost tracking is normalised across providers.
Capabilities
Problems
Problem
LLM output was not reliable enough for the app's front end, and it differed between providers.
Fix
Strict schema-return prompts, JSON recovery and parsing with explicit parse errors, and calls wrapped in retries with backoff and normalised usage tracking.
Stack
Service
AI
The result
A working prototype: 11 endpoints, five coaching personalities, and streamed replies.
Next project
Everidog
LLM Application

I work on the AI layer: retrieval, reasoning and the code underneath. I hand it over ready to integrate.