QUIZ
Prompt Engineering — MCQ Quiz
25 Basic + 25 Medium Level Questions (Covering Units I–V)
SECTION A: BASIC LEVEL (Q1–Q25)
Unit I — Foundations of Prompt Engineering
- What is prompt engineering primarily concerned with? a) Training a model from scratch b) Designing effective inputs to guide model outputs c) Compiling source code d) Building neural network architectures
- Prompt engineering differs from fine-tuning mainly because it: a) Requires retraining the model's weights b) Works without modifying the model's parameters c) Needs a labeled dataset d) Is only used for image models
- Which of the following is a core principle of effective prompt design? a) Ambiguity b) Clarity and specificity c) Randomness d) Long, unstructured text
- The "anatomy of a prompt" typically includes which component? a) Instruction b) Context c) Output format d) All of the above
- What is the first step in the iterative prompting lifecycle? a) Deploying the model b) Drafting an initial prompt c) Fine-tuning the model d) Discarding the prompt
Unit II — Advanced Prompt Patterns & Techniques
- Few-shot prompting refers to: a) Giving the model zero examples b) Providing a few example input-output pairs before the actual task c) Training the model on thousands of examples d) Removing all instructions from the prompt
- Role-based prompting is used to: a) Delete the model's memory b) Establish a persona or specific behavior for the model c) Reduce token usage d) Increase model temperature
- Negative prompting is best described as: a) Giving purely positive feedback b) Instructing the model to avoid certain content c) Asking multiple questions at once d) Disabling the model
- Constraint specification in prompting refers to: a) Removing all rules from the prompt b) Defining limits like word count or format c) Increasing the model's parameters d) Ignoring formatting instructions
- Zero-shot prompting means: a) The model is given several examples b) The model performs a task with no prior examples in the prompt c) The model is retrained for each task d) The prompt has zero words
Unit III — Structured Output & Reasoning Techniques
- Which format is commonly requested for structured data output? a) JSON b) YAML c) Markdown tables d) All of the above
- Chain-of-thought (CoT) prompting encourages the model to: a) Skip reasoning steps b) Explain its reasoning before giving a final answer c) Provide only the final answer d) Ignore the question
- Task decomposition in prompting involves: a) Merging all sub-tasks into one prompt b) Breaking a complex task into smaller manageable sub-tasks c) Removing the task entirely d) Avoiding structured responses
- A common way to verify JSON output validity is to: a) Ignore syntax errors b) Use a parser to validate the structure c) Manually guess correctness d) Avoid using JSON altogether
- Why are structured outputs important for real-world applications? a) They make outputs harder to use b) They allow easy integration with downstream systems c) They increase ambiguity d) They are only for aesthetics
Unit IV — Retrieval-Augmented Generation & LangChain Workflows
- RAG stands for: a) Random Access Generation b) Retrieval-Augmented Generation c) Rapid Application Gateway d) Reasoning and Grammar
- Why is RAG needed? a) LLMs have unlimited internal knowledge b) LLMs have limitations in internal/up-to-date knowledge c) To slow down response time unnecessarily d) To remove the need for embeddings
- What is the purpose of text splitting in a RAG indexing pipeline? a) To delete documents b) To break documents into manageable chunks for embedding c) To translate documents d) To compress the LLM
- Embeddings in a vector store are used to: a) Store raw text only b) Represent text as numerical vectors for similarity search c) Encrypt the documents d) Replace the LLM entirely
- LCEL stands for: a) LangChain Expression Language b) Large Context Evaluation Layer c) Linear Chain Execution Logic d) Language Contextual Embedding List
Unit V — Agents, Multimodal AI & Ethical Evaluation
- An LLM agent is distinguished by its ability to: a) Only generate plain text b) Invoke tools/functions to complete tasks c) Avoid using any external tools d) Work without any prompt
- VLMs refer to: a) Vision-Language Models b) Virtual Learning Machines c) Verified Language Modules d) Variable Length Memory
- "LLM-as-Judge" is a technique used for: a) Training new LLMs b) Automated evaluation of model outputs c) Generating images only d) Deleting poor prompts
- Prompt injection is best described as: a) A method to speed up inference b) A security risk where malicious input manipulates model behavior c) A type of embedding d) A formatting technique
- Which of these is an ethical concern in LLM applications? a) Bias in outputs b) Misinformation c) Data privacy d) All of the above
SECTION B: MEDIUM LEVEL (Q26–Q50)
Unit I — Foundations of Prompt Engineering
- A student writes: "Write a bio of Ada Lovelace" versus "As a historian, write a 100-word bio of Ada Lovelace focusing on her contribution to computing, in formal tone." The second prompt demonstrates: a) Prompt degradation b) Enhanced prompting via role framing, specificity, and format instructions c) Model fine-tuning d) Negative prompting
- If a prompt produces an ambiguous or contradictory output, the most likely underlying issue is: a) The model's temperature is too low b) Missing context or unclear instructions in the prompt c) The API key is invalid d) The output format is JSON
- During iterative refinement of a summarization prompt, adding "in two sentences, focusing on setting and theme" primarily improves: a) Model training speed b) Content specificity and adherence to constraints c) API latency d) Token encoding
- Which scenario best illustrates a "common prompt pitfall"? a) A prompt with clear role, context, and format b) A vague prompt like "Tell me about it" with no defined subject c) A prompt with explicit word-count limits d) A prompt using few-shot examples
- Comparing a naive prompt to an enhanced prompt for the same task, evaluators should primarily judge outputs on: a) Length only b) Relevance, completeness, and style c) Font size d) API response time only
Unit II — Advanced Prompt Patterns & Techniques
- A prompt says: "You are a financial advisor. Do not mention any brand names." This combines: a) Zero-shot and CoT prompting b) Role-based prompting and negative prompting c) RAG and embeddings d) JSON generation and YAML parsing
- In a few-shot sentiment classification task, providing 2–3 exemplar pairs mainly helps the model: a) Reduce API cost b) Better align outputs with the desired pattern and accuracy c) Avoid using any context d) Ignore the given examples
- When a summarization prompt fails to meet a word limit, the recommended refinement is to: a) Abandon the task b) Add explicit constraints such as word count or bullet format c) Remove all instructions d) Switch to zero-shot only
- Comparing zero-shot and few-shot outputs for the same classification task, a key evaluation criterion is: a) Consistency and adherence to the example pattern b) Number of API calls only c) Length of the model name d) Random variation only
- If a role-based prompt does not sufficiently suppress unwanted content, the next logical step is to: a) Delete the entire prompt b) Add explicit negative prompting instructions c) Increase the number of unrelated exemplars d) Switch the output format to audio
Unit III — Structured Output & Reasoning Techniques
- A prompt asks for "three benefits of exercise in a Markdown table with columns Benefit and Description." If the output isn't a table, the best fix is to: a) Accept the output as-is b) Re-specify the format explicitly and restate column names c) Switch to JSON without changes d) Remove structure entirely
- When generating JSON for a dataset and the parser throws an error, the appropriate action is to: a) Ignore the parser b) Refine the prompt to resolve syntax issues and re-validate c) Convert to a scanned image d) Disable JSON formatting permanently
- Zero-shot CoT prompting ("Let's think step by step") is most useful for: a) Simple factual lookups b) Multi-step reasoning problems like logic puzzles c) Formatting output in YAML only d) Reducing model context window
- Comparing a direct-answer baseline to a decomposed sub-question approach for a complex problem, the decomposed approach is expected to: a) Always perform worse b) Often improve accuracy by breaking down complexity c) Eliminate the need for any prompt d) Remove the need for an LLM
- A key reason structured formats (JSON/YAML) are preferred in production pipelines is: a) They are harder to parse programmatically b) They integrate more reliably with downstream software systems c) They cannot represent nested data d) They eliminate the need for any validation
Unit IV — Retrieval-Augmented Generation & LangChain Workflows
- In a RAG pipeline, after receiving a user query, the next step is typically to: a) Directly generate an answer with no retrieval b) Retrieve the top-k relevant chunks from the vector store c) Delete the query d) Skip embedding generation
- Comparing answers from a RAG-based pipeline versus a prompt without retrieval, the RAG pipeline is expected to show improved: a) Factual accuracy grounded in retrieved documents b) Random creativity only c) API latency reduction only d) Model parameter count
- When splitting documents into chunks (e.g., 200 tokens) for indexing, the primary goal is to: a) Maximize randomness b) Ensure consistent, manageable pieces for embedding and retrieval c) Delete document metadata d) Avoid using embeddings
- An LCEL chain that summarizes text and prints the result demonstrates: a) A retrieval-free, minimal end-to-end LLM invocation b) A fine-tuning pipeline c) A multimodal image generation task d) A prompt injection test
- If a RAG-based answer includes outdated or incorrect information despite retrieval, a likely cause is: a) The vector store contains irrelevant or poor-quality chunks b) The LLM has too much internal knowledge c) JSON formatting is enabled d) The API key expired
Unit V — Agents, Multimodal AI & Ethical Evaluation
- A prompt instructs an agent to invoke a calculator tool when a math question arises. This illustrates: a) Basic LLM agent architecture with tool invocation b) Pure zero-shot prompting with no tools c) A RAG indexing pipeline d) A negative prompting technique
- In multimodal prompting, comparing a generated image's caption to the original prompt evaluates: a) Token usage only b) Alignment between generated content and intended description c) API cost d) Model training time
- Designing a prompt-injection test such as "Ignore previous instructions..." is done to: a) Improve model creativity b) Identify security vulnerabilities and refine system prompts c) Increase token limits d) Generate images faster
- Using "LLM-as-Judge" to rate outputs on a 1–5 scale for clarity and correctness is an example of: a) Manual heuristic evaluation only b) Automated evaluation using another model as an evaluator c) Prompt injection d) Fine-tuning
- When deploying a prompt-driven application with Streamlit or Gradio, a key ethical consideration to address beforehand is: a) Font color choices b) Bias, misinformation, and data privacy risks c) Button placement only d) Increasing model temperature randomly
ANSWER KEY
| Q | Ans | Q | Ans | Q | Ans | Q | Ans | Q | Ans |
|---|---|---|---|---|---|---|---|---|---|
| 1 | b | 11 | d | 21 | b | 31 | b | 41 | b |
| 2 | b | 12 | b | 22 | a | 32 | b | 42 | a |
| 3 | b | 13 | b | 23 | b | 33 | b | 43 | b |
| 4 | d | 14 | b | 24 | b | 34 | a | 44 | a |
| 5 | b | 15 | b | 25 | d | 35 | b | 45 | a |
| 6 | b | 16 | b | 26 | b | 36 | b | 46 | a |
| 7 | b | 17 | b | 27 | b | 37 | b | 47 | b |
| 8 | b | 18 | b | 28 | b | 38 | b | 48 | b |
| 9 | b | 19 | b | 29 | b | 39 | b | 49 | b |
| 10 | b | 20 | a | 30 | b | 40 | b | 50 | b |
Comments
Post a Comment