0% found this document useful (0 votes)
67 views

Session 15 Building Applicaiton Using Generative AI

The document outlines the responsibilities of Generative AI developers, including model selection, training, evaluation, and deployment. It emphasizes the importance of ethical considerations, cross-domain expertise, and best practices for session management and output validation. Additionally, it discusses various deployment options and the potential applications of Generative AI across industries such as healthcare, marketing, and software engineering.

Uploaded by

Nameless Wonder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Session 15 Building Applicaiton Using Generative AI

The document outlines the responsibilities of Generative AI developers, including model selection, training, evaluation, and deployment. It emphasizes the importance of ethical considerations, cross-domain expertise, and best practices for session management and output validation. Additionally, it discusses various deployment options and the potential applications of Generative AI across industries such as healthcare, marketing, and software engineering.

Uploaded by

Nameless Wonder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Building Applications Using Generative AI

• Role of Developers as Consumers of Generative AI APIs.


• Building Applications from Generative AI Outputs.
Ram N Sangwan • Session & Chat History Management Best Practices
• Framework for Output Validation & Continuous Improvement of Prompts
• Deployment Options and Best Practices.
Role of Developers As Consumers of Generative AI APIs.
Generative AI Developer - Responsibilities

Model • The quality of training data directly impacts the performance of a generative
Selection and model.
Architecture • Curate and pre-process datasets to ensure they are diverse, representative,
and free from biases that could affect the model’s output.

• Training a Generative AI model is a resource-intensive process.


• GenAI Developers manage the training phase, optimizing hyperparameters
Model Training • Generative AI Developers
and adjusting manage
the model’s the training phase,
architecture optimizing
to achieve the hyperparameters
desired results.and
and Fine-Tuning adjusting the model’s architecture to achieve the desired results.
• Fine-tuning is an iterative process that refines the model’s output.
• Fine-tuning is an iterative process that refines the model’s output.

Evaluation • GenAI Developers employ various metrics to evaluate the model’s performance.
and
• They also conduct human evaluations to ensure that the generated content
Validation aligns with the intended purpose.
Generative AI Developer - Responsibilities

Deployment • Once the model meets the quality standards, it’s time to deploy it into
and applications.
Integration • You may develop APIs, design user interfaces, or integrate the model into
existing systems to make it accessible and user-friendly.

• • Training
GenAI Developers
a Generative will focus
AI model on enhancingprocess.
is a resource-intensive the personalization capabilities
Enhanced of AI models.
• Generative AI Developers manage the training phase, optimizing hyperparameters and
Personalization • This means AI-generated content will become more tailored to individual
adjusting the model’s architecture to achieve the desired results.
preferences, whether it’s in marketing, content creation, or virtual
• Fine-tuning is an iterative process that refines the model’s output.
assistants.

• With great power comes great responsibility.


Ethical • You will play a pivotal role in addressing ethical concerns related to AI, such
Considerations as bias, privacy, and the responsible use of AI-generated content.
• You need to ensure that AI models are trained and deployed in an ethical and
transparent manner.
Generative AI Developer - Responsibilities

• The versatility of GenAI models means that GenAI Developers will need to
develop cross-domain expertise.
Cross-Domain • They may work on projects ranging from healthcare and finance to
Expertise entertainment and education, adapting their skills to various industries and
applications.
API integration: Connect and Make Requests to GenAI services.
Connect and Make Requests to Generative AI
services.

The API will respond


Set up a way to make Making with data. You'll need
HTTP requests. This to handle this data in
API could be using a library Requests your application, which
You'll need an API key Documentati like `requests` in
Python, or built-in
could involve parsing it
from the service on
functions in JavaScript, and integrating it into
provider. When making a request,
etc. your application.
you'll typically need to
Familiarize yourself
include your API key in
with the API
the header, and the data
API Key documentation
Setup you're sending in the Handling
provided by the
service.
body of the request. Response
s
Connect and Make Requests to GenAI Services.
A basic example in Python using the `requests` library:
Examples: Define the endpoint URL
import requests
import json
Define the headers
url = "https://api.your-ai-service.com/generate"
Define the data you're sending
headers = {
"Authorization": "Bearer YOUR_API_KEY",
(this will depend on the API)
"Content-Type": "application/json"
} Make the POST request
data = {
"input": "Your input text here"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
generated_text = response.json()["output"]
Parse the response

print(generated_text)

The structure of `data` and the response handling will depend on the
specific API you're using.
Building Applications that Leverage GenAI outputs
Here are some of the areas of implementation

Automated Custom Software Engineering

Generative AI leading the way are start-ups like GitHub’s CoPilot to


streamline coding processes.

Content Generation with Management


Building
Applications Autonomous content generation is a powerful tool for any business, allowing
them to create high-quality content faster and more efficiently than ever
that Leverage before while augmenting human creativity.
GenAI Output
Marketing and Customer Experience

Businesses can generate high-quality content quickly and efficiently, saving


time and resources. This can include blog articles, ad captions, product
descriptions, and more.
Healthcare
Mini Protein Drug Discovery and Development

Cancer Diagnostics
Paige AI has developed generative models to assist with cancer diagnostics,
creating more accurate algorithms and increasing the accuracy of diagnosis.
Building
Applications Diagnostically Challenging Tasks.
that Leverage
Day-to-day Medical Tasks
GenAI Output
Antibody Therapeutics

Absci Corporation uses machine learning to predict antibodies’ specificity,


structure, and binding energy for faster and more efficient development of
therapeutic antibodies.
Building Applications that Leverage GenAI Output
Product Design and Development

It can help automate data


analysis and identify trends
in customer behaviour and
GenAI is transforming product preferences to inform
design and development by product design.
providing innovative solutions
that are too complex for
humans to create. GenAI allows for virtual
simulations of products to
improve design accuracy, solve
complex problems more
efficiently, and speed up the
research and development
process.
How to Build a Generative AI solution?

It involves designing and


training AI models to
generate novel outputs
It requires a deep based on input data,
understanding of both the often optimizing a
technology and the specific metric.
Key steps includes defining the
specific problem it aims to
problem, collecting and pre-
solve.
processing data, selecting
appropriate algorithms and
models, training and fine-tuning
the models, and deploying the
solution in a real-world context.
How to Build a Generative AI solution?
Problem Defining and objective Deployment and monitoring
setting
Data Labelling and Refinement
Deployment isn’t merely technical; it also
It’s paramount to comprehend the The data collected must be refined. involves ethics.
problem to be addressed and the This means cleaning the data to eliminate Principles of transparency, fairness, and
desired outputs. errors, normalizing it to a standard scale, accountability guide the release into the real
A deep understanding of the specific and augmenting the dataset to improve its world.
technology and its capabilities is richness and depth. Regular checks, feedback collection, and
equally crucial, as it sets the Data labelling - involves manually system metric analysis ensure that the model
foundation for the rest of the annotating data to facilitate more effective Model training remains efficient, accurate, and ethically sound
journey. AI learning. and fine-tuning in diverse real-world scenarios.

Understanding Foundational Model Evaluation: It is a pivotal step


Before training a model, one needs data
models. to ascertain the model’s performance
and lots of it. This process entails
By starting with models, developers after training.
gathering vast datasets and ensuring their
can leverage the inherent capabilities This process ensures the model
relevance and quality.
and further fine-tune them for specific achieves the desired results and is
Data should be sourced from diverse
tasks, saving significant time and reliable in varied scenarios.
sources, curated for accuracy, and
computational resources.
stripped of any copyrighted or sensitive
content. Model evaluation and refinement
Choosing a foundational model
Data collection and management
Session & Chat History Management Best Practices
Session & Chat History Management Best Practices
These are crucial aspects of Generative AI, especially in applications like chatbots or virtual assistant

Here are some best practices:


• Data Privacy and Security: Always ensure that the data collected during sessions is stored
securely and in compliance with relevant data protection regulations. Personal data should
be anonymized or pseudonymized to protect user privacy.
• Data Retention: Implement a data retention policy that specifies how long session data is
stored.
• Context Management: Maintain the context of the conversation in the session history.
Session & Chat History Management Best Practices
• Error Handling.
• Feedback Loop.
• Clear Communication: Inform users about how their data will be used and stored.
• Scalability: to handle increasing amounts of chat data as the user base grows.
• Multi-Session Management: For AI models that interact with the same users over multiple
sessions, the system should be able to link these sessions together to provide a more
personalized and consistent user experience.
Remember, the goal is to create a secure, efficient, and user-friendly environment that respects
user privacy while still allowing the AI to learn and improve from its interactions.
Framework for Output Validation & Continuous Prompts Improvement
Output validation and continuous prompts improvement cycle

• It involves using various metrics to assess the performance of the AI


Output model.
Validation • Human evaluation is also crucial to ensure the generated content
aligns with the intended purpose and is contextually appropriate.

• Training a Generative AI model is a resource-intensive process.


Error •
• Generative
This could involve examining instances where the model's output
AI Developers manage the training phase, optimizing hyperparameters and
deviated from the expected result, or where the model's
Analysis adjusting the model’s architecture to achieve the desired results.
performance was subpar.
• Fine-tuning is an iterative process that refines the model’s output.

Model • Based on the error analysis, the model is then improved.


Improvement • This could involve fine-tuning the model, adjusting hyperparameters,
or even changing the model architecture.
Output validation and continuous prompts improvement cycle.

Prompt
Engineering • The aim is to guide the model to produce better outputs.

• Training a Generative AI model is a resource-intensive process.

Retraining and • • Generative


The improved modelmanage
AI Developers is thentheretrained, and optimizing
training phase, the newly generated outputs
hyperparameters are
and adjusting
there-evaluated.
model’s architecture to achieve the desired results.
Re-evaluation
• Fine-tuning is an iterative process that refines the model’s output.

• Once the model's performance meets the desired standards, it is deployed.


Deployment However, the improvement cycle doesn't stop here.

This framework ensures that the Generative AI models are continuously improved and adapted to
generate high-quality, relevant, and contextually appropriate content.
Deployment Options
Cloud-Based Deployment

Many Generative AI models are deployed on cloud platforms like Oracle Cloud, AWS,
Google Cloud, or Azure.

On-Premises Deploy
Deployment
For sensitive applications where data privacy is paramount, Generative AI models can
Options for be deployed on-premises.
Generative AI This requires substantial computational resources and expertise.

Edge Deployment

In some cases, Generative AI models can be deployed on edge devices (like


smartphones or IoT devices).

This requires model optimization to reduce resource usage.

https://blogs.nvidia.com/blog/what-is-edge-ai/
Thank You

You might also like