Prompt Engineering Interview Questions – Online Practice Test

Start Test Now

1.

Which practices should engineers follow when managing prompts in a production AI system? (Select all that apply)

  1. Store prompts in version control (e.g., git) alongside code
  2. Run eval regression tests before promoting prompt changes to production
  3. Make ad-hoc prompt edits in production without logging changes
  4. Maintain separate prompts for dev, staging, and production environments
 View Answer

2.

In a multimodal LLM prompt, what additional input type can be provided beyond text?

  1. Images, audio, or video alongside text
  2. Only additional system prompts
  3. Raw SQL queries only
  4. Compiled binary executables
 View Answer

3.

Why is controlling the number of output tokens important when deploying LLMs in production?

  1. More tokens always produce higher-quality answers
  2. Token limits only apply to embedding models, not chat models
  3. Output tokens drive API cost and inference latency; constraining them is essential for production efficiency
  4. Models automatically stop at an optimal length with no configuration
 View Answer

4.

A prompt instructs: 'Respond in under 100 words, use bullet points, target a 10-year-old audience.' What prompt design principle does this illustrate?

  1. Output constraint specification
  2. Few-shot prompting
  3. Chain-of-thought prompting
  4. Retrieval-Augmented Generation
 View Answer

5.

What is the purpose of assigning a role such as 'Act as a senior security auditor' in a prompt?

  1. It shapes the model's knowledge register and communication style to match the assigned role
  2. It grants the model access to internet resources
  3. It encrypts the response for security purposes
  4. It reduces the token usage of the response
 View Answer

6.

Why should engineers A/B test prompt variants rather than choosing based on a single example?

  1. A single example may not represent overall performance due to model variance and distribution shift
  2. A/B testing always reduces API costs by 50%
  3. A/B testing is required by all LLM API providers
  4. A single example is sufficient if it looks good
 View Answer

7.

What is the 'LLM-as-Judge' evaluation pattern?

  1. Using a (stronger) LLM to score target model outputs against a defined rubric
  2. Running keyword-match checks against expected output strings
  3. Using the same model to generate and evaluate its own responses in the same call
  4. Asking users to rate responses on a 1–5 scale inside the chat UI
 View Answer

8.

Which metrics are commonly used when evaluating LLM outputs? (Select all that apply)

  1. Factual accuracy against ground-truth answers
  2. Relevance to the input query
  3. Output format compliance with the specified schema
  4. Average typing speed of the prompt author
 View Answer

9.

What is the goal of prompt evaluation (evals) in an LLM project?

  1. To reduce the number of API calls made per user session
  2. To measure and benchmark prompt effectiveness using representative test cases
  3. To automatically fine-tune the model based on user feedback
  4. To encrypt prompt content before sending to the API
 View Answer

10.

What does the 'top_p' (nucleus sampling) parameter control in LLM generation?

  1. The maximum number of output tokens
  2. The number of fine-tuning epochs
  3. The number of parallel inference threads
  4. The cumulative probability threshold for the token candidate pool
 View Answer
Start Test Now
 Log In to Chat