This weekend I pushed a few new small features and am working on some more that I think will make a big difference! Let’s dive in.
1. Automation
As I mentioned in the past, the Gambit app’s intention is train a greater number of people than I ever could at the highest level possible. I of course am limited to training only a few people at a time, and even with the app, I’m limited in how many programs I can continue to add and update. That’s where today’s post comes into play. Rather than manually building out a series of programs and making updates, I intend to automate that process via OpenAI’s models and codex.
Full disclosure: this post is about to get nerdy real quick.
OpenAI’s chatGPT allows natural language processing for human text to a reasonably accurate response. But it only knows pre-2021 internet data and is good for general purpose knowledge. I need a way to combine the power of the large language model (LLM) with other sources of knowledge. Additionally, the codex is significant for the generation of code, but we’ll touch on that later.
Although it is an amazing tool, I need more.
By more, I mean the ability to train chatGPT on a private corpus of my own data for extreme accuracy for my own prompts. That’s where a tool called LangChain comes into play.
LangChain is built for exactly what I’m looking for: ingest my own data to allow OpenAI’s LLM access and generate a response. LangChain works in 2 parts: ingestion of data and querying of data.
Ingestion:
Querying:
We don’t need to dive into the specifics of how the ingestion and querying works. The bottom line is I can feed the LLM with my data and query with a specific prompt and context to generate specific responses for Gambit.
This is where the codex becomes important. ChatGPT can answer coding questions as well as generate code for a number of languages, and there’s a ton of new products implementing the codex. In particular, I need an output in javascript object notation (JSON) to work with my database for the app. I just extend the end of the querying diagram with a simple JSON as the answer and then present to the user in the Gambit app and add to my database.
But, none of this should matter to you. All that matters is getting jacked, juicy, faster, stronger, and healthier. I think it’s fun to explain the process behind what I’m doing. The end goal is minimal amount of input on your end which includes simply selecting a training path (goals). Behind the scenes the app takes into account your training history and preferences to generate the perfect program using all of my own training knowledge. It basically becomes my own digital coach that knows everything I do about training. Beautiful. Of course this is in the works and may take some time to get right!
Nutrition
A feature that is complete is support for calculating your macros and daily caloric intake. I am working on implementing a way to adjust the macro percentages, but for now they’re at 40% carbs, 30% protein, and 30% fat. This guarantees you’ll get at least 1g/pound of bodyweight in protein and the necessary amount of carbohydrates for a well rounded cycle.
It takes a few simple inputs including: height (in inches), weight (in pounds), age, gender, activity level, and bodyfat % (optional but gets a better result).
Feel free to try it out! I utilized well established methods of calculating your calories with two different equations depending on if you submit a body fat percentage:
1. Mifflin-St Jeor Equation: the base method to calculate BMR without bodyfat %.
BMR = (10m + 6.25h - 5.0a) + s
m is mass in kg, h is height in cm, a is age in years, s is +5 for males and -151 for females.
2. Katch-McArdle Equation: A more accurate equation utilizing your bodyfat %.
BMR = 370 + (21.6 * LBM) where LBM is lean body mass.
These results are then multiplied by an activity level factor to determine your daily maintenance calories:
Sedentary (little to no exercise) = 1.2
Lightly Active (exercise 1-3 days/week) = 1.375
Moderately Active (train 3-5 days/week) = 1.55
Very Active (train 6-7 days / week) = 1.725
Athlete (train 2x/day, hard labor job) = 1.9
Ranking + Leaderboards
Competition drives performance. I’ve been a firm believer that being around others striving for similar goals and/or competing together brings everyone up faster than working alone. And of course, it’s just fun. That’s why I’m working on bringing a ranking mechanism and leaderboards to the Gambit app.
The base ranking mechanism will work by assigning points to users. Right now I’m working out which metrics to include, and always open to recommendations! Some that I’m considering include:
Distance traveled during running, cycling, or swimming
Speed: You can track the speed of users during their activities, such as running or cycling. Can assign points based on the speed and rank users based on the fastest average speed.
Time: track the time taken by users to complete their activities, such as a 5K run or a metcon.
Repetitions: You can track the number of repetitions performed by users during weightlifting or metcons.
Load: track the load lifted by users during strength training or PRs.
Resting Heart rate: Slightly harder to verify and will require pairing with heart rate APIs, but a cool thing to track and rank!
Sleep: Similar issue of verifying as resting heart rate, but certainly worth taking into account for a ranking system.
Nutrition
Competitions
Another fun item on the agenda. Rogue used to (still does?) run competitions where anyone could submit a score/time and a video of them completing to get on a worldwide leaderboard. Considering doing something similar. Those were fun, but it would be much better if everyone was coming from the same community (acid gambit).
Programs
The most important feature of the Gambit app. I’m currently a one man show, and working on a bunch of features. But this is my biggest priority. Working to push out more programs and levels to each program for you to crush!
Sharing
This is just a small feature added today (Sunday 12FEB). In the navbar there’s now a share button! Easily share via messages to bring others onboard. Currently at above 400 users, and it would be awesome to break 1000! Super proud of where we are now, and there’s much more to come.
Thanks for reading! Let me know your thoughts in the comments (now open).