wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Gen AI Tech Quiz

Total questions: 25

Worksheet time: 19mins

Name
Class
Date
1.

You are interacting with an LLM, but its answers are vague and inconsistent. You want more structured and accurate responses. What is the BEST improvement?

a)

Increase model size

b)

Improve prompt clarity and constraints

c)

Increase temperature

d)

Use a different programming language

2.

A company uses historical customer data to predict future buying behavior. Which AI ecosystem component is MOST critical here?

a)

UI layer

b)

Data quality and preprocessing

c)

API documentation

d)

Logging system

3.

You want the LLM to respond strictly in JSON format for API integration. What prompt strategy is MOST effective?

a)

Use a casual prompt

b)

Ask the model politely

c)

Explicitly define output format and constraints

d)

Increase max tokens

4.

An AI model gives different answers to the same question each time. Which parameter is MOST likely responsible?

a)

max_tokens

b)

temperature

c)

stop sequence

d)

prompt length

5.

You are building a chatbot that answers only from company documents. Which AI technique should you use?

a)

Fine-tuning only

b)

Reinforcement Learning

c)

Retrieval-Augmented Generation (RAG)

d)

Rule-based logic

6.

A frontend sends malformed data to your backend API, causing crashes. What should you use to validate incoming JSON?

a)

Logging

b)

Try-except only

c)

Schema validation (e.g., Pydantic)

d)

HTML forms

7.

You want to update only one field of a user resource via REST API. Which HTTP method is MOST appropriate?

a)

GET

b)

POST

c)

PUT

d)

PATCH

8.

An AI agent monitors stock prices and automatically executes trades based on conditions. What makes it an agent rather than a script?

a)

Uses Python

b)

Runs continuously

c)

Acts autonomously based on environment feedback

d)

Uses APIs

9.

Your REST API is stateless. What does this imply?

a)

Server stores session data

b)

Client must send all required information per request

c)

API cannot scale

d)

API does not use JSON

10.

An AI agent uses tools like web search, calculator, and database queries. What capability is this?

a)

Prompt chaining

b)

Tool calling / function calling

c)

Model fine-tuning

d)

Tokenization

11.

You want to ensure fast membership checks (x in collection) for large datasets. Which data structure is BEST?

a)

List

b)

Tuple

c)

Dictionary keys

d)

Set

12.

Given: nums = [10, 20, 30, 40, 50] print(nums[-3:-1]) What is the output?

a)

[20, 30]

b)

[30, 40]

c)

[30, 40, 50]

d)

[40, 50]

13.

You need a collection of key-value pairs where keys must be unique. Which structure fits BEST?

a)

List

b)

Set

c)

Dictionary

d)

Tuple

14.

You want to iterate over a list but stop immediately when a condition is met. Which keyword should you use?

a)

continue

b)

pass

c)

break

d)

return

15.

You want to generate a list of squares for even numbers only in one line. What Python feature fits BEST?

a)

Lambda

b)

Generator

c)

List comprehension

d)

Map

16.

You hide internal implementation details and expose only required methods. Which OOP principle is this?

a)

Inheritance

b)

Polymorphism

c)

Encapsulation

d)

Composition

17.

Your program crashes due to missing files. What is the BEST way to handle this gracefully?

a)

Ignore the error

b)

Use try-except

c)

Restart program

d)

Print error only

18.

A decorator is MOST useful when you want to:

a)

Modify function behavior without changing its code

b)

Store data permanently

c)

Create classes

d)

Replace functions

19.

Why is unit testing important in AI/ML pipelines?

a)

Improves model accuracy

b)

Ensures individual components work correctly

c)

Reduces dataset size

d)

Trains the model

20.

You want consistent environments across teams. What should you rely on?

a)

Manual installations

b)

requirements.txt / dependency management

c)

IDE settings

d)

Code comments

21.

Your API receives user age as a string instead of integer. Pydantic automatically converts it. What feature is this?

a)

Serialization

b)

Type coercion

c)

Deserialization

d)

Tokenization

22.

You are building a high-performance async API client. Which library is MOST suitable?

a)

Flask

b)

Requests

c)

HTTPX

d)

Django

23.

Your OpenAPI schema helps developers mainly by:

a)

Improving UI design

b)

Defining API contracts clearly

c)

Training AI models

d)

Managing databases

24.

An LLM response is too long and exceeds cost limits. Which parameter should you reduce?

a)

temperature

b)

top_p

c)

max_tokens

d)

frequency_penalty

25.

During inference, lowering temperature will MOST likely result in:

a)

More creative responses

b)

Longer responses

c)

More deterministic responses

d)

Faster training