# Generative AI

AI -> ML -> DL(deep) -> Generative AI (subsets)

That focuses on generative content (text, image, audio, code etc)

Generative Model -> a branch of ML which mathematically approx the world object

Factors making Generative Model possible now

* Large Datasets
* availble of computation resources
* innovative DL models

Generative AI use cases

* synthetic data generation

LLM and Generative AI

Generative AI -> LLM + Foundation Models (GPT-4 etc)

How Do LLM work

encoder, decoder, transformer

Common LLM&#x20;

<figure><img src="/files/nkrmtopdO4At6QCZWITT" alt=""><figcaption></figcaption></figure>

Dolly -> Databricks (march 27, 2024)

Common LLM task

* content creation
* summarization
* question answer
* machine translation

LLM business use case

* customer persoanlization & segmentation
* feedback analysis
* virtual assistants
* code genration

LLM Application

LLM Falvours -> open source models (metabricks, llama fb) + proprietary models or LLM as service (openai, anthropic claude)

choose right model flavor ( LLM model selection factors -> consider privacy, quality, cost, latency)

Proprietary model (pros - quality, speed, cons -> cost, data privacy, vendor lock in)

open source models (pros - task tailoring, inference cost, control, cons - upfornt time investment, data requirment, skill sets)

Pre-trained model and training - (initial training with large corpus of data) - Foundation model + our data with fine tuning

FIne tuning model -> pre trained model/Foundation model + retrian on small data sets

Eg question answering model -> FOundation model + question anser data training

Mixing LLM flavors /models in a workflow (langchain helps on this) (multi-LLM)

eg summary + sentiment LLM

RAG - retrieval augmented Generation (enhance LLM output with external datasource)

Issue - new data comes in -> requires retriaing the model

Solution - RAG -> input — RAG + external vector database — return releavnt inputs to trained model

Databricks AI  + mossaic ML

Industry impacted with Generative AI

tech, bank, pharma

customize + secure env + our data

how to prepare for AI revolution  -> act urgently, underatand AI, develop strategy, identify use case, invest

potential risk and challenges

legal, ethical (bias, misinformation), social, environmental, security, intellectual property, issue

dont have forgetting feature in models, can reproduce model data,&#x20;

Active Regulatory Area

* EU AI Act

Bias reinforcement loops (bias input and output)

hallucination (intrincic and extrinsic

how to address each issue like ethical issue, privacy issue ec

AUdit -> model, governance, application

Human - AI interactio and impact on society


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.pranaypourkar.co.in/the-programmers-guide/ai/generative-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
