5 exercises — the vocabulary every developer working with AI needs in English: RAG architecture, hallucination, AI agents, model quantisation, and prompting techniques.
An ML engineer explains their system: "Instead of searching the entire document database for every query, we first convert documents to vectors using an embedding model and store them in a vector database. At query time, we embed the question and retrieve the k nearest neighbours — semantically similar documents — then pass them as context to the LLM." What architecture is described here?
RAG (Retrieval-Augmented Generation) is an architecture for giving LLMs access to external knowledge without retraining. The retrieval step finds relevant documents; the generation step uses them as context in the prompt. Key RAG vocabulary: Embedding — a dense vector representation of text that captures semantic meaning; similar texts produce vectors that are close in high-dimensional space. Vector database — a database optimised for storing and querying vectors by similarity (Pinecone, Weaviate, Chroma, pgvector). Semantic search — search by meaning rather than keyword matching. k-NN (k-Nearest Neighbours) — retrieve the k most similar vectors to the query. Chunking — splitting documents into smaller pieces before embedding, to fit context window limits. Context window — the maximum number of tokens an LLM can process in a single call. Grounding — connecting LLM output to specific, verifiable source documents. RAG vs fine-tuning: RAG is preferred when the knowledge changes frequently; fine-tuning is preferred when you need to change the model's behaviour or style.
2 / 30
A product manager reads a model evaluation report: "The model hallucinated in 3% of responses — confidently stating facts that were not present in the source documents and could not be verified." What does hallucination mean in the context of LLMs?
Hallucination in LLMs is when the model generates content that is factually incorrect, fabricated, or not grounded in any real source — often with high confidence and plausible language. LLMs don't "know" facts the way a database does; they predict statistically likely next tokens. When the training data has conflicting or sparse information about a topic, the model may confabulate rather than say "I don't know." Why hallucinations happen: LLMs optimise for fluency and coherence, not factual accuracy. They generalise from patterns. They have no mechanism to verify real-world facts. Categories: Factual hallucination — wrong facts stated confidently (e.g., citing a paper that doesn't exist). Instruction hallucination — failing to follow constraints while claiming to. Context hallucination — contradicting information provided in the prompt. Mitigation strategies: RAG (grounding in source documents), self-consistency checks, output verification pipelines, Constitutional AI, RLHF. In conversation: "Never use this model for medical or legal information without a human-in-the-loop review — hallucination rates are too high for high-stakes outputs."
3 / 30
An AI engineer writes in their architecture doc: "The agent uses a ReAct loop — it reasons about the task, selects a tool, observes the result, and repeats until it reaches a final answer or hits the max iteration limit." What is an AI agent in this context?
An AI agent is an LLM-powered system that can autonomously plan, use tools, and iterate across multiple steps to complete a goal. Unlike a single prompt → response interaction, an agent operates in a loop. ReAct (Reason + Act) is a prompting strategy where the model alternates between reasoning about the next action and executing it, using the observation as input to the next reasoning step. Agent vocabulary: Tool use — the model calls external functions (web search, code execution, database query, API calls). Function calling / tool calling — structured way to invoke external tools from within the model. Planning — decomposing a task into sub-steps. Memory — short-term (context window) vs long-term (vector DB, external store). Orchestration — managing multiple agents or steps (frameworks: LangChain, LlamaIndex, AutoGen, CrewAI). Max iterations — safety limit to prevent infinite loops. System prompt — instructions that define the agent's persona, capabilities, and constraints. In conversation: "We moved from a single-shot prompt to an agent because the task required searching the web, running code, and synthesising results from multiple sources."
4 / 30
A team discusses model deployment cost: "The 70B model gives better results but inference is too expensive at scale. We're exploring quantisation — going from FP16 to INT4 — to run it on a single GPU." What does quantisation mean?
Quantisation is the process of representing model weights using fewer bits — reducing memory and computational requirements at some accuracy trade-off. Precision levels: FP32 — 32-bit floating point (training standard). FP16 / BF16 — 16-bit (common for inference). INT8 — 8-bit integer (~4× smaller than FP32). INT4 — 4-bit (aggressive, but surprisingly good quality with methods like GPTQ, AWQ). Common quantisation tools: GPTQ — post-training quantisation for transformers. AWQ (Activation-aware Weight Quantisation) — preserves accuracy better at INT4. llama.cpp / GGUF format — enables running quantised models on CPU/Mac. bitsandbytes — 8-bit/4-bit quantisation library for PyTorch. Why it matters: a 70B model in FP16 requires ~140 GB VRAM; in INT4 it requires ~35 GB — fitting on a single high-end GPU. Related terms: VRAM — GPU memory. Batch size — number of inputs processed in parallel. Throughput — tokens generated per second. Latency — time to first token. In conversation: "We quantised the model to 4-bit and got 15% accuracy degradation on our benchmark — acceptable for our use case but not for medical applications."
5 / 30
A developer describes their prompting approach: "I use chain-of-thought prompting — I add 'think step by step' to complex reasoning tasks. The model's performance on multi-step problems improved significantly compared to direct-answer prompts." What is chain-of-thought (CoT) prompting?
Chain-of-Thought (CoT) prompting is a technique where you instruct the LLM to reason through a problem step by step before giving a final answer. This dramatically improves performance on arithmetic, logical reasoning, and multi-step tasks. The phrase "Let's think step by step" (Kojima et al., 2022) is the canonical zero-shot CoT trigger. Prompting techniques vocabulary: Zero-shot prompting — asking the model without any examples. Few-shot prompting — providing 2–5 examples in the prompt. Zero-shot CoT — "think step by step" without examples. Few-shot CoT — examples that include reasoning steps. Self-consistency — generate multiple CoT solutions and take the majority answer. Tree of Thoughts (ToT) — explore multiple reasoning paths and evaluate them. System prompt — instructions at the start of the context that shape the model's behaviour. Temperature — controls randomness: 0 = deterministic, 1+ = creative/varied. Top-p / nucleus sampling — alternative randomness control. Why CoT works: it forces the model to "use" intermediate computations in its context window rather than jumping directly to an answer, reducing errors in complex reasoning.
6 / 30
Reviewer: "This LLM call is incredibly slow. The prompt complexity is high, and the model's response time is exceeding 5 seconds. Consider reducing the token limit or optimizing the query for efficiency."
This scenario focuses on practical optimization. The reviewer isn't advocating for fundamentally changing the model itself, but rather reducing the load it's receiving – a common concern when scaling LLM usage. Reducing token limits and simplifying prompts are standard strategies to improve response times.
7 / 30
"Sarah (Data Science):" Hey team, I'm seeing a lot of 'prompt injection' attempts in our chatbot logs. Users are trying to trick the model into revealing internal data or bypassing safety filters. We need to strengthen our input validation and potentially add more robust content filtering."
'Prompt Injection' is a critical security concern with LLMs. It specifically refers to malicious attempts to manipulate the model's output by crafting prompts that circumvent designed safeguards and instructions. This often involves tricking the model into performing unintended actions or revealing sensitive information – a common attack vector.
8 / 30
PR Description: "Implemented Retrieval-Augmented Generation (RAG) to improve factual accuracy. Instead of relying solely on the LLM's internal knowledge, we now fetch relevant documents from our vector database based on the user query and feed them into the prompt. This significantly reduces hallucinations."
RAG (Retrieval-Augmented Generation) is a key technique in modern LLM deployments. It addresses the issue of hallucinations by providing the model with external context – retrieved documents - to ground its responses in verifiable information, improving accuracy.
9 / 30
"David (ML Engineer):" I've been experimenting with LoRA (Low-Rank Adaptation) to fine-tune the model for our specific domain. It requires significantly less GPU memory and training time compared to full fine-tuning."
LoRA is a popular and efficient fine-tuning method. It drastically reduces the number of trainable parameters, leading to lower computational costs and faster training times without sacrificing significant model performance. This makes it ideal for adapting LLMs to specific tasks or datasets.
10 / 30
API Response (from a vector database query): "{"results": [{"document_id": "doc-789", "similarity_score": 0.92}, {"document_id": "doc-123", "similarity_score": 0.85}], "query": "What are the key challenges in deploying LLMs at scale?"}"
This illustrates how vector databases are used. The response highlights the similarity scores, showcasing documents closely related to the query's meaning. This demonstrates the core functionality of a semantic search system – retrieving information based on its relevance rather than keyword matching.
11 / 30
Reviewer: "This LLM call is incredibly slow. The prompt complexity is high, and the model's response time is exceeding 5 seconds. Consider reducing the token limit or optimizing the query for efficiency."
This scenario focuses on practical optimization. The reviewer isn't advocating for fundamentally changing the model itself, but rather reducing the load it's receiving – a common concern when scaling LLM usage. Reducing token limits and simplifying prompts are standard strategies to improve response times.
12 / 30
"Sarah (Data Science):" Hey team, I'm seeing a lot of 'prompt injection' attempts in our chatbot logs. Users are trying to trick the model into revealing internal data or bypassing safety filters. We need to strengthen our input validation and potentially add more robust content filtering."
'Prompt Injection' is a critical security concern with LLMs. It specifically refers to malicious attempts to manipulate the model's output by crafting prompts that circumvent designed safeguards and instructions. This often involves tricking the model into performing unintended actions or revealing sensitive information – a common attack vector.
13 / 30
PR Description: "Implemented Retrieval-Augmented Generation (RAG) to improve factual accuracy. Instead of relying solely on the LLM's internal knowledge, we now fetch relevant documents from our vector database based on the user query and feed them into the prompt. This significantly reduces hallucinations."
RAG (Retrieval-Augmented Generation) is a key technique in modern LLM deployments. It addresses the issue of hallucinations by providing the model with external context – retrieved documents - to ground its responses in verifiable information, improving accuracy.
14 / 30
"David (ML Engineer):" I've been experimenting with LoRA (Low-Rank Adaptation) to fine-tune the model for our specific domain. It requires significantly less GPU memory and training time compared to full fine-tuning."
LoRA is a popular and efficient fine-tuning method. It drastically reduces the number of trainable parameters, leading to lower computational costs and faster training times without sacrificing significant model performance. This makes it ideal for adapting LLMs to specific tasks or datasets.
15 / 30
API Response (from a vector database query): "{"results": [{"document_id": "doc-789", "similarity_score": 0.92}, {"document_id": "doc-123", "similarity_score": 0.85}], "query": "What are the key challenges in deploying LLMs at scale?"}"
This illustrates how vector databases are used. The response highlights the similarity scores, showcasing documents closely related to the query's meaning. This demonstrates the core functionality of a semantic search system – retrieving information based on its relevance rather than keyword matching.
16 / 30
Reviewer: "This LLM call is incredibly slow. The prompt complexity is high, and the model's response time is exceeding 5 seconds. Consider reducing the token limit or optimizing the query for efficiency."
This scenario focuses on practical optimization. The reviewer isn't advocating for fundamentally changing the model itself, but rather reducing the load it's receiving – a common concern when scaling LLM usage. Reducing token limits and simplifying prompts are standard strategies to improve response times.
17 / 30
"Sarah (Data Science):" Hey team, I'm seeing a lot of 'prompt injection' attempts in our chatbot logs. Users are trying to trick the model into revealing internal data or bypassing safety filters. We need to strengthen our input validation and potentially add more robust content filtering."
'Prompt Injection' is a critical security concern with LLMs. It specifically refers to malicious attempts to manipulate the model's output by crafting prompts that circumvent designed safeguards and instructions. This often involves tricking the model into performing unintended actions or revealing sensitive information – a common attack vector.
18 / 30
PR Description: "Implemented Retrieval-Augmented Generation (RAG) to improve factual accuracy. Instead of relying solely on the LLM's internal knowledge, we now fetch relevant documents from our vector database based on the user query and feed them into the prompt. This significantly reduces hallucinations."
RAG (Retrieval-Augmented Generation) is a key technique in modern LLM deployments. It addresses the issue of hallucinations by providing the model with external context – retrieved documents - to ground its responses in verifiable information, improving accuracy.
19 / 30
"David (ML Engineer):" I've been experimenting with LoRA (Low-Rank Adaptation) to fine-tune the model for our specific domain. It requires significantly less GPU memory and training time compared to full fine-tuning."
LoRA is a popular and efficient fine-tuning method. It drastically reduces the number of trainable parameters, leading to lower computational costs and faster training times without sacrificing significant model performance. This makes it ideal for adapting LLMs to specific tasks or datasets.
20 / 30
API Response (from a vector database query): "{"results": [{"document_id": "doc-789", "similarity_score": 0.92}, {"document_id": "doc-123", "similarity_score": 0.85}], "query": "What are the key challenges in deploying LLMs at scale?"}"
This illustrates how vector databases are used. The response highlights the similarity scores, showcasing documents closely related to the query's meaning. This demonstrates the core functionality of a semantic search system – retrieving information based on its relevance rather than keyword matching.
21 / 30
Reviewer: "This LLM call is incredibly slow. The prompt complexity is high, and the model's response time is exceeding 5 seconds. Consider reducing the token limit or optimizing the query for efficiency."
This scenario focuses on practical optimization. The reviewer isn't advocating for fundamentally changing the model itself, but rather reducing the load it's receiving – a common concern when scaling LLM usage. Reducing token limits and simplifying prompts are standard strategies to improve response times.
22 / 30
"Sarah (Data Science):" Hey team, I'm seeing a lot of 'prompt injection' attempts in our chatbot logs. Users are trying to trick the model into revealing internal data or bypassing safety filters. We need to strengthen our input validation and potentially add more robust content filtering."
'Prompt Injection' is a critical security concern with LLMs. It specifically refers to malicious attempts to manipulate the model's output by crafting prompts that circumvent designed safeguards and instructions. This often involves tricking the model into performing unintended actions or revealing sensitive information – a common attack vector.
23 / 30
PR Description: "Implemented Retrieval-Augmented Generation (RAG) to improve factual accuracy. Instead of relying solely on the LLM's internal knowledge, we now fetch relevant documents from our vector database based on the user query and feed them into the prompt. This significantly reduces hallucinations."
RAG (Retrieval-Augmented Generation) is a key technique in modern LLM deployments. It addresses the issue of hallucinations by providing the model with external context – retrieved documents - to ground its responses in verifiable information, improving accuracy.
24 / 30
"David (ML Engineer):" I've been experimenting with LoRA (Low-Rank Adaptation) to fine-tune the model for our specific domain. It requires significantly less GPU memory and training time compared to full fine-tuning."
LoRA is a popular and efficient fine-tuning method. It drastically reduces the number of trainable parameters, leading to lower computational costs and faster training times without sacrificing significant model performance. This makes it ideal for adapting LLMs to specific tasks or datasets.
25 / 30
API Response (from a vector database query): "{"results": [{"document_id": "doc-789", "similarity_score": 0.92}, {"document_id": "doc-123", "similarity_score": 0.85}], "query": "What are the key challenges in deploying LLMs at scale?"}"
This illustrates how vector databases are used. The response highlights the similarity scores, showcasing documents closely related to the query's meaning. This demonstrates the core functionality of a semantic search system – retrieving information based on its relevance rather than keyword matching.
26 / 30
Reviewer: "This LLM call is incredibly slow. The prompt complexity is high, and the model's response time is exceeding 5 seconds. Consider reducing the token limit or optimizing the query for efficiency."
This scenario focuses on practical optimization. The reviewer isn't advocating for fundamentally changing the model itself, but rather reducing the load it's receiving – a common concern when scaling LLM usage. Reducing token limits and simplifying prompts are standard strategies to improve response times.
27 / 30
"Sarah (Data Science):" Hey team, I'm seeing a lot of 'prompt injection' attempts in our chatbot logs. Users are trying to trick the model into revealing internal data or bypassing safety filters. We need to strengthen our input validation and potentially add more robust content filtering."
'Prompt Injection' is a critical security concern with LLMs. It specifically refers to malicious attempts to manipulate the model's output by crafting prompts that circumvent designed safeguards and instructions. This often involves tricking the model into performing unintended actions or revealing sensitive information – a common attack vector.
28 / 30
PR Description: "Implemented Retrieval-Augmented Generation (RAG) to improve factual accuracy. Instead of relying solely on the LLM's internal knowledge, we now fetch relevant documents from our vector database based on the user query and feed them into the prompt. This significantly reduces hallucinations."
RAG (Retrieval-Augmented Generation) is a key technique in modern LLM deployments. It addresses the issue of hallucinations by providing the model with external context – retrieved documents - to ground its responses in verifiable information, improving accuracy.
29 / 30
"David (ML Engineer):" I've been experimenting with LoRA (Low-Rank Adaptation) to fine-tune the model for our specific domain. It requires significantly less GPU memory and training time compared to full fine-tuning."
LoRA is a popular and efficient fine-tuning method. It drastically reduces the number of trainable parameters, leading to lower computational costs and faster training times without sacrificing significant model performance. This makes it ideal for adapting LLMs to specific tasks or datasets.
30 / 30
API Response (from a vector database query): "{"results": [{"document_id": "doc-789", "similarity_score": 0.92}, {"document_id": "doc-123", "similarity_score": 0.85}], "query": "What are the key challenges in deploying LLMs at scale?"}"
This illustrates how vector databases are used. The response highlights the similarity scores, showcasing documents closely related to the query's meaning. This demonstrates the core functionality of a semantic search system – retrieving information based on its relevance rather than keyword matching.
What does the "AI & LLM Vocabulary" vocabulary exercise cover?
This exercise tests real IT vocabulary related to ai & llm vocabulary through 30 multiple-choice questions, each built from realistic workplace sentences rather than abstract definitions.
Is this vocabulary exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is completely free — no account, sign-up, or payment required.
How many questions does this exercise have?
This exercise has 30 questions. Each one shows a real-world sentence or scenario with multiple-choice options and an explanation once you answer.
What happens after I answer a question?
You'll see immediate feedback showing whether your answer was correct, along with a short explanation of why — then a button to move to the next question, and a full results screen at the end.
Can I retry the exercise if I get questions wrong?
Yes. Once you reach the results screen, click "Try again" to reset your answers and go through the exercise from the start as many times as you like.
Do I need to create an account to take this exercise?
No account is needed. Your answers are scored in your browser during the session — nothing is saved to a server, so you can jump straight in.
Is my progress saved if I leave the page?
No — progress within an exercise resets if you navigate away or reload. Each exercise is short enough to complete in a few minutes in one sitting.
Are these vocabulary exercises connected to other topics?
Yes — this module shares real-world context with 1 other vocabulary module. See "Related vocabulary" below to keep building a connected skill set.
How is this different from reading a glossary or blog article?
Exercises like this one are active recall drills — you have to choose the correct term or phrasing yourself, which builds retention faster than passively reading a definition.
Where can I find more vocabulary exercises?
Browse the full Vocabulary exercises hub for hundreds of modules covering Agile, DevOps, security, databases, architecture, and more — organised by IT role and skill.