01_-_Generative_AI
Page 1: Introduction
Overview of the session on Large Language Models and Generative AI.
Instructor: Ivika Jäger, PhD
Date: November 2024
Institution: Mittuniversitetet, Mid Sweden University
Page 2: Agenda
Topics to be covered:
Machine learning methods
MIUN guidelines
Generative AI
Prompt design
Page 3: Machine Learning Methods
Introduction to different methods of machine learning.
Page 4: AI as a General Purpose Technology
Characteristics of AI:
Highly adaptable and flexible
Lacks a user manual; requires trial and error
Applications based on user understanding of problems
Page 5: Understanding Machine Learning (ML)
Definition: Machines learning from data without explicit programming.
Key functions:
Recognizes patterns
Makes decisions
Improves with experience
Essential to modern AI applications.
Page 6: Applications of Machine Learning
Various types and applications:
Image Compression
Customer Retention
Discovery and Classification
Types of ML:
Supervised Learning
Unsupervised Learning
Reinforcement Learning
Fields of application:
Market predictions
Fraud detection
Weather forecasting
Page 7: Supervised Learning
Uses labeled data to train the model.
Outputs predictions based on learned mapping.
Ideal for classification problems (image recognition, spam detection).
Page 8: Interactive Training
Tools like Teachable Machine for practical model training.
Page 9: Unsupervised Learning
Operates on unlabeled data to discover patterns.
Analyzes data for clustering and anomaly detection.
Suitable for market segmentation and fraud detection.
Page 10: K-Means Algorithm
Steps in K-means clustering:
Initialize centroid positions.
Assign labels to data points.
Update centroid positions.
Repeat until convergence.
Page 11: Reinforcement Learning
Agents learn through interactions and receive rewards/penalties.
Focuses on maximizing reward in complex environments (e.g., autonomous vehicles).
Page 12: AI Learning
Example use case in a gaming scenario (Trackmania) over days.
Page 13: Deep Learning (DL)
Utilizes neural networks with multiple layers.
Effective for large unstructured data and complex problems (e.g., navigation).
Page 14: Distinction Between ML and DL
Structured vs. unstructured data processing.
Manual feature definition vs. automated learning.
Development of Large Language Models (LLMs) via deep learning.
Page 15: Using AI at MIUN
Discussion on the integration of AI in educational practices.
Page 16: Considerations
Importance of 'when' and 'how' to use Generative AI.
Considerations:
Limitations and opportunities in academic settings.
Issues of privacy, security, and ethics.
AI concept recognition among students and its impact on academic integrity.
MIUN resources for students regarding academic integrity and AI use.
Encouragement of responsible AI use while maintaining academic integrity.
Practices include brainstorming, feedback, and tutoring.
Hands-on approach to learning with AI.
Emphasis on transparency and discussing outcomes.
Risks of direct copy-pasting without engagement.
Importance of critical interaction and proper prompting.
Page 22: Generative AI Introduction
Contrast between Generative AI and traditional AI.
Generative AI creates content mimicking human output.
Page 23: Functionality of Generative AI
Trained on vast datasets to generate responses based on prompts.
Page 24: AI vs. Generative AI
Traditional AI focuses on tasks like classification, while Generative AI synthesizes new data.
Page 25: History of Large Language Models
Significant developments:
2020: OpenAI GPT-3
2017: Google Brain
Other notable milestones.
Page 26: Pre-Training of Models
Learning patterns before fine-tuning for specific applications.
Techniques:
Next Token Prediction
Masked Language Modeling
Page 27: Fine-Tuning Process
Involves Reinforcement Learning with Human Feedback (RLHF).
Incorporates human ratings to understand and improve model performance.
Page 28: LLM's Mission
Prioritization of user satisfaction over accuracy.
Risks of anthropomorphism and confirmation bias.
Page 29: Capabilities of LLMs
Functions such as text generation, translation, data analysis, and creative assistance.
Page 30: Limitations of LLMs
Recognized limitations include lack of comprehension and ethical concerns.
Page 31: Observation Data
Analysis of academic articles using OpenAlex concerning specific keywords.
Page 32: Model vs. Application
Distinction between LLMs as core technology and AI applications.
Page 33: Introduction to Prompt Engineering
Importance of skill in guiding AI outcomes through effective prompt design.
Page 34: Prompt Engineering Attributes
Initially relevant to software developers but valuable to all users.
Page 35: Definition
Process of designing prompts for AI to achieve desired responses.
Page 36: Importance of Prompt Design
Specific and clear prompts lead to more insightful AI outputs.
Page 37: Benefits of Good Prompt Design
Consistency, accuracy, efficiency resulting from structured prompts.
Page 38: Programmatic Applications
API automation for repeated utilization of prompts with varying outputs.
Page 39: Key Principles of Prompting
Emphasis on clarity, specificity, precision, and iterative improvements.
Page 40: Clarity and Specificity
Defining expectations for AI outputs, specifying required details, and framing prompts positively.
Page 41: Example Prompt
Requesting character identification from a provided text context.
Page 42: Structure of Prompts
Using delimiters to separate tasks, context, and constraints within the input.
Page 43: Desired Precision
Control the length and depth of responses based on task requirements.
Page 44: Clarifying Tasks
Instructions for summarizing text and specifying length limitations.
Page 45: Structured Output Requests
Examples of formats for AI outputs and guidelines for when conditions are unmet.
Page 46: Example Sentiment Analysis
Tasking AI to classify sentiments of social media comments.
Page 47: Example Result
Sample output categorizing sentiment from social media comments.
Page 48: Few-shot Prompting
Providing examples to guide AI style and structure.
Page 49: Example Creative Prompt
Generating a catchphrase for a product with given constraints and context.
Page 50: Iterative Improvement
Importance of revising prompts based on initial outputs for optimal results.
Page 51: Example Professional Email
Tasking AI to craft a structured professional email with constraints.
Page 52: Advanced Techniques
Techniques for guiding AI reasoning and maintaining consistent responses.
Page 53: Prompting for Improvement
Generating creative ideas for user engagement in social media contexts.
Options available for further engagement with AI models.
Links to guides and platforms for effective prompt engineering and AI usage.
Instructions for analyzing sentiment and translations of social media comments.
Tasks involving summarizing, proofreading, and translating emails for clarity.
Extracting key information from passages for deeper understanding.
Measuring understanding and confidence in using LLMs post-lecture.