Skip to content

Google 5-Day GenAI Intensive Course toolkit featuring Hy implementation of Gemini API, vector embeddings for French verbs, and a comprehensive caching system for large-scale NLP analysis.

License

Notifications You must be signed in to change notification settings

aygp-dr/5dgai-intensive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

141 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

5-Day Gen AI Intensive Course

images/gemini/course-banners/course-timeline-banner-gemini.jpeg

Python Version Poetry License: MIT

Course Overview

Welcome to the Google’s 5-Day Generative AI Intensive course companion repository! This toolkit helps you:

  • 🚀 Hit the ground running with pre-configured environments
  • 🔌 Connect to Google AI Studio APIs quickly with minimal setup
  • 📊 Focus on learning instead of debugging environment issues
  • 📝 Keep your notes organized by course day
  • 🔍 Explore bonus examples beyond what’s covered in the course

Note: While the official course uses Python and Jupyter Notebooks, this repository takes a different approach using Hy (a Lisp dialect that runs on Python) and Org-mode for literate programming. The core functionality and concepts remain the same, but with the elegance of Lisp syntax and the power of Org-mode’s tangling capabilities.

What You’ll Learn in the Course

  • Day 1: Foundational Large Language Models & Text Generation + Prompt Engineering
  • Day 2: Embeddings and Vector Stores/Databases
  • Day 3: Generative AI Agents and Agents Companion
  • Day 4: Domain-Specific LLMs and Fine-tuning
  • Day 5: Production deployment and advanced use cases

Quick Start Guide

Setup your environment

# Using make (recommended approach)
make setup

# Start development environment after setup
make dev

Note: Always prefer using `make` commands over direct scripts or tool calls. The Makefile provides consistent, tested, and maintainable operations for all project tasks.

Configure your API keys

Edit the .env file to add your API keys:

AI_STUDIO_API_KEY="your-key-here"
KAGGLE_USERNAME="your-username"
KAGGLE_KEY="your-key"
# Optional keys for additional exercises
OPENAI_API_KEY=""
ANTHROPIC_API_KEY=""

Work with Org-mode Notebooks

# Start the development environment first
make dev

# Tangle code from a specific notebook
make tangle FILE=notebooks/day1/01-introduction.org

# Tangle all notebooks and build source files
make build

# Run tests after making changes
make test

Note: The Makefile handles environment setup, dependencies, and execution context. Always use `make` commands rather than direct tool invocation to ensure consistent behavior.

Test your API connectivity

# Quick validation of your Gemini API setup
make api-test

Repository Tools & Features

  • Gemini API Client: Ready-to-use Hy/Python interface to Google’s Gemini models
  • Org-mode Notebooks: Organized by course day for easy learning & tangling
  • Restclient Integration: Direct API testing in Org-mode with ob-restclient
  • IPython Support: Enhanced REPL experience for both Python and Hy
  • Resource Collection: Papers, references, and supplementary materials
  • Docker Integration: Containerized environment to avoid compatibility issues
  • Automated Testing: Verify API connectivity with a single command

Core Features Demonstrated

  • Text generation with Gemini models
  • Prompt engineering techniques and evaluation
  • Embeddings and vector similarity search
  • RAG (Retrieval Augmented Generation) implementations
  • Function calling and agentic systems with LangGraph
  • Fine-tuning custom models for domain-specific tasks
  • Google Search grounding for real-time information

Using the Gemini Client

Our simplified client makes it easy to interact with Gemini models using Hy:

(import [src.gemini-client [GeminiClient]])

;; Initialize with API key from .env file
(setv client (GeminiClient))

;; Simple text generation
(setv response (.generate-content client 
    "Explain the concept of attention in transformer models."))
(print (.extract-text client response))

;; Chat conversation
(setv messages [
    {"role" "user" "content" "What are three applications of generative AI?"}
    {"role" "model" "content" "1. Content creation\n2. Code generation\n3. Data augmentation"}
    {"role" "user" "content" "Elaborate on code generation use cases."}
])
(setv chat-response (.chat client messages))
(print (.extract-text client chat-response))

Course Day-by-Day Navigation

Get Help & Community

  • Join the course Discord for live discussions
  • Check the examples/ directory for additional code samples
  • For contributors: see Development Guide
  • Submit issues if you find bugs or have enhancement ideas

Helpful Commands

CommandDescription
make helpShow all available make commands
make setupSetup Python environment with Poetry
make devStart Poetry shell for development
make cleanRemove build artifacts and cache files
make api-testTest API connectivity with Gemini
make env-testTest environment setup for Google API
make test-genaiTest Google GenAI API functionality
make buildTangle all Org files to source code
make tangleTangle a specific Org file (FILE=path)
make tangle-allTangle all org files in the project
make lintRun all linters (Python, Shell, Org, Elisp)
make lint-pyLint Python files
make lint-shLint shell scripts
make lint-orgLint Org mode files
make lint-elLint Emacs Lisp files
make lint-allRun comprehensive linting with script
make formatFormat all code files
make format-pyFormat Python files with black and isort
make format-shFormat shell scripts with shfmt
make testRun all tests
make test-paper-summarizerRun paper summarizer tests
make test-livestreamRun livestream transcriber tests
make dockerBuild all Docker containers
make docker-jupyterRun Jupyter notebook server in Docker
make docker-apiRun API service in Docker
make paper-summariesGenerate summaries for all papers
make extract-french-verbsExtract French verbs for embedding tests
make verb-embeddingsProcess French verbs for embeddings
make dépatouillerRun embedding debug test with dépatouiller
make genai-embeddingsTest Google GenAI embeddings for French verbs
make verb-similarityAnalyze French verb similarity with embeddings
make verb-matrixGenerate minimal French verb similarity matrix
make install-dev-toolsInstall development tools (linters, formatters)
make check-toolsCheck if required development tools are installed

Course Resources

images/gemini/network-visualizations/wave-pattern-blue-purple-gemini.jpeg

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Google 5-Day GenAI Intensive Course toolkit featuring Hy implementation of Gemini API, vector embeddings for French verbs, and a comprehensive caching system for large-scale NLP analysis.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors