Inspiration

I am interested in Generative AI Technologies and started to study recently Google Gemini (AI Studio, Gemini Python SDK for Developer) . Hence I have decided to participate to this Major League Baseball hackathon, in order to develop and experiment Google Gemini Multimodal and Custom Instructions features, and recently decide to promote usage of Generative Vertex AI + MLB application on Google Cloud Computing using Google Cloud Run

What it does

  • enable users (fans) to interact with Major League Baseball data (Teams, Players) data in order to get Video summary with main results (score,..) and Parameters (exitVelocity, projectedDistance, launchAngle)

How we built it

Full Stack Application in Python with :

  • Web Interface enabling users (fans,...) to interact about Major League Baseball Video Homerun Data (Team and Players) in order to get short summary with Results (score) + Important Parameters (exitVelocity, ProjectedDistance, launchAngle)

  • several Google Gemini AI powered technologies :

    • System Prompt Instructions to specify declaratively appropriate filtering and search strategy
    • Function Calling to call dynamically Major League Baseball Data retrieval API
    • Multimedia (Video + Audio) features from available Google Gemini Python SDK
    • AI Chat features from available Google Gemini Python SDK
  • Migration from Google Gemini AI (Developer) to Vertex AI : After first Development/Prototyping with Google Gemini AI + API key, new version on Vertex AI with (GCP + Region settings) has been performed requiring to use appropriate librairies/classes/settings and deployment on Cloud Run to get public access

  • Internationalization enabling users to switch dynamically between english, japanese, spanish languages/locales

Challenges we ran into

  • Hallucination : first version of the MLB Video extraction Application returns bad results, requiring to add some Contextual Major League Baseball Team Players Information extracted from MLB Team Roaster Dataset

  • Integration of various Filtering / Search Agents and Dynamic External Data

  • Combination of Imperative (Python EcoSystem) and Declarative (Custom Instructions) Programming

  • Migration from Google Gemini AI (Developer) to Vertex AI : After first Development/Prototyping with Google Gemini AI + API key, new version on Vertex AI with (GCP + Region) has been performed (TopK configuration value from 64 has been lowered in order not to exceed 41 limit)

  • Internationalization of application frontend wordings, user requests, application response for spanish, japanese foreign languages

Accomplishments that we're proud of

Chatbot Application enabling to interact about Major League Baseball Video Team/Players Data and Get Main Result(score)/Parameters (exitVelocity, projectedAngle, launchAngle) Video Homerun Summary, in just a few lines of Python Code thanks to :

  • Google Gemini + Vertex AI Python SDK (AI Chat, Multimodal, Function Calling) combined with Streamlit Librairies

  • Google Vertex AI Python Full Stack Application deployed on Cloud Run

  • Generative AI Prompt Custom Instructions

  • Internationalization of Application Frontend wordings, user requests and Application answers using Python Library

Serverless Development/Build/Deployment of MyMBL project with Google Cloud Technologies : hosting/Run on Cloud Run , Cloud Shell Editor (IDE) and Terminal Command Line for Build/Deploy

Design with Flexibility (Data Externalized thru Environment Variables and Cloud Storage) and Performance Goals (Singleton Entity Patterns)

What we learned

  • Major League Baseball ecosystem (data, team, player, rules)

  • Google Gemini AI technologies such as multimedia video + audio management, vertex AI

What's next for MyMLB

  • Complete Data to manage other Team / Player, knowing that only Los Angeles Dodgers team with Player shohei is currently managed in the ProofOfConcept version

  • Improve foreign Languages Interaction : Spanish, Japanese,...

Built With

Share this project:

Updates