Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modular Framework for Gemini API Usage

Overview

This project focuses on designing and evaluating a modular framework for using the Gemini API based on the official Gemini 2.5 Flash Notebook.

The goal is to transform an educational notebook structure into a more organized, maintainable, and evaluable software framework by separating configurations, shared utilities, capability modules, validation logic, and result tracking.

Project Objectives

  • Analyze the structure of the official Gemini 2.5 Flash Notebook
  • Identify limitations of the sequential notebook-based approach
  • Design a modular architecture for Gemini API usage
  • Implement reusable components for different Gemini capabilities
  • Compare the original structure with the modular implementation

Implemented Capabilities

  • Text Generation
  • Multi-turn Chat
  • Image Input
  • Video Input
  • Structured Output
  • Function Calling
  • Code Execution

Repository Structure

.
├── notebooks/
│   ├── 01_original_notebook.ipynb
│   ├── 02b_baseline_evaluation_completed.ipynb
│   └── 03_modular_notebook_completed.ipynb
│
├── results/
│   ├── baseline_results.csv
│   └── modular_results.csv
│
├── report/
│   └── Bachelor_Project_Report.pdf
│
├── assets/
│   └── synthetic_shapes.png
│
└── README.md

Methodology

  1. Analysis of the original Gemini Notebook
  2. Preparation of an executable baseline version
  3. Design and implementation of the modular framework
  4. Execution of controlled evaluation scenarios
  5. Comparison of both approaches

Modular Architecture

The modular version separates:

  • Model configuration
  • API client initialization
  • Common utility functions
  • Capability-specific modules
  • Validation components
  • Result recording system

Evaluation

Evaluation metrics include:

  • Output correctness
  • Token consumption
  • Code readability
  • Extensibility
  • Execution information tracking

Technologies

  • Python
  • Google Gemini API
  • Gemini 2.5 Flash
  • Jupyter Notebook / Google Colab
  • CSV-based result tracking

Files Description

Notebooks

01_original_notebook.ipynb
Original notebook used as the reference implementation.

02b_baseline_evaluation_completed.ipynb
Baseline version prepared for controlled execution and evaluation.

03_modular_notebook_completed.ipynb
Final modular implementation containing the redesigned framework.

Reports

Bachelor_Project_Report.pdf
Complete bachelor project report.

Results

The project compares the original notebook approach with the modular framework to investigate improvements in:

  • Maintainability
  • Reusability
  • Evaluation consistency
  • Development scalability

Author

Bachelor Project
Computer Engineering - Artificial Intelligence

Project Title:

Design and Evaluation of a Modular Framework for Using Gemini API Based on Official Gemini 2.5 Flash Notebook

About

Design and Evaluation of a Modular Framework for Using Gemini API Based on Official Gemini 2.5 Flash Notebook

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages