Overview
The market is crowded with “AI golf coaches” that are a thin wrapper: a language model is handed a prompt like “write me a 4-week golf training plan” and free-styles an answer. That looks impressive in a demo and falls apart in real life — it hallucinates exercises, has no memory of what the golfer actually did, and has no expert standing behind the advice.
ApexGolf wanted the opposite: a coach that knows the athlete, remembers what happened last week, adapts the plan accordingly, and never recommends something that could hurt them. Riverborn built a hybrid engine where expert-authored content and a deterministic rules layer do the safety-critical work, and a constrained LLM (Claude) selects the best plan from a pre-vetted, pre-scored shortlist. It chooses — it never invents.
The product is built around two cross-wired pillars: Practice (on-course and range skill work) and Training(gym-based strength & conditioning). What you want to do on the course determines what you do in the gym, and how your body feels in the gym feeds back into what you practise — both pillars are scored against the same signals about the athlete.
Business Challenges
- Hallucinated, Unsafe Advice – Thin-wrapper AI coaches free-style answers — inventing exercises that don't exist or recommending movements that are wrong, or unsafe, for someone with a bad back or a repaired knee.
- No Memory of Reality – Generic models don't know the golfer skipped three sessions, played a round on Saturday, or reported a sore shoulder on Tuesday. They can't coach the real athlete.
- Not Accountable – There's no expert standing behind the advice, no audit trail, and no way to explain why a given drill was chosen — so the guidance can't be trusted.
Technical Challenges
- Grounding Every Recommendation – Letting an LLM make coaching decisions without ever letting it make something up — every pick must trace back to real athlete data and expert-authored content.
- Safety Can't Be Probabilistic – In a product that tells people how to move their bodies, 'the model usually gets it right' is unacceptable. Injury contraindications had to be deterministic and provably exhaustive.
- Two Pillars That Talk to Each Other – Wiring practice and gym training through a shared tag and signal system — so on-course goals genuinely drive strength work — is far more than running two planners side by side.
- Adaptation Grounded in Behaviour – Making 'adaptive' true rather than a marketing word: decaying onboarding dominance, consistency-aware progression, earned graduation, and consumed-signal hygiene.
Our Approach
The whole architecture exists to answer one question: how do you let an LLM make coaching decisions without ever letting it make something up? Riverborn’s answer is a layered system where each layer narrows what the AI is allowed to do, so that by the time the model is involved it can only pick from a small set of options that are all already correct and safe.
- The AI never sees the whole library.Thousands of expert-authored items are filtered and scored down to a short, ranked candidate list before Claude is called. The model’s job is selection, not authorship.
- “Slot-locked” training. The weekly split (power day, rotation day, recovery day) is decided by rules. Each slot hands the LLM candidates for that slot only and demands exactly one pick. If the model returns the wrong thing, too few, or an unknown ID, the system deterministically fills the gap — so the expert-defined structure is guaranteed regardless of what the model does.
- Safety lives below the AI. Injury contraindications are applied as hard filters before scoring. An unsafe exercise is gone before the model ever sees it, and the LLM cannot reintroduce it.
- Everything is observable. When a safety filter fires, a slot falls back, or onboarding contraindications block content, each event is logged. The system can prove why it made every decision.
Discipline & Contributions
| Discipline | Contributions |
|---|---|
| Hybrid AI Architecture | Designing a layered engine where deterministic rules and expert content do the safety-critical work and the LLM only selects from a pre-vetted shortlist. |
| Expert Content System | Structuring and tagging drills and workouts authored by golf and S&C professionals — the only items the system is ever allowed to recommend. |
| Adaptive Engine | Building the weekly regeneration loop, signal store, and graduation logic that rebuild each athlete's plan from what actually happened. |
| Backend & Platform | Node.js / Express APIs, MongoDB state, scheduled cron jobs, and Firebase / Stripe integration across iOS and Android. |
Technical Solution Highlights
1. The ApexPlan Engine
The plan-generation pipeline turns the athlete’s full picture into a concrete week. It fetches raw modifiers (completions, debriefs, chat signals, calendar), summarises them into structured signals, then builds deterministic candidate pools — practice candidates and slot-locked training candidates, both guarded by injury contraindications. A tag-based scorer ranks the survivors, Claude selects the best combination, and a reconcile-and-validate step drops unknown IDs, dedupes, and fills empty slots deterministically before the plan is hydrated and delivered.
Crucially, the engine computes living signals: onboarding dominance decays over time. In week one the plan leans heavily on what the golfer told us at signup; by week eight it leans far more on what they actually did. The athlete the system coaches in month three is the real one, not the one from the form.
2. The Adaptive Loop
A static plan generated once is just a PDF. ApexGolf’s plan rebuilds itself every Sunday evening in the athlete’s local timezone, based on the unconsumed signals from the last seven days. It is consistency-aware (progress when completions are high, ease off when the athlete is falling behind) and uses earned graduation thresholds — sustained performance over a defined number of active and passing weeks promotes the athlete, so the plan gets harder because they earned it, not on a timer. Signals are timestamped, prioritised, and marked consumed so the engine never double-counts or acts on stale data.
3. The AI Chat Coach & Real-Time Plan Patching
The in-app chat is wired into the plan. When the golfer says something with intent — “my back is sore today”, “I’m exhausted this week” — the system can patch the live plan immediately, without waiting for the Sunday regeneration. The pattern repeats: the LLM understands the athlete, but the actual modification is deterministic (a fatigue report reduces load by a set percentage and re-prioritises recovery and mobility ahead of strength and power). The same event is emitted as a signal so the next weekly plan accounts for it too.
4. Debriefs & Progress — Insight Without Invention
After a round, the golfer logs a debrief — scores, hole-by-hole data, putts, penalties, greens in regulation, plus how they felt. An earlier version had an LLM write the takeaways; the team removed the AI writer in favour of a deterministic pattern engine. 72 expert-defined pattern checkers run against each round, results are sorted by strength, de-duplicated, and capped at the five most relevant, with authored framing, variant rotation, and cooldowns so repeated patterns don’t read identically. Every insight is reproducible, explainable, and correct by construction — never a plausible-sounding hallucination about a round that didn’t happen that way.
Architecture
One mobile codebase, a Node.js API that houses every engine, and a clear separation between the deterministic core, the expert content library, and the LLM providers. Claude is the primary selector and chat model, with OpenAI and Gemini wired in as fallbacks for resilience.
Technology Stack
- Frontend: React Native (Expo) — one codebase for iOS & Android
- Backend: Node.js / Express, MongoDB (users, plans, signals, debriefs, observability)
- AI: Claude (Anthropic) as primary selector & chat coach, with OpenAI & Gemini fallbacks; structurally enforced JSON output
- Platform: Firebase (auth & push), Stripe (subscriptions), cron jobs for weekly regeneration & notifications
Results & Outcomes
Why This Was Hard
On paper, “let AI build a golf plan” sounds trivial. Building one you can actually trust took an architecture where the AI is the smallest, most constrained component, surrounded by expert content and deterministic guarantees.
- Trust over flash.The hard requirement wasn’t “use AI” — it was produce advice a professional coach would sign their name to. That forced the AI down the stack into a constrained selector role, with experts and rules above it.
- Knowing when not to use AI. Removing the LLM debrief writer in favour of 72 deterministic checkers was a maturity decision: use AI where judgement under ambiguity helps, and remove it where reproducibility and correctness matter more.
- Observability as a first-class feature. Every safety firing, every fallback, every blocked item is logged — which is what makes the product defensible as a coaching tool.
What the client says
“Riverborn developed a complex, custom AI application for Apex Golf, standing out from the rigid, template-based options on the market. Their team excelled at simplifying technical concepts for a non-technical founder and showed incredible patience through multiple iterations to get the AI logic exactly right. Because of their meticulous attention to detail and collaborative process, I would recommend Riverborn without hesitation.”
Barry MoroneyFounder, ApexGolf