Gen AI

Q1: What is Generative AI?

Answer:
Generative AI is a branch of Artificial Intelligence that creates new content such as text, images, audio, video, and code based on patterns learned from existing data. Examples include ChatGPT, Google Gemini, Claude, Midjourney, and DALL·E.


Q2: How is Generative AI different from Traditional AI?

Traditional AIGenerative AI
Analyzes existing dataCreates new content
Performs prediction/classificationGenerates text, images, videos, code
Rule-based or ML modelsLarge Language Models (LLMs) and Foundation Models
Example: Spam DetectionExample: ChatGPT

Q3: What is a Large Language Model (LLM)?

Answer:
A Large Language Model (LLM) is an AI model trained on massive amounts of text data to understand and generate human-like language.

Examples:

  • GPT-4 / GPT-5
  • Gemini
  • Claude
  • LLaMA
  • Mistral

Q4: What is a Prompt in Generative AI?

Answer:
A prompt is the instruction or input given to an AI model to generate a response.

Example:

“Write a Python program to reverse a string.”

The better the prompt, the better the output.


Q5: What is Prompt Engineering?

Answer:
Prompt Engineering is the process of designing effective prompts to get accurate and relevant responses from AI models.

Techniques include:

  • Zero-shot prompting
  • One-shot prompting
  • Few-shot prompting
  • Chain-of-Thought prompting
  • Role prompting

Q6: What are Foundation Models?

Answer:
Foundation Models are large pre-trained AI models trained on vast datasets that can perform multiple tasks with minimal fine-tuning.

Examples:

  • GPT
  • Gemini
  • Claude
  • LLaMA

Q7: What is GPT?

Answer:
GPT (Generative Pre-trained Transformer) is a family of language models developed by OpenAI.

It works in two stages:

  • Pre-training on massive datasets
  • Fine-tuning or instruction tuning for specific tasks

GPT can generate:

  • Text
  • Code
  • Emails
  • Articles
  • Summaries
  • Conversations

Q8: What is a Transformer Model?

Answer:
A Transformer is a deep learning architecture introduced by Google in 2017.

It uses:

  • Self-Attention Mechanism
  • Multi-Head Attention
  • Positional Encoding
  • Encoder-Decoder Architecture

Transformers power modern LLMs like GPT and BERT.


Q9: What is Tokenization?

Answer:
Tokenization is the process of splitting text into smaller units called tokens.

Example:

Sentence:

 
I love AI
 

Tokens:

 
["I", "love", "AI"]
 

LLMs process tokens instead of full sentences.


Q10: What are Tokens?

Answer:
Tokens are the smallest units processed by an LLM.

A token may be:

  • A word
  • Part of a word
  • A punctuation mark
  • A symbol

Example:

 
Artificial Intelligence
 

may become

 
Artificial
Intelligence
 

or even smaller subwords depending on the tokenizer.


Q11: What is Temperature in Generative AI?

Answer:
Temperature controls the randomness of AI responses.

  • 0.0 → Deterministic and predictable
  • 0.5 → Balanced creativity
  • 1.0 → More creative
  • Higher than 1 → Highly random

Lower temperature is ideal for coding and factual answers.


Q12: What is Top-p Sampling?

Answer:
Top-p (Nucleus Sampling) selects the next word from the smallest set of tokens whose cumulative probability exceeds p.

Example:

  • p = 0.9
  • AI selects from the most probable 90% of words.

It balances creativity and accuracy.


Q13: What is Hallucination in Generative AI?

Answer:
Hallucination occurs when an AI model generates false, misleading, or fabricated information while presenting it confidently.

Ways to reduce hallucinations:

  • Better prompts
  • Retrieval-Augmented Generation (RAG)
  • Fine-tuning
  • Fact-checking outputs

Q14: What is Fine-Tuning?

Answer:
Fine-Tuning is the process of training a pre-trained model on domain-specific data to improve performance for a particular task.

Examples:

  • Medical chatbot
  • Legal assistant
  • Banking AI
  • Customer support bot

Q15: What is Retrieval-Augmented Generation (RAG)?

Answer:
RAG combines an LLM with an external knowledge source.

Process:

  1. User asks a question.
  2. Relevant documents are retrieved.
  3. Retrieved information is provided to the LLM.
  4. The LLM generates an answer based on that information.

Benefits:

  • More accurate responses
  • Reduced hallucinations
  • Access to up-to-date knowledge

Q16: What is Embedding in Generative AI?

Answer:
Embeddings are numerical vector representations of text, images, or other data that capture semantic meaning.

Uses:

  • Semantic search
  • Recommendation systems
  • Similarity search
  • Chatbots
  • RAG pipelines

Q17: What is Vector Database?

Answer:
A Vector Database stores embeddings and enables similarity search.

Popular Vector Databases:

  • Pinecone
  • FAISS
  • ChromaDB
  • Weaviate
  • Milvus
  • Qdrant

They are widely used in RAG applications.


Q18: What is LangChain?

Answer:
LangChain is an open-source framework for building applications powered by LLMs.

Features:

  • Prompt templates
  • Chains
  • Memory
  • Agents
  • Tools
  • RAG pipelines
  • API integrations

Q19: What is an AI Agent?

Answer:
An AI Agent is an autonomous system that can:

  • Understand tasks
  • Plan actions
  • Use external tools
  • Access APIs
  • Retrieve information
  • Make decisions
  • Complete multi-step workflows

Examples:

  • Customer support agent
  • Travel booking assistant
  • Coding assistant

Q20: What are some popular Generative AI tools?

Answer:

ToolPurpose
ChatGPTAI Chatbot
Google GeminiLLM
ClaudeAI Assistant
Microsoft CopilotCoding & Productivity
GitHub CopilotCode Generation
DALL·EImage Generation
MidjourneyAI Art
Stable DiffusionImage Generation
Runway MLAI Video Generation
LangChainLLM Application Framework
LlamaIndexRAG Framework
Hugging FaceAI Models & Libraries