Yaxin Li

[Gen AI] x [Kaggle]

· Yaxin Li

Key Takeaways

  • Comprehensive Generative AI Framework: Gained a foundational understanding of Generative AI concepts, covering LLM evolution, embeddings, AI agents, domain-specific LLMs, and MLOps practices.
  • Practical Skills: Hands-on experience with the Gemini API, embedding usage, grounding techniques, function calling in LLMs, fine-tuning custom models, and applying MLOps with Vertex AI.
  • Domain Specialization: Learned to fine-tune models like Gemini for domain-specific tasks, such as analyzing payment behavior, predicting default probabilities, and creating customized credit scoring models using proprietary FinTech data.
  • Real-World Applications: Learned to bridge AI systems with external tools (e.g., SQL, Google Search) and deploy sophisticated AI agents for practical use cases.

Objective

To empower participants with a deep understanding and practical skills to design, deploy, and manage generative AI solutions, leveraging state-of-the-art tools and techniques to solve real-world challenges efficiently.

Day1 Prompt Engineering

Explored the evolution of LLMs, from transformers to techniques like fine-tuning and inference acceleration. I also get trained in the art of prompt engineering for optimal LLM interaction.

The code lab walked through getting started with the Gemini API and covered several prompt techniques and how different parameters impact the prompts.

short_model = genai.GenerativeModel(
    'gemini-1.5-flash',
    generation_config=genai.GenerationConfig(max_output_tokens=200))

response = short_model.generate_content('Which loan segments in the portfolio show the highest risk of default?')
print(response.text)

Day2 Embeddings and Vector Stores/Databases

Learnt about the conceptual underpinning of embeddings and vector databases and how they can be used to bring live or specialist data into the LLM application. Explored their geometrical powers for classifying and comparing textual data.

Day3 Generative AI Agents

Learnt to build sophisticated AI agents by understanding their core components and the iterative development process.

The code labs cover how to connect LLMs to existing systems and to the real world. Learn about function calling by giving SQL tools to a chatbot, and learn how to build a LangGraph agent that takes orders in a café.

Day4 Domain-Specific LLMs

Delved into the creation and application of specialized LLMs like SecLM and MedLM/Med-PaLM, with insights from the researchers who built them.

In the code labs, I have learnt how to add real world data to a model beyond its knowledge cut-off by grounding with Google Search. Also learnt how to fine-tune a custom Gemini model using my own labeled data to solve custom tasks.

from genai import CustomModel

# Fine-tune a model
custom_model = CustomModel('gemini-1.5-base')
training_data = "path/to/labeled_data.jsonl"
custom_model.fine_tune(data_path=training_data)

# Use the fine-tuned model
response = custom_model.generate_content('Generate a summary of this financial report.')
print(response.text)

Day5 MLOps for Generative AI

Discover how to adapt MLOps practices for Generative AI and leverage Vertex AI’s tools for foundation models and generative AI applications.