FREQUENTLY ASKED QUESTIONS

Clear answers to technical questions.

Explore concise, practical answers across AI, machine learning, Python, DevOps, data engineering, and system design. These are evergreen learning guides, not a ranking of current search popularity.

AI and generative AI

Core ideas behind generative models, language models, retrieval, and AI assistants.

Explore generative AI interview guides

What is generative AI?

Generative AI is a type of artificial intelligence that creates new content, such as text, images, audio, video, or code, from patterns learned during training. Its output is generated rather than retrieved as a guaranteed fact, so important results should be checked.

How does a large language model generate text?

A large language model processes the text it receives as tokens, builds a representation of their context, and predicts a likely next token. It repeats that prediction to produce a sequence. The process can create fluent answers, but fluency alone does not verify that a claim is true.

What is retrieval-augmented generation (RAG)?

Retrieval-augmented generation combines search over a selected information source with a language model that uses retrieved passages to draft an answer. It is useful when an application needs responses grounded in changing or organization-specific material, but retrieval errors and unsupported generation still need to be evaluated.

What is the difference between an AI agent and a chatbot?

A chatbot primarily responds to a conversation, while an AI agent can also select from a defined set of tools, take steps, observe their results, and continue toward a goal. The boundary is not always strict: some chatbots use tools, and safe agents need clear permissions, limits, and human oversight for consequential actions.

Can generative AI make mistakes, and how can I reduce the risk?

Yes. A generative model can produce an answer that sounds convincing but is incomplete, outdated, or incorrect. Reduce risk by constraining its task, grounding answers in trustworthy material, checking outputs against independent evidence, measuring failure cases, and requiring qualified review when errors could cause harm.

Machine learning

Frequently discussed foundations for training, evaluating, and improving ML models.

Explore machine-learning interview guides

What is machine learning?

Machine learning is a way to build software that learns patterns from examples and uses them to make predictions or decisions. A model’s usefulness depends on the quality and relevance of its data, its evaluation, and how well it performs in the setting where it will be used.

What is the difference between supervised, unsupervised, and reinforcement learning?

Supervised learning uses examples paired with target answers, such as labeled images. Unsupervised learning looks for structure in data without a supplied target, such as grouping similar records. Reinforcement learning trains an agent through actions and feedback signals from an environment.

What is overfitting in machine learning?

Overfitting happens when a model fits details or noise in its training examples so closely that it performs less well on new data. It can be detected by comparing performance on separate datasets and addressed with approaches such as simpler models, regularization, more representative data, or early stopping.

Why split data into training, validation, and test sets?

The training set is used to fit model parameters, the validation set helps compare choices during development, and the test set provides a final check on data not used for those choices. Keeping these roles separate reduces the risk of reporting an overly optimistic estimate of real-world performance.

What is the difference between precision and recall?

Precision measures how many predicted positives are actually positive; recall measures how many actual positives the model finds. Increasing one can reduce the other depending on the decision threshold. Choose a balance based on the relative cost of false alarms and missed cases.

Python

Practical Python concepts used in programming, data work, and technical interviews.

Explore Python interview guides

What is the difference between a Python list, tuple, set, and dictionary?

A list is an ordered, changeable sequence; a tuple is an ordered sequence that cannot be reassigned item by item; a set stores unique values without sequence-based indexing; and a dictionary maps keys to values. Choose the structure based on the operations and uniqueness rules your program needs.

What does it mean for an object to be mutable or immutable in Python?

A mutable object can be changed after it is created, while an immutable object cannot have its value changed in place. Lists and dictionaries are common mutable examples; strings and tuples are common immutable examples. This distinction matters when objects are shared, passed to functions, or used as dictionary keys.

What is a Python decorator?

A decorator is a callable that takes a function or class and returns a replacement, often adding behavior around the original. It is commonly used for concerns such as logging, caching, or access checks. The wrapped function can be preserved with `functools.wraps` so its name and documentation remain available.

What is the Global Interpreter Lock (GIL) in CPython?

In standard GIL-enabled CPython builds, the Global Interpreter Lock allows only one thread at a time to execute Python bytecode within an interpreter. Threads can still be useful for I/O-bound work, while CPU-heavy parallel tasks may benefit from processes or other implementations. Python also offers optional free-threaded builds, so check the runtime you deploy.

Why use a virtual environment in Python?

A virtual environment keeps a project’s installed Python packages separate from other projects and the system installation. This helps projects use different dependency versions without interfering with each other. Record dependencies in a project manifest or lock file so the environment can be reproduced.

DevOps and MLOps

Software delivery and operational practices for reliable applications and machine-learning systems.

Explore MLOps and deployment interview guides

What is DevOps?

DevOps is a set of practices that brings software development and operations work closer together. Teams use automation, shared ownership, and feedback from running systems to deliver changes more reliably. It is an organizational and technical approach, not a single tool or job title.

What is CI/CD?

Continuous integration (CI) regularly builds and tests code changes so problems are found earlier. Continuous delivery (CD) keeps validated changes ready for release; continuous deployment goes further by automatically releasing qualifying changes. Teams should add checks and approvals appropriate to the impact of a change.

What is the difference between a container and a virtual machine?

A virtual machine runs a guest operating system on virtualized hardware, while a container packages an application and its dependencies while sharing the host operating-system kernel. Containers are usually lighter to start, but they do not provide the same operating-system boundary as a separate virtual machine.

What is MLOps?

MLOps applies software delivery and operations practices to machine-learning systems. It coordinates data and model versioning, repeatable training, evaluation, deployment, monitoring, and rollback. The goal is to manage the full model lifecycle, including changes in data and model behavior after release.

How can a team detect model drift in production?

A team can monitor whether incoming data changes, whether model outputs shift, and—when trustworthy labels arrive—whether measured performance declines. A shift in inputs is a signal to investigate, not proof that quality has fallen. Define thresholds, investigate causes, and use a tested response such as review, retraining, or rollback.

Data engineering

Foundational choices for building dependable data pipelines and platforms.

Explore data-engineering interview guides

What is the difference between ETL and ELT?

ETL extracts data, transforms it, and then loads the result into its destination. ELT loads extracted data first and performs transformations in the destination platform. The better fit depends on governance, latency, tooling, data volume, and where the team can safely process the data.

What is the difference between a data warehouse, data lake, and lakehouse?

A data warehouse is commonly optimized for governed, structured analytics; a data lake stores data in a range of formats for varied uses; and a lakehouse combines lake-style storage with table-management and query features associated with warehouses. Product definitions differ, so evaluate actual reliability, governance, and workload support.

When should a data pipeline use batch processing or stream processing?

Batch processing handles accumulated records on a schedule and is often simpler for work that can tolerate delay. Stream processing handles events continuously or in short windows when fresher results are needed. Compare latency needs with operational complexity, ordering, replay, and correctness requirements.

What is change data capture (CDC)?

Change data capture records inserts, updates, and deletes from a source system and makes those changes available to downstream consumers. It can avoid repeatedly copying an entire table, but consumers still need to handle ordering, duplicates, schema changes, and recovery from missed events.

How do you make a data pipeline safe to retry?

Design retries so processing the same input again does not create unintended duplicate effects. Common techniques include stable event identifiers, idempotent writes, checkpoints, bounded retries, and recording failures for inspection. The right method depends on the source, destination, and guarantees each system provides.

System design and engineering

Core concepts for reasoning about scalable, available, and maintainable software systems.

Explore system-design interview guides

What is system design?

System design is the process of deciding how software components, data stores, and communication paths fit together to meet requirements. A sound design starts with users, expected load, reliability, security, and constraints, then explains trade-offs rather than relying on a one-size-fits-all architecture.

What is the difference between vertical and horizontal scaling?

Vertical scaling gives one machine more resources, such as memory or CPU. Horizontal scaling adds machines and distributes work among them. Horizontal approaches can increase capacity and resilience but often require coordination, data partitioning, and careful handling of failures.

What does the CAP theorem say about distributed systems?

The CAP theorem describes a trade-off during a network partition: a distributed system cannot guarantee both a response from every request and perfectly consistent reads across all nodes at that moment. It does not mean teams simply choose any two properties in every situation; the design depends on failure conditions and the consistency guarantees the application needs.

What does a load balancer do?

A load balancer directs incoming requests across multiple service instances according to routing and health rules. It can help distribute traffic and stop sending new requests to unhealthy instances. It does not by itself make an application reliable; the services and their dependencies still need appropriate failure handling.

How do you design a rate limiter?

Start by defining what is limited, such as requests per user and time window, and what response clients receive when they exceed the policy. Choose an algorithm such as a token bucket, then consider atomic state updates, distributed consistency, burst behavior, and failure handling. Measure the effect on both service protection and legitimate users.