Inspiration

Tracking calories and understanding the science behind energy expenditure can be confusing. The Compendium of Physical Activities is a gold standard resource, but it’s not easily searchable or interactive. I wanted to make this knowledge more accessible through an AI-powered assistant.

What it does

Calorimate helps users find physical activities, estimate calories burned, and calculate MET values. By combining the Compendium dataset with TiDB, vector search, and LLMs, the bot can answer natural-language questions about activities and energy expenditure.

How we built it

Imported the Compendium dataset into TiDB (exercise schema, compendium table).

Created vector embeddings of activity descriptions using OpenAI’s text-embedding-3-small.

Built a retrieval pipeline where the bot matches user queries with relevant activities via vector search.

Integrated calculator tools that apply the standard MET formula to compute calories, duration, or MET values.

Designed a Streamlit UI for an intuitive Q&A interface powered by OpenAI’s gpt-4.1-nano.

Challenges we ran into

Mapping natural-language queries to structured compendium data.

Ensuring embeddings captured subtle differences between similar activities.

Handling edge cases in calorie calculations (different weights, durations, or incomplete inputs).

Balancing accuracy with responsiveness in the reasoning loop.

Accomplishments that we're proud of

Built an end-to-end AI assistant that integrates multiple components (Compendium, TiDB, Vector Search, LLMs).

Made the Compendium dataset interactive and conversational.

Created a flexible pipeline where new tools (e.g., custom calculators) can be plugged in easily.

What we learned

How to combine structured databases with embeddings for semantic search.

The importance of tool orchestration in LLM reasoning loops.

How small design decisions in data flow can impact performance and usability.

What's next for Adult Compendium Bot

Add support for personalization (e.g., age, gender, fitness level).

Extend beyond adult compendium to include youth and clinical activity datasets.

Integrate wearable data (steps, HR) for real-time calorie tracking.

Deploy as a scalable API so other fitness apps can use it.

TiDB Cloud Account Email

khanmohammadmaaz@gmail.com

Built With

  • compendium
  • langchain
  • langgraph
  • openai
  • python
  • pytidb
  • streamlit
  • text-embedding
  • tidb
  • vector-search
Share this project:

Updates