Natural Language Processing Questions

Core natural language processing building blocks: text preprocessing and tokenization (word, character, subword BPE/WordPiece/unigram, multilingual, Unicode and noisy user-generated text), word and sentence embeddings (Word2Vec, GloVe, contextual embeddings, pooling and semantic similarity search), text classification, sentiment and intent detection (including limited labels, active learning and long documents), sequence labeling and named entity recognition (BIO tagging, CRFs, relation extraction, slot filling and semantic parsing), sequence-to-sequence models and machine translation (teacher forcing, exposure bias, beam search, BLEU, low-resource and cross-lingual transfer), topic modeling and theme extraction, language-model basics such as perplexity, and fine-tuning pretrained encoders like BERT for NLP tasks, including task-appropriate evaluation metrics, annotation and error analysis. Excludes transformer architecture internals, LLM pretraining and decoding behavior, retrieval-augmented generation and vector index engineering, parameter-efficient fine-tuning, and model serving or MLOps.

MediumTechnical
17 practiced

Given the last-layer hidden states of an encoder for a batch of padded sequences (shape [batch, seq_len, hidden_dim]) and the attention mask, produce a fixed-size sentence embedding. Implement the pooling you would use, explain how padding affects it, and say which strategy you would pick for semantic similarity and why.

MediumTechnical
22 practiced

You are evaluating a named-entity-recognition system for legal documents. Which metrics would you report, how would you treat rare entity types, and how would you set acceptable thresholds from business impact?

MediumTechnical
16 practiced

Describe strategies to handle out-of-vocabulary (OOV) words at inference time for both static embeddings and subword-based tokenizers. Which strategies are most effective for low-resource languages with limited token vocabularies and noisy orthography?

HardSystem Design
21 practiced

Design a multi-stage semantic parsing pipeline: intent detection → slot filling → canonicalization → executable plan. For each stage, recommend model types, training data requirements, evaluation metrics, and techniques to handle error propagation between stages.

MediumTechnical
24 practiced

Compute BLEU (up to 4-grams) by hand for one reference: 'the cat is on the mat' and candidate: 'the cat cat on mat'. Show n-gram precision for 1-4 grams, apply brevity penalty, and explain why BLEU can be misleading for single sentence evaluation. Suggest two alternatives or complements to BLEU for sentence-level quality.

Unlock Full Question Bank

Get access to all 41 Natural Language Processing interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.