NEW
Font size
WorksheetsGen AI Tech Quiz
Total questions: 25
Worksheet time: 19mins
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?
Increase model size
Improve prompt clarity and constraints
Increase temperature
Use a different programming language
A company uses historical customer data to predict future buying behavior. Which AI ecosystem component is MOST critical here?
UI layer
Data quality and preprocessing
API documentation
Logging system
You want the LLM to respond strictly in JSON format for API integration. What prompt strategy is MOST effective?
Use a casual prompt
Ask the model politely
Explicitly define output format and constraints
Increase max tokens
An AI model gives different answers to the same question each time. Which parameter is MOST likely responsible?
max_tokens
temperature
stop sequence
prompt length
You are building a chatbot that answers only from company documents. Which AI technique should you use?
Fine-tuning only
Reinforcement Learning
Retrieval-Augmented Generation (RAG)
Rule-based logic
A frontend sends malformed data to your backend API, causing crashes. What should you use to validate incoming JSON?
Logging
Try-except only
Schema validation (e.g., Pydantic)
HTML forms
You want to update only one field of a user resource via REST API. Which HTTP method is MOST appropriate?
GET
POST
PUT
PATCH
An AI agent monitors stock prices and automatically executes trades based on conditions. What makes it an agent rather than a script?
Uses Python
Runs continuously
Acts autonomously based on environment feedback
Uses APIs
Your REST API is stateless. What does this imply?
Server stores session data
Client must send all required information per request
API cannot scale
API does not use JSON
An AI agent uses tools like web search, calculator, and database queries. What capability is this?
Prompt chaining
Tool calling / function calling
Model fine-tuning
Tokenization
You want to ensure fast membership checks (x in collection) for large datasets. Which data structure is BEST?
List
Tuple
Dictionary keys
Set
Given: nums = [10, 20, 30, 40, 50] print(nums[-3:-1]) What is the output?
[20, 30]
[30, 40]
[30, 40, 50]
[40, 50]
You need a collection of key-value pairs where keys must be unique. Which structure fits BEST?
List
Set
Dictionary
Tuple
You want to iterate over a list but stop immediately when a condition is met. Which keyword should you use?
continue
pass
break
return
You want to generate a list of squares for even numbers only in one line. What Python feature fits BEST?
Lambda
Generator
List comprehension
Map
You hide internal implementation details and expose only required methods. Which OOP principle is this?
Inheritance
Polymorphism
Encapsulation
Composition
Your program crashes due to missing files. What is the BEST way to handle this gracefully?
Ignore the error
Use try-except
Restart program
Print error only
A decorator is MOST useful when you want to:
Modify function behavior without changing its code
Store data permanently
Create classes
Replace functions
Why is unit testing important in AI/ML pipelines?
Improves model accuracy
Ensures individual components work correctly
Reduces dataset size
Trains the model
You want consistent environments across teams. What should you rely on?
Manual installations
requirements.txt / dependency management
IDE settings
Code comments
Your API receives user age as a string instead of integer. Pydantic automatically converts it. What feature is this?
Serialization
Type coercion
Deserialization
Tokenization
You are building a high-performance async API client. Which library is MOST suitable?
Flask
Requests
HTTPX
Django
Your OpenAPI schema helps developers mainly by:
Improving UI design
Defining API contracts clearly
Training AI models
Managing databases
An LLM response is too long and exceeds cost limits. Which parameter should you reduce?
temperature
top_p
max_tokens
frequency_penalty
During inference, lowering temperature will MOST likely result in:
More creative responses
Longer responses
More deterministic responses
Faster training
