Leveraging Google Generative AI (Google Gemini) and Ethical Coding Practices in Building Sustainable Solutions - Godswill EGEGWU 24 August 2024.pdf

iamgodswillegegwufr 147 views 41 slides Aug 24, 2024
Slide 1
Slide 1 of 41
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41

About This Presentation

This is a Presentation at the Google Developer Groups.

It targets audiences including newbies, intermediate and professionals in different fields of Computing.

You can access the online version and propose modifications or updates via the link: https://docs.google.com/presentation/d/1dhyb0gDOcs99...


Slide Content

Sustainable
Solutions
Leveraging Google Generative AI and
Ethical Coding Practices
Godswill EGEGWU
MetaPlus, LLC Connect on Linkedin
Building for Everyone

Objective 1:
Introduce attendees to Google Gemini and it's free, accessible features for
various applications.

Objective 2:
Promote ethical and sustainable coding practices to ensure code reusability,
accessibility, and long-term relevance.
The Objectives

Let’s Get Started !
Leveraging Google Generative AI and Ethical Coding
Practices in Building Sustainable Solutions
Building for Everyone

What is Generative AI?
Generative AI is a type of artificial intelligence that
can create new content, such as text, images, or
music, based on existing data.

Google Gemini is a Generate AI

In the next slide I will Introduce you Google Gemini and its accessible
features for customer, developers and businesses
Building for Everyone

Building for Everyone

The Gemini Ecosystem
The most advanced AI from Google

For Developers
For Consumers
For Business and Enterprise
Models
Gemini API
(in Google AI Studio + ai.google.dev)
Gemini for Google Workspace
Gemini for Google Cloud
Gemini in Vertex AI

Gemini | Education, Agriculture, Media
Gemini in the Google App
Gemini in Gmails, Docs…

this deck
is about

Usage patterns
Building for Everyone

We’ll cover

●Basic Prompting
●Code generation
●Image understanding
●Search, retrieval and information synthesis
●Function calling
●Tuning -
●API for Developers (Generation, SDK, Platforms)

Usage Patterns

Basic prompting
Building for Everyone

Basic Prompting
User:
Explain this joke: “I used to be
addicted to soap, but I'm clean now.”

Model: Robot Gardener's Dream:

A metal heart, a circuit mind,
A dream of green, a nature kind.
A garden craved, a verdant space,
Where sunlight danced on every
face.
Model: The joke is a pun on the
word "clean". It has two meanings:

To be free of dirt or other unwanted substances.
To be free of addiction.
Write a poem about a robot who
dreams of becoming a gardener.

Code generation
Building for Everyone

Code Generation
Content generation
Convert human language
requests to machine
requests
Rapid tool buildingGenerate code based on a
user prompt

Building for Everyone

Image understanding
Building for Everyone

Building for Everyone

Building for Everyone

Building for Everyone

Image conditioning
Multimodality
●Generate text or structured data from images

Search and Information
Synthesis
Building for Everyone

●Instructions + Context + Question all in the prompt
●Easy to implement
○No extra code, just ask.
Use the prompt's context window
Search & IR

Function Calling
Building for Everyone

Contents
Tools
Text
Function Declaration
Function Declaration
Text
Function Calling interaction
Function Call
Function Response
Text
model may predict a function call
based on user content
model can understand the function response
and generate text
OR another function call
if one or more function declarations are
provided, function calling feature will turn on

Function Calling
https://github.com/GoogleCloudPlatform/generative-ai/tree/main/gemini/function-calling/sql-talk-app goo.gle/gemini-fn-call-sql-github

Function Calling
https://github.com/GoogleCloudPlatform/generative-ai/tree/main/gemini/function-calling/sql-talk-app
SELECT ROUND((
COUNT(DISTINCT IF(returned_at IS NOT NULL, order_id, NULL)) /
COUNT(DISTINCT order_id)) * 100, 2)
AS return_rate
FROM thelook_ecommerce.orders
goo.gle/gemini-fn-call-sql-github

Function Calling
Function Calling
●Describe external functions to the model.
●The model may ask you to call the function to help it respond
to your queries.
●Endless possibilities for integrating external tools.

Getting started with the
Gemini API
Building for Everyone

Gemini API
aistudio.google.com
●Generate API Keys
●Create, test, and save prompts
●Customize models in minutes
●Generate starter code

Gemini API
aistudio.google.com

Gemini API
aistudio.google.com

Gemini API
aistudio.google.com

Gemini API
aistudio.google.com

Gemini API

ai.google.dev
REST API + Client libraries for Python, Node, Java, and Swift









LibrariesLibrariesSDKs

Vertex AI

Enterprise grade support.
Full MLOps (Examples: Model
evaluation, monitoring, registry)


Vertex AI

Check it out when you're
ready for production

Gemini API and Vertex AI

Both give access Gemini family
models.
Vertex AI
Cloud Production
ai.google.dev/docs/migrate_to_cloud
PlatfoEndpoints
rms
PlatformsPlatforms

Building for the Future:
Sustainable Codes &
Designs
Building for Everyone

What is Sustainable Codes?
and Designs?
Sustainable codes or designs simply refers to those that
are efficient: uses resources (memory, CPU) effectively,
maintainable: easy to understand, modify, and update),
scalable: can handle increasing workloads without
significant changes), reusable: can be adapted for
different purposes or projects).
Building for Everyone

Ethical practices for
sustainable codes and
designs
Building for Everyone

Key Practices:
1. Modularization
Breaking code into smaller, reusable components.
2. Testing and Validation
Thoroughly testing code to ensure quality and
reliability.
3. Documentation:
Providing clear and concise documentation and
in-code comments.
4. Optimization
Identifying and addressing performance bottlenecks.
5. Consideration of future needs
Inclusively designing systems that can adapt to
changing requirements.
Sustainable Solution
Tools & Tips to consider for a
long-lasting solution

Version Control: Use of tools like Git for
managing changes.
Adopting Open Standards: Ensuring
interoperability.
Regular Updates: Keep solutions up to date
with the latest trends




Tips

Questions/Answers
Questions

ai.google.dev
Learning more
https://ai.google.dev/docs/discord

Thank you!
Godswill Egegwu
MetaPlus, LLC Connect on Linkedin
Last updated: 24 Aug 2024
Building for Everyone