NLP Information Extraction Interview Questions
Why Information Extraction Is Its Own Interview Category
Text classification asks a model to assign a label to an entire document. Information extraction asks something structurally different: pull specific, structured pieces of information out of unstructured text. That shift from document-level to token-level and structure-level reasoning is exactly what interviewers are testing when they move from classification questions into this cluster, and it's a common area where candidates who are comfortable with classification stumble.
This guide covers three concepts: named entity recognition, part-of-speech tagging, and topic modeling with LDA. The first two are sequence-labeling tasks; the third is an unsupervised structure-discovery task, and knowing which is which is itself part of the interview signal. Each section links a practice problem.
Named Entity Recognition
"How would you build a system that pulls out every person, organization, and date mentioned in a news article?"
Named entity recognition (NER) identifies spans of text that refer to real-world entities and classifies each span into a predefined category — commonly person, organization, location, and date, though the category set is task-specific and can be extended for a given domain. NER is framed as a sequence labeling problem: rather than classifying the whole document once, the model assigns a label to every token, and those per-token labels are then decoded into entity spans.
The tagging detail interviewers expect you to know is the boundary scheme. A raw per-token entity-type label alone can't distinguish one long entity from two adjacent entities of the same type, so NER systems use a scheme like IOB (or BIO) tagging: each token is labeled as the Beginning of an entity, Inside an entity that's already started, or Outside any entity, often combined with the entity type (for example, B-PER, I-PER, O). This lets a decoder correctly separate "New York" as one location entity from a hypothetical case where two separate one-word location entities happen to sit next to each other.
Historically, NER was tackled with conditional random fields (CRFs), which model dependencies between adjacent tags directly, or with BiLSTM-CRF hybrids that combine a bidirectional LSTM's contextual features with a CRF layer's structured tag decoding. Today, the standard approach fine-tunes a pretrained transformer as a token classifier, adding a classification head on top of each token's contextual embedding, since the transformer's attention over the whole sequence already captures much of the context a CRF's transition modeling used to be needed for.
A follow-up interviewers like to ask: how do you evaluate an NER model? Because NER is a span-level task, not just a per-token task, evaluation is usually done at the entity level — an entity is only counted correct if the model gets both its exact boundaries and its type right, so a system that finds the right words but tags one word too many or too few as part of the span is scored wrong for that entity, not partially right. Precision, recall, and F1 are computed over these exact-match entity spans, which is a stricter bar than per-token accuracy and one that's easy to overlook if you haven't implemented NER evaluation yourself. Practice: Named Entity Recognition.
Part-of-Speech Tagging
"What is part-of-speech tagging, and where does it actually get used in a modern NLP pipeline?"
Part-of-speech (POS) tagging assigns each token in a sentence a grammatical category — noun, verb, adjective, and so on — based on both the word itself and its surrounding context. Like NER, it's a sequence labeling task: the output is one tag per input token, and the tag for a given word can change depending on how it's used in the sentence.
The context-dependence is the detail interviewers probe for. The word "book" is a noun in "I read a book" and a verb in "please book the flight," and a correct POS tagger has to use surrounding context, not just a lookup of the word's most common tag, to get this right — which is exactly why POS tagging is framed as a sequence labeling problem rather than a simple per-word dictionary lookup.
POS tags are most useful as an input to further processing rather than as an end product themselves: syntactic parsing relies on POS tags to build a sentence's grammatical structure, some rule-based or pattern-based information extraction systems use POS tags to identify candidate noun phrases or verb phrases, and POS tags can help disambiguate word sense in downstream tasks. Modern transformer-based pipelines often don't need an explicit, separate POS-tagging stage because the model can learn related syntactic signals implicitly during pretraining, but POS tagging as a sequence-labeling task, and the intuition it teaches about context-dependent token classification, remains a fundamental skill interviewers expect you to be able to reason about. Practice: POS Tagging.
Topic Modeling with LDA
"You have ten thousand unlabeled customer reviews. How would you discover what themes they cover without manually reading them?"
Latent Dirichlet Allocation (LDA) is an unsupervised, generative probabilistic model for discovering latent topics across a collection of documents, and it's a structurally different task from NER and POS tagging: there are no labeled examples and no per-token tags, only a corpus of documents and a chosen number of topics, K.
LDA's generative assumption is that each document is a mixture of topics, and each topic is itself a distribution over the vocabulary. Concretely, the model assumes each document has a distribution over the K topics (some documents are mostly about one topic, others blend several), and each topic has a distribution over every word in the vocabulary (a "customer service" topic might place high probability on words like "refund," "support," and "wait," while a "product quality" topic weights different words highly). Both sets of distributions are governed by Dirichlet priors, which is where the model gets its name. Since the actual topic assignments aren't observed, inference — typically via Gibbs sampling or variational methods — is used to recover the topic-word and document-topic distributions that best explain the observed documents.
The output is two sets of probability distributions, not a labeled category the way a classifier produces: a document-topic distribution for every document, and a word distribution for every topic. Critically, LDA does not name its topics — a person has to inspect each topic's highest-probability words and assign it a human-readable label afterward, which is a step interviewers sometimes ask about directly since it's an easy detail to gloss over. Being clear that LDA is unsupervised topic discovery, not supervised classification into predefined categories, is the single most important distinction to get right in this section.
A practical follow-up worth being ready for: how do you choose the number of topics, K, since LDA requires it as an input rather than discovering it automatically? There's no single correct value — too few topics forces genuinely distinct themes to blend together into one broad, less interpretable topic, while too many topics splits a single coherent theme into several overlapping, redundant ones. In practice, K is chosen by trying a range of values and comparing them with a coherence metric that scores how well a topic's top words tend to co-occur in the same documents, combined with a human sanity check on whether the resulting topics are actually interpretable. Practice: Topic Modeling with LDA.
How to Prepare
- Know the IOB/BIO tagging scheme cold — it's the concrete mechanism that makes NER a sequence labeling task instead of a simple classification task, and interviewers use it to check for real depth.
- For POS tagging, lead with a context-dependent example like "book" as noun versus verb — it's the fastest way to show you understand why context matters, not just the tag set.
- Be precise that LDA is unsupervised and produces distributions, not labels — conflating it with supervised topic classification is one of the most common mistakes candidates make in this section.
For the rest of the concepts this track covers, see our NLP interview questions, which links practice problems across text processing, modeling, and information extraction topics.
Frequently Asked Questions
What tagging scheme do NER systems typically use to mark entity boundaries?
Most named entity recognition systems use a scheme like IOB or BIO tagging, where each token is labeled as the beginning of an entity, inside an entity that has already started, or outside any entity. This lets the model distinguish a single long entity spanning several tokens from two separate entities that happen to sit next to each other in the text, which a simpler per-token entity-type label without boundary information could not do.
Is part-of-speech tagging still relevant now that most NLP relies on pretrained transformers?
Yes, though its role has shifted. Part-of-speech tags are less often built as a hand-tuned standalone pipeline stage today, since transformer-based models can implicitly learn similar syntactic signals during pretraining. Part-of-speech tagging is still used directly as a preprocessing step for certain downstream tasks, such as rule-based information extraction or linguistic analysis, and understanding it well is still considered a baseline sequence-labeling skill interviewers expect.
What does LDA actually output for a collection of documents?
For each document, LDA outputs a probability distribution over a fixed number of topics, describing that document as a mixture of those topics rather than assigning it to a single category. For each topic, LDA outputs a probability distribution over the entire vocabulary, describing which words are most characteristic of that topic. Neither output includes human-readable topic labels; a person typically inspects each topic's highest-probability words and assigns it a descriptive name afterward.
Ready to test your skills?
Practice real Nlp interview questions from top companies — with solutions.
Get interview tips in your inbox
Join data scientists preparing smarter. No spam, unsubscribe anytime.