Back to Tech Interviews

NLP & LLM Interview Master

100+ Natural Language Processing questions covering Transformer architecture, Self-Attention, Tokenization (BPE/WordPiece), BERT, GPT, and Vector Embeddings.

Total: 100 QuestionsLearned: 0 / 100 (0%)
Difficulty Filters

Tools & Options
Showing 100 of 100 questions
Beginner
What is Natural Language Processing (NLP)?

Natural Language Processing (NLP) is a subfield of artificial intelligence, computer science, and linguistics concerned with the interactions between computers and human language, in particular how to program computers to process and analyze large amounts of natural language data.

Beginner
What is Tokenization?

Tokenization is the process of breaking down a stream of text into smaller components called tokens. These could be words, characters, or subwords. It is usually the first step in an NLP pipeline.

Beginner
What is Stemming?

Stemming is a crude heuristic process that chops off the ends of words to find their base or root form, even if the root is not a valid word. For example, 'running' becomes 'run'.

Beginner
What is Lemmatization?
Beginner
What is Stop Word Removal?
Beginner
What is a Bag-of-Words (BoW) model?
Beginner
What is TF-IDF?
Beginner
What are Word Embeddings?
Beginner
What is Word2Vec?
Beginner
What is Part-of-Speech (POS) Tagging?
Beginner
What is Named Entity Recognition (NER)?
Beginner
What is Sentiment Analysis?
Beginner
What are N-grams?
Beginner
What is Levenshtein Distance?
Beginner
What is an RNN (Recurrent Neural Network)?
Beginner
Why use LSTM instead of a basic RNN?
Beginner
What is the Vanishing Gradient Problem?
Beginner
What is perplexity in Language Modeling?
Beginner
What is BLEU score?
Beginner
What is ROUGE score?
Beginner
What is a Language Model?
Beginner
What is Text Generation generation constraints?
Beginner
Calculate Document Frequency.
Beginner
What is the GloVe embedding?
Beginner
Why sequence padding is important?
Intermediate
Explain the Attention mechanism.
Intermediate
What is Self-Attention?
Intermediate
Explain the Sequence-to-Sequence (Seq2Seq) Model.
Intermediate
What is Teacher Forcing?
Intermediate
What is Subword Tokenization?
Intermediate
How does Byte-Pair Encoding (BPE) work?
Intermediate
What is WordPiece?
Intermediate
Explain the concept of Word Sense Disambiguation (WSD).
Intermediate
What is an LLM (Large Language Model)?
Intermediate
What is BERT?
Intermediate
Explain the Masked Language Modeling (MLM) task in BERT.
Intermediate
What is Next Sentence Prediction (NSP) in BERT?
Intermediate
What is fine-tuning in NLP?
Intermediate
What is the difference between Extractive and Abstractive Summarization?
Intermediate
How do Convolutional Neural Networks (CNNs) perform in NLP?
Intermediate
Explain the Skip-gram architecture in Word2Vec.
Intermediate
Explain Continuous Bag of Words (CBOW) architecture.
Intermediate
What is Negative Sampling in Word2Vec?
Intermediate
What is Coreference Resolution?
Intermediate
Difference between Generative and Discriminative models.
Intermediate
What is the ELMo algorithm?
Intermediate
What is Top-K vs Top-P sampling?
Intermediate
What are the common evaluation metrics for NER?
Intermediate
How do you handle Class Imbalance in NLP?
Intermediate
What are Zero-shot and Few-shot learning?
Advanced
Explain the architecture of a Transformer model.
Advanced
What is the purpose of Positional Encoding in Transformers?
Advanced
Explain the calculation of Scaled Dot-Product Attention.
Advanced
What is Multi-Head Attention?
Advanced
Difference between GPT architectures and BERT?
Advanced
Explain Retrieval Augmented Generation (RAG).
Advanced
What is LoRA (Low-Rank Adaptation)?
Advanced
What is RLHF (Reinforcement Learning from Human Feedback)?
Advanced
What is Prompt Engineering vs Prompt Tuning?
Advanced
Explain the difference between T5 and standard Seq2Seq models.
Advanced
What are Vector Databases?
Advanced
Explain the 'Hallucination' problem in LLMs and mitigation strategies.
Advanced
What are KV (Key-Value) Caches in LLM decoding?
Advanced
What is FlashAttention?
Advanced
What is Quantization in neural networks? (e.g. 4-bit, 8-bit)
Advanced
Differentiate between RoPE and Absolute Positional Encodings.
Advanced
Explain ALiBi (Attention with Linear Biases).
Advanced
Explain Directed Acyclic Graphs (DAGs) in Dependency Parsing.
Advanced
What is the Conditional Random Field (CRF) layer used for in NER?
Advanced
What is Knowledge Distillation?
Advanced
Explain Mixture of Experts (MoE) architecture.
Advanced
How does Semantic Search differ from Lexical/Keyword Search?
Advanced
What is Cross-Encoder vs Bi-Encoder?
Advanced
What is Token Healing in LLMs?
Advanced
Explain Direct Preference Optimization (DPO).
Math/Code
Implement Cosine Similarity in Python.
Math/Code
Calculate TF-IDF for word 'data'.
Math/Code
Write a PyTorch basic Self-Attention calculation.
Math/Code
Code: Convert a list of texts to bag of words.
Math/Code
How to apply Softmax in PyTorch?
Math/Code
Implement a simple bigram character generator.
Math/Code
Extract Named Entities using Spacy.
Math/Code
What is Cross-Entropy Loss formula mathematically?
Math/Code
Load a transformer model via HuggingFace.
Math/Code
Write WordPiece Subword Tokenizer logic pseudo-code.
Math/Code
How to clip gradients in PyTorch to prevent exploding gradients?
Math/Code
Calculate the Jaccard Similarity between two sentences.
Math/Code
Write an Attention Mask for sequence padding.
Math/Code
Implement early stopping loop in PyTorch.
Math/Code
Generate Text using HuggingFace GPT-2.
Math/Code
Pad sequences in raw python.
Math/Code
Implement Levenshtein distance conceptually using recursion.
Math/Code
How to initialize LayerNorm weights.
Math/Code
Calculate output dimension of a 1D Conv Layer over text.
Math/Code
Retrieve embeddings from a PyTorch Embedding layer.
Math/Code
Calculate Parameters in an LSTM relative to Input/Hidden size.
Math/Code
Save and load a PyTorch NLP Model.
Math/Code
Perform Top-K sampling conceptually.
Math/Code
Convert Text to sequence using HuggingFace Tokenizer.
Math/Code
Write an RNN step function loop.

Technical Interview Mastery Blueprint

Proven methodologies and frameworks to succeed in technical and architecture rounds.

1. The Engineering STAR Technique

When responding to architectural or situational questions, structure your answer using Situation, Technical Constraint, Action, and Measurable Result. Rather than jumping straight to syntax, articulate the business problem, why certain patterns (e.g. caching, queuing, immutability) were selected over alternatives, and what latency or throughput improvements were achieved.

2. Defending Architectural Trade-Offs

Senior interviewers evaluate how you weigh trade-offs. Always explain why you chose an approach: e.g., memory overhead vs CPU cycle speed, consistency vs availability (CAP theorem), or normalized schemas vs denormalized fast reads. Stating the drawbacks of your own proposal demonstrates maturity and production experience.

3. Clean Code & Edge-Case Proactivity

In live-coding rounds, communicate your thinking aloud before typing. State edge cases explicitly: null or undefined inputs, extreme boundary values, concurrency races, and network timeouts. Writing modular, well-named functions with deterministic unit tests separates junior candidates from staff-level engineers.

4. Antipatterns to Avoid

Avoid reciting memorized definitions without practical context. Never dismiss non-functional requirements such as security (CSRF, injection, token rotation), observability (logging, metrics), and accessibility (ARIA, semantic standards). Always ask clarifying scope questions before writing complex implementations.

Continuous learning: Practice daily, mark completed questions as learned, and revisit difficult concepts.Explore All Interview Tracks →

Explore Related Tools

Hand-picked utilities and calculators related to this tool.

Related Tools