The 212AY Library

AI
Glossary.

200+ artificial intelligence terms explained in plain language — from machine learning and LLMs to AI agents, RAG and prompt engineering. Every definition comes with a concrete example, in English, French and Arabic.

200 terms

Prompt Engineering

Chain of Thought (CoT)

Chain of thought is a prompting technique that encourages a language model to show its reasoning step by step before giving a final answer, dramatically improving accuracy on math, logic, and complex reasoning tasks. Instead of asking a direct question, you ask the model to «think step by step», making errors easier to spot. CoT is especially valuable for business tasks like financial analysis and multi-step planning.

NLP

Chatbot

A chatbot is a software application that simulates conversation with users, typically through text, by generating responses using natural language processing and sometimes large language models. Early chatbots followed rigid scripts; modern ones powered by LLMs can handle open-ended questions, remember context within a session, and invoke external tools. Businesses use chatbots for 24/7 customer support, lead qualification, and internal helpdesks, though human handoff remains essential for complex or sensitive issues.

Tools & Platforms

ChatGPT

ChatGPT is a conversational AI application built on OpenAI's GPT models, launched in November 2022. It allows users to interact with a large language model through natural language dialogue, answering questions, writing content, coding, and analyzing images. ChatGPT popularized AI assistants globally and demonstrated the commercial potential of large language models to businesses and consumers alike.

Fundamentals

Classification

Classification is a supervised learning task where the model assigns each input to one of several predefined categories: spam or not spam, positive or negative review, approved or denied loan. The model learns the mapping from labeled examples during training. Binary classification has two classes; multi-class classification has more. A Moroccan bank might classify transactions as fraudulent or legitimate, while an e-commerce site classifies customer support tickets by urgency.

Data Science

Clustering

Clustering is an unsupervised learning technique that groups similar data points together without predefined labels, revealing natural structures in the data. K-means and DBSCAN are popular algorithms. A retailer in Casablanca might cluster customers by purchasing behavior to create targeted marketing segments; a city planner might cluster traffic accident locations to identify danger zones. The challenge is choosing the right number of clusters and interpreting what each group represents.

Applications

Code Generation

Code generation uses AI models to automatically produce source code from natural language descriptions or existing code. Tools like GitHub Copilot and Cursor suggest or write entire functions based on context, accelerating development. A developer in Casablanca can describe a database query in plain English and receive working Python code in seconds. Code generation still requires human review for correctness, security, and maintainability.

Computer Vision

Computer Vision

Computer vision is the field of AI that enables machines to interpret and understand visual information from the world — images, videos, and live camera feeds. Tasks include object detection, facial recognition, image segmentation, and optical character recognition. A factory in Tangier uses computer vision to inspect products on the assembly line, catching defects invisible to the human eye; a Moroccan insurer uses it to assess vehicle damage from photos submitted via WhatsApp.

LLMs & Models

Context Window

The context window is the maximum number of tokens a language model can process in a single request, including both input and output. GPT-4 Turbo supports 128,000 tokens; Claude 3 supports up to 200,000. A larger context window lets the model analyze longer documents and maintain more conversation history. However, longer contexts increase cost and can reduce attention to important details in the middle of input.

Deep Learning

Contrastive Learning

Contrastive learning is a self-supervised approach where the model learns by comparing similar and dissimilar data pairs, pulling similar representations closer in embedding space while pushing dissimilar ones apart. Models like CLIP use it to match images with text without explicit labels. It has driven breakthroughs in visual representation learning, enabling powerful zero-shot image classifiers.