Inspiration
We're passionate fantasy baseball players who've always felt frustrated by the limitations of chats provided by traditional fantasy leagues. Scattered stats, endless scrolling, and the difficulty of incorporating diverse perspectives hampered the fun and engagement. We envisioned a tool that could centralize, analyze, and enhance the entire fantasy experience for the user without ever leaving the chat.
What it does
FanPitch is an AI-powered assistant integrated directly into your fantasy league's group chat. It dynamically analyzes conversations, offering:
- Real-time insights: Instant access to relevant stats, news, and highlight clips based on players mentioned in the chat.
- Multilingual message translation support: Break down language barriers within your league with seamless real-time translation.
- Pitch a question: Gain insights into baseball stats by asking FanPitch questions relevant to the game.
How we built it
FanPitch leverages a combination of technologies:
Real-time insights: We take user chats and live game events via the MLB stats API to generate relevant conversational highlights and analysis as the game progresses. We also summarize user interactions and callout chat participation. Currently, the application has access to the 2024 MLB home runs dataset and the MLB stats API.
Pitch a question: The user's natural language input is sent to a Gemini model on Vertex AI. Through prompt engineering, the model intelligently interprets the question and translates it into a structured query suitable for BigQuery. This is the core of our solution, allowing users to access complex data without needing to know SQL or understand database schemas. The Gemini model uses this data to craft a clear, concise, and contextually aware response.
Chat Integration: The AI-generated response is delivered directly back into the fantasy league chat, providing users with instant insights without ever leaving the conversation. This creates a truly integrated and streamlined experience.
Technologies used
- Vertex AI (featuring Gemini models): Powers the natural language understanding and response generation.
- API GW and Cloud Run functions: Powers the backend by handling API requests and executing the natural language understanding and response generation logic.
- BigQuery: Stores and manages our baseball datasets.
- Firebase: UI hosting.
- React, Tailwind and vite: UI.
- MLB Stats API: Provides live game (example) data and top performer statistics.
Challenges we ran into
As a team that has little to no knowledge on AI/ML technologies, we faced hurdles in understanding the fundamentals and the general landscape. We had to quickly learn about different types of models and the overall workflow for developing and deploying AI-powered applications.
We also faced the challenge of selecting and preparing the right datasets for FanPitch. This data engineering process was essential, not only for the current functionality but also to facilitate future expansion with additional data, ultimately improving the AI's ability to provide relevant and insightful responses.
During this project, we experimented with context caching in Vertex AI. While we gained valuable insights into its capabilities, it didn't ultimately fit our immediate needs for this particular use case. However, we recognize the potential of context caching for future applications, particularly in the area of text analysis, and plan to explore its possibilities further as our projects evolve.
What we learned
Building FanPitch reinforced the importance of:
- Understanding and incorporating the power of AL/ML into our applications
- Importance of having a great user experience
- Collaboration and communication amongst the team
- Embrace the learning process
- Continual testing and refinement being crucial for improving AI performance.
What's next for FanPitch
Our roadmap for FanPitch includes:
- Catch Me Up: This feature would summarize the last few minutes of the conversation while the user was in an idle state or away from the chat.
- Audio Podcast Generation: The one feature on our roadmap that we are excited about is the ability to generate audio podcasts of chat logs. We envision this as a way for users to relive the excitement of close games, or hilarious banter.
- Improve Insights and AI model evolution: The quality of FanPitch's insights is directly tied to the data that is being used. We plan to enrich our data with diverse sources (baseball statistics, player information, and external data like news and expert predictions) and evolve our AI models through prompt engineering (including system instructions), and retraining.
Built With
- cloud-functions
- firebase
- google-bigquery
- google-cloud-apigateway
- google-storage
- python
- react
- tailwind
- typescript
- vertex
- vite
Log in or sign up for Devpost to join the conversation.