AI Practitioner Exam - Overarching

  

AI Practitioner Exam Prep

Overarching



Overall AI Abbreviations
AI = Artificial Intelligence
ML = Machine Learning
DL = Deep Learning
GenAI = Generative AI

Mathematical Subsets/Layers of AI
Five Concentric Circles of:
AI = broad field (includes rule engines) where computers mimic human behavior or reasoning.
  ML = computer learns from data without programming
    Neural Nets = technical family of learned models
      DL = models that generate content inspired by human brain
        Gen AI = large, pretrained, multi-purpose base model

AI
   AI = broad field (includes rule engines) where computers mimic human behavior or reasoning.

ML
   ML or Traditional ML = computer learns from data without programming. each model can perform only one task. To succeed, the model must be carefully trained on the data.
   ML model = makes predictions or decisionsdata is used to create ML model by using algorithm that tokenizes or vectorizes the data into vectors in the vector space.
   
   Learning Types: 
       A) Reinforcement Learning ML = AI tries task and gets score and labeling some data with feedback of rewards or penalties. good for when good/bad outcome is known, but path is not known. AI must try a bunch to learn. ex: race car game.

       B) Supervised Learning ML trained on labeled data for new, unseen data. ex: data = labeled by maker and model of car pictures, then AI given new image and it must id the car maker and model. types are classification and regression. Example algorithms are linear learner, factorization machines, XGBoost, and KNN. Classification metrics are accuracy, precision, recall, F1, and AUC-ROCRegression metrics are mean squared error and R squared.
          Types:
          a) Classification Supervised ML = data divided into is labeled with known class or category.  ex: data = car pictures labeled by maker and model.
          b) Regression Supervised ML = for continuous numbers where past numbers matter to future answer. ex1: weather forecasting with data is historical and AI must calc future weather. ex2: home pricing with historical data and AI must predict future price for home.

       C) Unsupervised Learning ML starts with unlabeled data looking for patterns within the data. types are anomaly detection, clustering, dimensionality reduction, embeddings, and topic modeling.  Example algorithms are K-Means, LDA, Object2Vec, Random Cut Forest, IP Insights, and PCA.
          Types:
          a) Clustering Unsupervised ML assigns data to a particular group with other similar, unlabeled data
          b) Dimensional Reduction or Dimensionality Unsupervised ML = Removes irrelevant dimensions/features from the vector data to try to shrink the data and its complexity while retaining the most important dimensions.

   Hybrid Learning Types: 
       A) Semi Supervised ML = unlabeled data, except for a few labeled.
       B) Self Supervised ML = unlabeled data. self trains using supervised learning algorithms.
       C) Multi-Instance ML = unlabeled individual data, but labeled group data.

   Statical Inference Types: 
       A) Inductive ML = using evidence to determine outcome. Builds a general model to predict future, unseen data.
       B) Deductive ML = using general rules to specific outcomes
       C) Transductive ML = predicts specific labels for fixed set of unlabeled data by using both labeled training data and distribution of the unlabeled test data. Optimizes for performance of specific dataset.

  ML Process: Training Data (labeled or not; structured or not) => ML algorithm => Model 
  ML Creation Steps: 1) Get data, 2) ML (supervised, unsupervised, reinforced), 3)  Inferencing (batch or real-time)
  ML Model Evaluation: with training set, validation set, and test set. 
  Feature engineering transforms data into features or inputs that will be valuable for the model. 

DL
   Deep Learning = uses neural networks. Good for vision and audio. Inspired by human brain.

GenAI
   GenAI = runs on pre-trained FMs that can run multiple tasks.

Deep Learning
Deep Learning uses neural networks. Good for vision and audio. Inspired by human brain.


Challenges to GenAI and ML
   Challenges are a) bias and b) variance (sensitivity to noise or overfitting). This leads to bias-variance tradeoffs. Types of bias-variance tradeoffs are underfitted, overfitted, and balanced.  Balanced is ideal with low variance and low bias.  To overcome bias and variance errors, you should a) cross-validate, b) increase data, c) regularization, d) simpler models, e) dimensional regulation, f) stop training early so no memorization.


Gen AI
  Capabilities/Attributes: a) adaptable, b) creative or explore, c) data efficiency, d) personalize, e) responsive, f) scalable, g) simplify

  Challenges: a) regulatory violations, b) social risks, c) privacy concerns, d) toxicity, e) hallucination (not consistent with training data), f) incorrect conclusions, g) nondeterminism, h) intellectual property, i) plagiarism and cheating, and j) work disruption.

  Selection Factors: a) tasks and use cases for different 3rd party FMs, b) performance, c) capabilities, d) constraints, e) compliance.

  Business Metrics: a) user satisfaction, b) avg. revenue per user, c) conversion rate, d) cross-domain performance, e) efficiency, f) cost savings, g) time savings, h) quality improvement, i) productivity gains.

  Approaches: a) process automation, b) augmented decision making, c) personalization and stabilization, d) creative content generation, e) exploratory analysis.

  Prompt: composed of instructions, context, input data, and output indicator.
    Parameters for randomness and diversity influence the variation in generated responses by limiting the outputs. These parameters are: temperature, top P, top K.
    Strategies are ARTCoT, few-shot, RAG, ReAct, self-consistencyToT, and zero-shot.
    Templates increase efficiency, consistency, and scalability. Good if must do in future.

  FMs:
    FM Creation Steps: 0) decide use case (parts are: name, actors, preconditions, basic flow, alternative flow, postconditions, business rules, assumptions, requirements, notes), 1) get data (unlabeled) or select FM, 2) pretrain with SSL (if not a FM), 3) optional improve data (further pre-train on non-FM data) or prompt engineering, 4) optional optimize (see below), 5) optional evaluation with metrics or benchmarks, 6) deploy, 7) use to create answer.  
    FM Types: aLLMs (such as diffusion models and multimodal models) b) GANsc) VAEs
    FM Optimization Approaches: a) prompt engineering, bRAG, cfine tuning by instructions, d) or fine tuning by RLHF.


Abbreviations in AI
ART = Automatic Reasoning and Tool-use
ATLAS = Adversarial Threat Landscape for AI Systems
BERT score metric = Bidirectional Encoder Representations from Transformers
BLEU metric Bilingual Evaluation Understudy metric
CNN = Convolutional Neural Networks
CoT = Chain-Of-Thought prompting
GANs = Generative Adversarial Networks
GLUE benchmark = General Language Understanding Evaluation benchmark
GPT = Generative Pre-trained Transformers
FM = Foundational Models
IDP = Intelligent Data Processing
LLM = Large Language Models
NL or NLP = Natural Language Processing
NTM = Neural Topic Modeling algorithm 
PDP = Partial dependence plots
PRA = Privacy Reference Architecture
RAG = Retrieval-Augmented Generation 
RL = Reinforcement Learning 
RLHF = Reinforcement Learning from Human Feedback
ROUGE metric = Recall-Oriented Understudy for Gisting Evaluation metric
SLM = Small Language Model
SQuAD benchmark Stanford Question Answering Dataset benchmark
SSL = Self-Supervised Learning
ToT = Tree of thoughts prompting
VAEs = Variational Auto Encoders
WMT benchmarkWorkshop on Machine Translation benchmark

AI Term Definitions
Amplified Decision Making = helps humans in decisions in stressful times
Augmentation of Dataset = create more data for underrepresented. Purpose: fixes bias.
Batch Size = Number of training samples processed in one forward or backward pass before updating the model parameters.  Small batches give faster iterations and generalization, while large batches improve stability and GPU efficiency.
Batch Inferencing = start with lots of data and time.  Focus on all data. For slow decisions with historical understanding.  good for data analysis reports.
BERT score metric = Scores semantic similarity (using cosine) between two sentences. Good for analyzing text generation tasks or filling in missing words.
BLEU metric = score for how well the AI translation did against human translation samples.
CNN = deep learning method to process images into grids using neutral network by using filters (3 x 3 block of pixels) that deal with pattern recognition. filters increasingly become of larger parts of the picture and more abstract.  good for computer vision tasks, including image classification, OCR, object detection, and medical imaging. 
CoT prompts = user prompts for answers to steps from AI.
Curating a Dataset = labeling the dataset
Data efficiency = could start with little data and create a lot of data
Diffusion models = in LLM. types: forward and reverse diffusion
"Embeddings" = are numbers for tokenswhere semantically similar tokens have similar vectors.
"Embedding"/"Transformation"/"Vectorization" process = the algorithm that creates the math vector.
Emergent = at large scales, these models develop skills that are not explicitly programmed into them.
Epochs = Neural networks. One epoch = every training sample was processed by model once. 
Exposure in prompt = PII or privacy issues in the output
"Feature" in ML = dataset property or characteristic used as ML models input to make predictions. Almost the same as "dimension". ex = square feet, actual price, asking price, etc.
Few-shot prompts = user prompts for something that AI is given a little context.
"Fine tuning" = improve pre-trained language model using labeled data (ex: industry-specific data). Most important task for fine tuning is labeling with accurate and relevant labels. Types are instruction tuning, RHLF, adapting models for specific domains, transfer learning, and continuous pretraining. 
Forward Diffusion Model = hiding by adding noise till unrecognizable. Why? A: Maybe showing transform frame by frame. Similar to encryption.
FMs = large data model that is pre-trained, lots of possible types of data, and general purposeadapted to do multiple tasks.
GANs = generator and discriminator compete against each other in zero-sum game. creates synthetic data.
"Generalization" = model's ability to apply knowledge from training on new unseen data. 
Generative Pre-trained Transformers = start with NLP text and can go to SQL or other.
Hijacking a Prompt = Enter AI prompt that gives bad suggestions then publish about AI's responses.
Hyperparameters = are human-defined settings that make an AI model tick.
IDP = extracts and classifies unstructured data in docs. gives summaries and actionable insights.
Image Processing = processes computer vision (image or video) and time series (video frames, satellite photos, etc.). Areas are image classification, object detection, and semantic segmentation.
Inference = process of when model analyzes new data to decide the new output.
"Jailbreaking" a Prompt = Enter AI prompt that gives criminal or evil suggestions.
"Labeling" = id and tag data with meaningful labels of the contents of each data piece 
"Learning Rate" = compares multiple trials to see improvement rate.
LLM = large language models are a subset of FM. ex: Claude, Chat GPT, etc.
Logistic regression = Algorithm to classify. Estimates probability that input is in category.
"Masking" of Input = intentionally hiding parts of the input, forces models to understand context
"Model" in AI = a trained software program or algorithm designed to recognize patterns, categorize, make predictions, or generate outputs by analyzing data. Created by humans and computers. Humans select data to show it, tell the purpose, send in rule parameters, tag some of the labeled data, and validate the output. Computers take the untrained algorithm to find patterns in the data, creates the learning parameters/weights, and self optimize in ML.
Multi-Modal = uses multiple data types such as text, images, audio, video, and computer code.
Multi-Modal Embedding = uses multiple data types embedding them into a shared space. search focus.
Multi-Modal Generation = uses multiple types to create new content.
Neural networks = like brain. takes input then runs through hidden layer and outputs the answer.
Parameters = are the learned (by computer refining) settings that make an AI model tick.
PDP = visualize the plot of one thing like age affects a second thing like income. good for transparency.
Perplexity metric = metric for language models, but not for text summaries.
"Point" in AI = exact coordinates on array with a number for each of the dimensions.
Prompt Engineering = improving the prompt with strategies such as ARTCoT, few-shot, RAG, ReAct, self-consistencyToT, zero-shot.
Prompt Leaking = having the prompt ask about the model's instructions
RAG = looks up a few relevant docs to get answerParts are retrieval system and generative AI.  ex1: chatbots that look up company data. ex2: AI agents using CRM employee data to arrive at answer. ex3: legal analysis. ex4: health care answers.
Real-Time Inferencing = given real-time interactive data (such as self-driving cars or missile defense systems). Focus on recent data that arrived. For fast decisions to new conditions. Older data just for background.
Residual Neural Network = uses images and tries to "skip connections" method instead of CNN.
Reverse Diffusion Model = revealing. remove noise until clear image. Similar to decryption.
ROUGE metric = evaluates text summarization systems.
R-Squared score = calcs the variance proportion in the dependent variable explained by the model. 1 is perfect prediction, 0 is worst, rest is between.
SLM = Rare. Used for edge devices.
SSL = What is it? A1: models learn from raw data by predicting masked(hidden) parts of sentence or imageA2: makes use of the structure within the raw data to autogenerate labels.
Support Vector Machine = classifies tasks on tabular data. good for high dimensions on limited or small datasets.
Temperature of AI Output = randomness or creativity of the AI output. High temp = more random or creative.
Text Analysis = processes text and speech.  Areas are text classification, Word2Vec, machine translation, and topic modeling. Example algorithms are BlazingText, Sequence to Sequence, LDA,  and NTM. 
TF-IDF = statistical measurement of importance of a word within a document. Lessens filler words like "the" or "an".
"Token" in AI = chopped up individual pieces.  ex: words in a sentence. 
Top K of AI Output = limits output to top K of probability words.
Top P of AI Output = limits output to top percentage of probability words.
Training in ML = iterative teaching a ML model to find patterns, make decisions, or generate content.
Transfer Learning = takes existing pre-trained model on supervised task and then fine tunes.
Zero-shot prompts = user prompts for something that the AI does not know is coming.


Cost Considerations
  Cost factors are responsiveness and availability, redundancy and regional coverage, performance, token-based pricing, provisioned throughput, and refining your custom models.

Responsible AI
  Aspects: fairness, explainability, privacy\security (theft and exposure risk), veracity\robustness (operates well despite uncertainty), governance (max society benefit with min risk), interpretability\transparency, safety, and controllability.
  Business Benefits: trust, regulatory complain, mitigate risks, competitive advantage, improved decision making, and improved products. 
  Model Selection: a) Narrow the use case so you can tune your model to your use case. Ex: favor recall or precision, b) pick by performance with some test data sets, c) responsible agency, d) environmental reasons, e) economical reasons.
  Dataset Prep: want balanced dataset so inclusive and diverse in data collection, curating by 1) preprocessing, 2) augmentation, and 3) regular auditing.
  Model Tradeoffs: a) interpretability vs. performance (wrong - see Lonestar), b) safety vs. transparency (wrong - see open source), c) control over the model.
  Human Centered Design: amplified decision making, unbiased decision making, RLHF.

Benchmarking Datasets
  Way 1: Humans evaluation is done by 1) human SMEs create questions. 2) context identified, 3) answer created. 
   Way 2: LLMs as judges approach grades looking at answers compared to benchmarking datasets. 

Security and Compliance in AI
  AWS supports 143 security standards and compliance certifications, such as GDPR, HIPPA, ISO, PCI DSS, etc.
   Security scopes: Consumer app, Enterprise app, Pre-trained models, Fine-tuned models, and self-trained models.

OWASP Top 10 AI Security risks
  Prompt injection: Malicious user inputs that can manipulate the behavior of a language model
  Insecure output handling: Fail to properly sanitize or validate model outputs.
  Training data poisoning: Introducing bad data into a model's training set, so bad behaviors.
  Model denial of service: Exploits vulnerabilities in a model's architecture to disrupt its availability
  Supply chain vulnerabilities: Weaknesses in the software, hardware, or services to build a model.
  Sensitive info disclosure: Leak sensitive data through model outputs or other unintended channels
  Insecure plugin design: Flaws in the optional model components that can be exploited
  Excessive agency: Grants a model too much autonomy or capability.
  Overreliance: Over-dependence on a model's capabilities.
  Model theft: Unauthorized access or copying of a model's parameters or architecture.

  Overall the risks are fake content, prompt injection, and AI model weaknesses.
  Overall to secure data, you should control user access to the data and ensure data integrity.

Data Governance 
  Strategies: data quality and integrity, data protection and security, data lifecycle mgmt., responsible AI, governance structures and roles, and data sharing and collection.
  Approaches: policies, review cadence, review strategies, transparency, and team training standards.

Misc
   In multi-step tasks, AI agents are important in task coordination such as task sequence. 
   Storing vector databases (such as custom ML models) is good foOpenSearch Service since is a fully managed service that supports vector data types, for storing and querying embeddings efficiently.
   Model pruning is reducing model size and complexity.

Comments

Popular posts from this blog

GHL Email Campaigns

Whitelabel Options

Await