← Back to notes

NOTES & REFLECTIONS · January 2025

Journey into Gen AI & Kaggle

By Yaxin Li · 3 min read · From the writing archive

Key Takeaways

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.

← Explore more notes