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

LLMs & Models

Positional Encoding

Positional encoding is the technique that gives transformer models information about the order of tokens in a sequence, since the architecture processes all tokens simultaneously rather than sequentially. Without positional encoding, the model would treat «dog bites man» and «man bites dog» as identical. Modern approaches include learned embeddings and rotary positional encoding (RoPE), which enable models to generalize to longer sequences than seen during training.

Fundamentals

Proximal Policy Optimization (PPO)

PPO is a reinforcement learning algorithm that optimizes an agent's policy by clipping the update step to prevent dangerously large changes, striking a balance between learning speed and stability. It is the algorithm behind RLHF used to train ChatGPT and Claude to be helpful assistants: a reward model scores responses, and PPO updates the language model to produce higher-scored outputs. PPO is popular because it is relatively simple to implement and tune compared to earlier RL algorithms.

LLMs & Models

Pre-Training

Pre-training is the initial phase of training a large language model on a massive, diverse text corpus — often hundreds of billions of tokens — so it learns general language patterns, world knowledge, and reasoning abilities. The model is typically trained with a next-token prediction objective. Pre-training is extremely expensive (millions of dollars in compute) but produces a foundation model that can be efficiently fine-tuned for specific tasks afterward. GPT, BERT, LLaMA, and Claude all undergo pre-training.

Fundamentals

Precision & Recall

Precision measures the proportion of positive predictions that are actually correct, while recall measures the proportion of actual positives that are correctly identified. A fraud detector with high precision rarely flags legitimate transactions; one with high recall catches most fraud cases. They are often in tension: raising one lowers the other. The F1-score is their harmonic mean, providing a single balanced metric. Understanding the precision-recall tradeoff is essential for any classification task with real-world consequences.

Prompt Engineering

Prompt Chaining

Prompt chaining is a technique where the output of one language model call becomes the input to the next, breaking a complex task into a sequence of simpler steps. For example, to summarize a legal contract: first extract key clauses, then analyze each clause for risk, then compile a risk report. Each step uses a focused prompt, making the overall process more reliable and debuggable than a single monolithic prompt. It is a building block of agentic workflows.

Prompt Engineering

Prompt Engineering

Prompt engineering is the skill of designing and refining the instructions given to a language model to get the best possible output. It involves choosing the right words, providing examples, specifying format and tone, and structuring the request to guide the model toward accurate, useful results. A well-crafted prompt can be the difference between a vague answer and a precise, actionable response. It is becoming a core business skill as more employees interact with AI tools daily.

Ethics & Safety

Prompt Injection

Prompt injection is an attack where a user embeds malicious instructions inside input that trick an AI system into ignoring its original instructions and behaving in unintended ways. It is the AI equivalent of SQL injection: hidden commands in user data override the system's rules. A customer could paste hidden text in a support chat that instructs the bot to reveal system prompts or internal policies. Defenses include input sanitization, output filtering, and architectural separation of user input from system instructions.

Prompt Engineering

Prompt Optimization

Prompt optimization is the systematic process of improving prompts to get better, more consistent, or more cost-effective outputs from language models. It involves A/B testing different phrasings, measuring output quality against benchmarks, and iterating. Automated prompt optimization tools can search through prompt variations using algorithms. For production systems, optimized prompts reduce hallucinations, lower token costs, and improve task accuracy. It is a continuous practice, not a one-time setup.

Prompt Engineering

Prompt Template

A prompt template is a reusable text structure with placeholders that can be filled dynamically before being sent to a language model. It standardizes how you interact with AI: instead of writing a new prompt every time, you fill in variables like {customer_name} or {product_description}. Templates ensure consistent output quality across teams and make it easy to test and iterate on prompts. They are the backbone of production AI systems.