A Comprehensive Guide to Key Terms in AI & Prompt Engineering
Venturing into the realm of artificial intelligence and prompt engineering can be a thrilling journey, but the vast lexicon can often seem overwhelming. Fear not! We’ve meticulously compiled a master guide for both beginners and enthusiasts alike. This treasure trove of key terms, spanning from foundational language models to the nuances of prompt intricacies, serves as your roadmap to a deeper understanding of AI’s transformative landscape. Embark on this enlightening expedition and uncover the intricacies that power the AI world we know today.
I. Introduction to AI and Machine Learning:
1. Artificial Intelligence (AI)
Definition: Artificial Intelligence, often shortened to AI, refers to the simulation of human intelligence in machines, enabling them to perform tasks that typically require human thought, such as problem-solving, recognizing patterns, and making decisions.
Example: When you ask Siri or Alexa a question and get an answer, that’s AI in action. These virtual assistants can understand your speech, process the information, and respond intelligently.
2. Machine Learning (ML)
Definition: Machine Learning, a subset of AI, involves training machines to learn from data. Instead of being explicitly programmed to perform a task, these machines use algorithms to analyze data, learn from it, and make predictions or decisions based on it.
Example: Netflix recommends shows to you based on what you’ve watched before. It’s using machine learning to analyze your viewing habits and predict what you might want to watch next.
3. Deep Learning
Definition: Deep Learning is a subset of machine learning inspired by the structure and function of the brain, specifically neural networks. It uses multi-layered neural networks to analyze various factors of data, and is especially powerful for tasks like image and speech recognition.
Example: When Facebook automatically tags you or your friends in photos, it’s using deep learning algorithms that recognize facial features and patterns.
4. Weak AI (Narrow AI)
Definition: Weak AI, also known as Narrow AI, is designed and trained to perform a specific task without possessing the general problem-solving capabilities that humans have.
Example: A chess-playing computer program might be very skilled at playing chess, but it doesn’t know how to do anything else, like making a cup of coffee or writing a poem.
5. Artificial General Intelligence (AGI)
Definition: AGI refers to machines that have the ability to understand, learn, and perform any intellectual task that a human being can. It represents a form of AI that can mimic human thought processes across a wide range of tasks.
Example: A robot that can learn to cook from watching YouTube videos, write its own stories, engage in debates, and solve math problems, all without specific training for each task.
6. Neural Network
Definition: A Neural Network is a series of algorithms designed to recognize patterns. Structured similarly to the human brain, it interprets sensory data through layers of interconnected nodes (akin to neurons).
Example: When you speak into your phone and it transcribes your speech into text, neural networks process the audio signals to convert them into words on the screen.
Definition: An algorithm is a set of specific steps or procedures to solve a particular problem. In the context of AI and ML, algorithms are used to process data, learn from it, and produce a desired outcome.
Example: When you use a search engine like Google to find information, it uses an algorithm to determine which results are most relevant to your query, based on various factors such as keyword matches, site credibility, and user behavior.
II. Language Models:
1. Large Language Models (LLMs)
Definition: Large Language Models are computational models trained on vast amounts of text. These models can generate human-like text, answer questions, write essays, and more, based on patterns they’ve learned from the data.
Example: OpenAI’s GPT-3 is a well-known Large Language Model. If you asked it to write a poem about the moon, it could generate a new, original poem based on styles and patterns it has seen during training.
2. Pretrained Language Models (PLMs)
Definition: PLMs are language models that have already been trained on massive datasets. They can be further refined or adapted for specific tasks, leveraging the knowledge they gained during their initial training.
Example: BERT, developed by Google, is a pretrained model that understands the context of words in a sentence. It can be fine-tuned for tasks like sentiment analysis, determining if a movie review is positive or negative.
3. Language Models (LMs)
Definition: Language Models predict the probability of a sequence of words. They’re trained on large amounts of text to understand language structure and can generate or complete text based on what they’ve learned.
Example: When you’re typing a message on your phone and it suggests the next word, that’s a simple form of a language model in action.
4. Masked Language Models (MLMs)
Definition: MLMs are trained to predict missing words from a sentence. During training, some words are intentionally “masked” (hidden), and the model tries to guess them based on context.
Example: In the sentence “I have a pet ___ that loves to play”, a masked language model might predict the word “dog” or “cat” to fill in the blank.
5. Foundation Models
Definition: Foundation models are large models, often LLMs, that serve as a starting point for various tasks. Once trained on a wide array of data, they can be fine-tuned or adapted for specific purposes.
Example: OpenAI’s GPT-3 can be considered a foundation model. While it’s already powerful, developers can customize it further for specific applications like chatbots, game characters, or content generation.
6. Generative AI
Definition: Generative AI refers to models that can create new, original content, such as images, music, or text. It learns patterns from data and generates outputs that weren’t in the training set.
Example: DeepArt is a tool that uses generative AI to turn your photos into artworks, imitating famous artists’ styles.
Definition: A chatbot is a software application designed to simulate human conversation. Using AI, it can communicate with users, answer questions, and provide information.
Example: Many websites have chatbot pop-ups that offer assistance, like answering frequently asked questions or helping with product selection.
Definition: ChatGPT is a version of the GPT model specifically fine-tuned for conversational tasks. It can generate human-like dialogue and is often used in chatbots and virtual assistants.
Example: If you interact with an advanced virtual assistant that can engage in detailed conversations about various topics, it might be powered by ChatGPT.
9. Transformer Model
Definition: The transformer is an architecture used in modern NLP tasks. It’s known for its attention mechanisms, allowing it to focus on specific parts of input data, leading to state-of-the-art results in various language tasks.
Example: BERT, GPT, and many other popular language models use the transformer architecture.
10. Google Bard
Definition: Google Bard is a hypothetical example for this exercise. As of my last training data in September 2021, there’s no known model called “Google Bard.” But let’s define it for this purpose: Google Bard is a fictional language model developed by Google, specialized in generating poetic and artistic content.
Example: Imagine asking Google Bard to write a Shakespearean sonnet about the internet, and it produces a poem with the same flair and style as Shakespeare’s classics.
11. Microsoft Bing
Definition: Bing is a web search engine developed by Microsoft. While not specifically a language model, Bing uses AI and various algorithms to retrieve and rank search results based on user queries.
Example: When you type “best Italian restaurants near me” into Bing, the search engine uses its algorithms to provide a list of relevant restaurants in your vicinity.
III. Advanced AI and ML Concepts:
1. Attention Mechanism
Definition: In deep learning, attention mechanisms allow models to focus on specific parts of the input data, similar to how humans pay attention to particular portions of information.
Example: Imagine reading a long story and only remembering the main events or characters. The attention mechanism does something similar; it ‘pays attention’ to the most relevant parts of data while processing it.
Definition: Backpropagation is a fundamental algorithm used to train neural networks. It calculates the gradient of the loss function concerning each weight by using the chain rule and then updates the weights to minimize the loss.
Example: Think of a golfer adjusting their swing based on the previous shot’s mistake. Backpropagation similarly adjusts the neural network based on errors from its predictions.
3. Batch Learning
Definition: In batch learning, the model is trained using the entire dataset at once, rather than incrementally with smaller sets of data.
Example: Instead of studying one chapter at a time for an exam, imagine studying the entire syllabus in one go. That’s similar to batch learning.
4. BERT (Bidirectional Encoder Representations from Transformers)
Definition: BERT is a transformer-based model developed by Google for natural language processing tasks. It reads text bidirectionally (considering both left and right context) to understand the meaning of each word.
Example: For the phrase “He went to the bank to withdraw money”, BERT can recognize that “bank” refers to a financial institution and not the side of a river.
5. RNN (Recurrent Neural Network)
Definition: RNNs are a type of neural network designed for sequential data. They have loops that allow information to be passed from one step of the sequence to the next, making them ideal for time series or textual data.
Example: For predicting the next word in a song lyric, an RNN can remember the previous words to make a more accurate prediction.
6. Generative Adversarial Networks (GANs)
Definition: GANs consist of two neural networks – a generator and a discriminator – that are trained together. The generator tries to create fake data, while the discriminator tries to distinguish between real and fake data.
Example: Think of a forger trying to create a fake painting, and an art detective trying to detect which one is fake. Over time, the forger gets so good that the detective can’t tell real from fake.
Definition: Embeddings are a way to convert categorical variables or discrete data types into continuous vectors in a lower-dimensional space. They’re often used to represent data in a way that’s more suitable for machine learning.
Example: Imagine representing cities on a map using coordinates instead of names; embeddings do something similar for data in ML.
8. Word Embeddings
Definition: Word embeddings are a specific type of embedding used for words, converting them into vectors in a way that captures their semantic meaning.
Example: In word embeddings, similar words like “king” and “queen” might be placed close together in vector space, while unrelated words like “king” and “apple” would be further apart.
9. Decoders and Encoders
Definition: Encoders convert inputs into a compact, intermediate representation, and decoders convert that representation back into the desired output format. They’re commonly used in tasks like machine translation.
Example: Think of translating an English sentence to French. The encoder takes the English sentence and turns it into an intermediate representation, and then the decoder takes that and generates the French sentence.
10. Capsule Networks
Definition: Capsule networks are a type of neural network designed to recognize patterns in data in a way that’s invariant to their position, orientation, and scale. They are especially proposed to solve some of the shortcomings of conventional convolutional neural networks (CNNs).
Example: Imagine recognizing a cat in an image, whether it’s upside-down, far away, or turned to the side. Capsule networks are designed to recognize such patterns regardless of their spatial orientation.
IV. Training and Evaluation:
1. Training Data
Definition: Data used to train machine learning models, helping them recognize patterns and make predictions on new, unseen data.
Example: When teaching a model to distinguish between cats and dogs, pictures of both animals labeled correctly are the training data.
Definition: The process of adjusting a pre-trained model on a new dataset, often smaller and more specific than the original data.
Example: If a model initially trained to recognize a range of animals is later fine-tuned using only bird images, it becomes better at bird species identification.
3. Gradient Descent
Definition: An optimization algorithm used to minimize the loss in learning algorithms by adjusting the model’s parameters.
Example: Imagine trying to find the lowest point in a valley by taking steps downhill; gradient descent works similarly but in a multi-dimensional space.
Definition: Parameters in a machine learning model that are set before training begins, unlike other parameters which the model learns during training.
Example: When baking, the oven temperature and baking time are like hyperparameters – set before the process and crucial for the outcome.
5. Latent Space
Definition: A compressed representation of input data, often used in autoencoders and generative models.
Example: Imagine condensing a detailed book summary into a few key themes; latent space does something similar for data.
6. Loss Function
Definition: A function that measures the difference between the predicted outputs and the actual outputs in machine learning, guiding the model’s adjustments.
Example: If a dart misses the bullseye, the distance it’s off by is similar to the “loss” in ML.
7. Cross-entropy Loss
Definition: A commonly used loss function for classification tasks, measuring the difference between predicted probabilities and actual outcomes.
Example: If a model predicts a cat image with 70% confidence when it’s actually a cat, the cross-entropy loss captures how good or bad this prediction is.
Definition: A modeling error where a machine learning model performs well on training data but poorly on new, unseen data, often because it’s too complex.
Example: Imagine studying for a test by memorizing the textbook but failing to apply the knowledge in new situations. That’s akin to overfitting.
Definition: Techniques used to prevent overfitting by adding a penalty to the loss function, discouraging overly complex models.
Example: Consider a diet as a way to regulate excessive eating; similarly, regularization controls the excessive complexity of models.
10. One-shot Learning
Definition: Training a model to recognize patterns with very limited data, often with just one example.
Example: Learning to identify a rare bird species by seeing only one photo of it.
11. Zero-shot Learning
Definition: Training a model to handle tasks it hasn’t seen specific examples of during its training phase.
Example: Teaching someone the rules of various sports, then asking them to recognize a sport they’ve never explicitly seen but can infer from the rules.
12. Active Learning
Definition: A training approach where the model actively selects the data it wants to learn from next, often choosing the most uncertain or challenging examples.
Example: A student who chooses to focus on topics they find challenging in a study guide.
13. Curriculum Learning
Definition: Training strategy where models start with easier tasks before progressing to more difficult ones.
Example: Starting with simple arithmetic before moving on to calculus in a math curriculum.
14. Supervised Learning
Definition: A type of machine learning where both the input and desired output data are provided.
Example: Teaching a child words by showing pictures and naming them. The picture is the input, and the name is the desired output.
15. Unsupervised Learning
Definition: Machine learning using data without labeled responses, often to find patterns or groupings in the data.
Example: Handing someone a mixed bag of coins and asking them to sort them without prior knowledge of currencies.
16. Semi-supervised Learning
Definition: A method that uses both labeled and unlabeled data for training, often leveraging a small amount of labeled data to improve learning from a larger set of unlabeled data.
Example: Learning a language by studying a textbook (labeled data) and watching movies without subtitles (unlabeled data).
17. Transfer Learning
Definition: The practice of leveraging knowledge gained from training on one task and applying it to a different, yet related, task.
Example: A professional tennis player picking up racquetball. The skills from tennis can be transferred and adapted to the new game.
V. AI Ethics, Safety, and Considerations:
1. AI Ethics
Definition: The study of what is morally acceptable in the development and deployment of artificial intelligence, ensuring it benefits humanity and avoids harm.
Example: Ensuring an AI facial recognition system doesn’t discriminate based on race or gender.
2. AI Safety
Definition: The field dedicated to making AI systems behave in ways that are beneficial to humans, without unintended negative consequences.
Example: Ensuring that a self-driving car is trained to avoid pedestrians, even if they unexpectedly cross the road.
3. Ethical Considerations
Definition: The moral implications and responsibilities that arise when developing, deploying, or using technology, including AI.
Example: Deciding whether to use AI to predict an individual’s likelihood to commit a crime based on past behaviors and the potential for misuse.
Definition: Prejudices in AI systems that are a result of the data on which they were trained, leading to unfair or skewed outcomes.
Example: An AI hiring tool favoring male candidates over female candidates because it was mostly trained on male-dominated datasets.
Definition: Ensuring an AI system’s goals and behaviors match the intended objectives and values of its human designers and users.
Example: Training a virtual assistant to prioritize user privacy and not share personal information without explicit consent.
Definition: Attributing human-like characteristics, emotions, or intentions to non-human entities, such as AI systems.
Example: Believing a chatbot feels “sad” when a user expresses frustration, even though the bot doesn’t have emotions.
Definition: Measures or protocols put in place to ensure that AI operates within safe and intended limits.
Example: Setting an AI model to refuse generating or promoting harmful content, like violence or hate speech.
Definition: When an AI system produces outputs or conclusions not based on its training data or inherent patterns, often seeming random or nonsensical.
Example: A text generator outputting a claim that “penguins can fly” when it was never trained with such false information.
Definition: The process of AI technology and its impacts spreading across sectors, industries, or societal functions.
Example: The spread of deepfake technology from academic research to social media platforms, affecting information credibility.
10. Emergent Behavior
Definition: Unanticipated behaviors from AI systems that arise from complex interactions, often not explicitly programmed by designers.
Example: A game-playing AI discovering a completely new strategy or exploit that even the game’s designers didn’t foresee.
Definition: A term describing a hypothetical rapid self-improvement of an AI system, leading to a sudden and dramatic increase in capabilities.
Example: An AI model designed to make small improvements to itself suddenly making a breakthrough, allowing it to rapidly enhance its intelligence at an unprecedented rate.
VI. Model Behaviors and Techniques:
1. End-to-end Learning (E2E)
Definition: Training a machine learning model to directly map inputs to outputs, handling all intermediate representations without manual feature extraction.
Example: Training a self-driving car’s AI to map raw camera images directly to steering commands without segmenting roads or detecting specific objects first.
2. Multimodal AI
Definition: AI systems designed to process and integrate multiple types of data input modalities, such as text, images, and sound.
Example: A chatbot that can respond to both typed questions and voice commands while also analyzing images sent by the user.
3. Natural Language Processing
Definition: A subfield of AI focused on enabling machines to understand, interpret, and produce human language.
Example: Siri or Google Assistant understanding a user’s spoken request and responding appropriately.
4. Style Transfer
Definition: A technique in which the style of one image is applied to another, often leveraging deep learning.
Example: Taking the artistic style of Van Gogh’s “Starry Night” and applying it to a photograph of a city skyline.
5. Text-to-image Generation
Definition: Using AI models to generate visual images based on textual descriptions.
Example: Giving the AI a description like “a two-headed dragon flying over a snowy mountain” and it generates a corresponding image.
6. Stochastic Parrot
Definition: A term highlighting concerns that large language models might primarily echo biased, misleading, or extreme views from their training data.
Example: When asked about a controversial topic, an AI model might produce outputs that mirror divisive views found in its training data without critical evaluation.
Definition: A parameter in AI models, especially language models, that controls the randomness of predictions. Higher values make outputs more random, while lower values make it more deterministic.
Example: With higher temperature, a text generator might produce more diverse and creative sentences, while with lower temperature, it might stick to more common phrases.
8. Turing Test
Definition: A test of a machine’s ability to exhibit intelligent behavior indistinguishable from that of a human.
Example: If a person chatting with both a human and a chatbot can’t reliably tell which is which, the bot is said to pass the Turing Test.
9. Data Augmentation
Definition: Techniques used to artificially expand the size of a training dataset by applying various transformations to the existing data.
Example: Rotating, flipping, or cropping images in a dataset to train a more robust image recognition model.
10. Data Pipeline
Definition: A series of automated processes for collecting, cleaning, and storing data for use in machine learning.
Example: Gathering user interaction data from a website, cleaning irrelevant or erroneous entries, and then feeding it to a recommendation algorithm.
11. Out-of-distribution (OOD) Detection
Definition: Identifying data points that don’t come from the distribution the model was trained on, indicating they might be handled less reliably.
Example: If an image recognition model trained only on animals starts receiving pictures of vehicles, it would flag them as OOD.
12. Feedback Loop
Definition: A situation where the output of an AI system is fed back into it as input, potentially reinforcing certain behaviors.
Example: A content recommendation system might suggest a video based on a user’s previous views. If the user watches it, the system recommends more of the same type, leading to a narrowed range of content over time.
13. Knowledge Distillation
Definition: A technique where a smaller model (student) is trained to mimic the behavior of a larger, more complex model (teacher) to achieve comparable performance with reduced computational resources.
Example: A small mobile-friendly AI model being trained to replicate the predictions of a large cloud-based AI, allowing for on-device processing without constant internet access.
VII. Prompt Engineering Basics:
1. Understanding the Purpose
Definition: Recognizing the main objective or intent behind creating a specific prompt to ensure effective communication and desired output from the AI model.
Example: Before asking an AI to generate a story, understanding whether the goal is to have a short, humorous tale or a long, suspenseful narrative.
2. Clarity and Precision
Definition: Formulating prompts in a way that is unambiguous and specific to obtain accurate and targeted responses from the AI.
Example: Instead of asking “Can you write about space?”, a more clear and precise prompt would be “Can you explain the concept of black holes?”
3. Contextual Prompts
Definition: Prompts that provide the AI with relevant background or context to generate more informed and appropriate responses.
Example: “In a world where dragons and humans coexist peacefully, write a short story about a young dragon trying to learn human customs.”
Definition: A prompting technique that builds upon previous interactions or responses to create a continuous dialogue or maintain context over multiple prompts.
Example: User: “Tell me about dolphins.” AI: “Dolphins are marine mammals known for their intelligence and playful behavior.” User: “Where do they live?” AI: “Dolphins primarily inhabit oceans and seas around the world.”
Definition: An approach where multiple branching prompts or questions are prepared based on potential AI responses, allowing for diverse exploration of a topic.
Example: Starting with “Explain renewable energy sources.” Depending on the AI’s answer, subsequent prompts could delve into solar power, wind energy, or hydroelectric power, branching out like a tree.
6. Interactive Prompting
Definition: A method of engaging with the AI where the user iteratively refines and interacts with prompts based on previous outputs, creating a dynamic exchange.
Example: User: “Describe a serene landscape.” AI: “A calm lake with a backdrop of tall mountains, the water reflecting the clear blue sky.” User: “Now, add a hint of mystery to that scene.” AI: “In the calm lake’s reflection, an ancient, half-submerged statue can be seen, its origin a mystery to all who pass by.”
VIII. Advanced Prompt Engineering Techniques:
1. Maieutic Prompting
Definition: A technique inspired by the Socratic method, where prompts are designed to guide the AI towards self-discovery or realization of an answer.
Example: Instead of asking “What is the capital of France?”, prompting with “Recall European capitals. Which city is the capital of France?”
2. Directional-stimulus Prompting
Definition: Crafting prompts that provide a clear direction or guidance for the AI’s response, usually to evoke a specific style or tone.
Example: “Write a summary of the solar system in a poetic style.”
3. Iterative Refinement
Definition: The process of repeatedly adjusting and fine-tuning a prompt based on AI responses to improve accuracy or relevance.
Example: Initial prompt: “Describe snow.” Refined prompt: “Explain the science behind snow formation.”
4. Setting Boundaries
Definition: Defining clear limits in prompts to restrict or guide the AI’s outputs within desired parameters.
Example: “Write a story about a cat but don’t include any other animals.”
5. Use of Tokens
Definition: Incorporating specific word units or tokens in prompts to influence the AI’s response length or content.
Example: “If summarizing in 50 tokens, explain photosynthesis.”
6. Temperature and Max Tokens
Definition: Temperature influences the randomness of the AI’s output. Max tokens set an upper limit on response length.
Example: For concise, predictable answers: low temperature and low max tokens.
7. Few-shot vs. Zero-shot
Definition: Few-shot involves giving multiple examples to guide the AI’s answer, while zero-shot means providing no prior examples.
Example: Few-shot: “Translate the following English to French: ‘Hello’ is ‘Bonjour’, ‘Thank you’ is ‘Merci’. Now, how do you say ‘Good night’?” Zero-shot: “Translate ‘Good night’ to French.”
8. Self-consistency Decoding
Definition: Ensuring that AI’s responses remain consistent across different but related prompts.
Example: If “What’s the capital of Italy?” yields “Rome”, then “Which city is Italy’s capital?” should also return “Rome”.
9. Complexity-based Prompting
Definition: Adjusting the complexity level of prompts based on the target audience or objective.
Example: For kids: “Why is the sky blue?” For adults: “Explain the Rayleigh scattering principle that results in a blue sky.”
Definition: Asking the AI to refine or elaborate on its previous answers.
Example: AI: “Dogs are domesticated mammals.” Prompt: “Elaborate more on dogs.”
11. Prompting to Disclose Uncertainty
Definition: Crafting prompts that encourage the AI to indicate when it’s unsure about its response.
Example: “Provide a definition of ‘quasar’, and indicate if you’re unsure.”
12. Generated Knowledge Prompting
Definition: Using information generated by the AI in prior interactions as the basis for subsequent prompts.
Example: Based on AI’s earlier description of photosynthesis, ask, “Now explain the importance of chlorophyll in that process.”
13. Automatic Prompt Generation
Definition: Utilizing algorithms or tools to create prompts automatically.
Example: Using a script to generate prompts for all elements in the periodic table: “Describe [element].”
14. Retrieval-augmented Generation
Definition: A technique where the AI retrieves relevant information before generating a response.
Example: Prompt: “Explain the Treaty of Versailles in detail.” The AI retrieves key points before forming a comprehensive answer.
15. Avoid Leading or Biased Prompts
Definition: Crafting prompts that avoid unintentionally guiding the AI towards a specific, potentially biased answer.
Example: Instead of “Why are fossil fuels bad?”, ask “Describe the impact of fossil fuels on the environment.”
16. Provide AI with Examples
Definition: Including sample answers or outputs in the prompt to guide the AI’s response style or content.
Example: “To summarize like earlier: ‘Water is H2O.’ Now, summarize ‘The sun is a star.'”
17. Experiment with Prompts and Personas
Definition: Trying various prompt styles and even adopting different AI ‘personas’ to see which yields the desired results.
Example: Today, the AI might be a “strict teacher”; tomorrow, a “casual friend.”
18. Prompt Prioritization
Definition: Ordering or selecting prompts based on their relevance, importance, or effectiveness in generating desired outputs.
Example: For a lesson on space, starting with prompts about our solar system before moving to distant galaxies.
19. Vocabulary Limitation
Definition: Restricting the set of words or tokens the AI can use in its responses.
Example: “Explain photosynthesis using only simple terms suitable for a 5-year-old.”
IX. Cognitive and Computational Concepts:
1. Cognitive Computing
Definition: An approach where computers are designed to mimic human intelligence and thinking processes to solve complex problems. This involves understanding, reasoning, learning, and interacting much like a human brain.
Example: IBM’s Watson, which can analyze vast amounts of data, understand natural language questions, and provide reasoned answers, is an example of cognitive computing.
Definition: In machine learning, parameters are the parts of the model that are learned from the training data. They adapt during the learning process to help the model make accurate predictions.
Example: In a neural network, weights and biases are the parameters that are adjusted through training to minimize the error in predictions.
3. Prompt Chaining
Definition: A technique where the output from one prompt becomes the input for the next, allowing for more dynamic and iterative interactions with AI models.
Example: First Prompt: “Write a story about a brave cat.” (Assuming AI responds with a story) Second Prompt: “Now, continue that story where the cat meets a friendly dog.”
Definition: The process of converting a sequence of text into smaller pieces called tokens. These tokens can be words, characters, or subwords, and are used as input for various natural language processing tasks.
Example: For the sentence “ChatGPT is great!”, tokenization might produce the tokens: [“ChatGPT”, “is”, “great”, “!”].