Extractive vs Generative QA
Two ways to answer a question.
Extractive vs Generative QA is a free NLP Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the NLP Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Question Answering Means
Question answering, or QA, is the task of returning a precise answer to a natural-language question instead of a list of links. You ask, the system answers. 💬
Two Big Families
QA systems split into two families. Extractive QA pulls the answer straight out of a given passage, word for word.
Generative QA
The other family is generative QA. Instead of copying text, the model writes a fresh answer in its own words, possibly combining several facts.
Extractive Needs a Context
Extractive QA always works against a context passage you provide. The answer must be a span that already exists inside that text.
context = "Marie Curie was born in Warsaw in 1867."
question = "Where was Marie Curie born?"The Answer Is a Span
In extractive QA the output is a span: a start and end position in the context. Here the span is simply the word Warsaw.
Generative Can Go Beyond
A generative model is not limited to the passage. It can summarize, rephrase, or answer from knowledge baked in during training. ✨
Trust and Traceability
Extractive answers are easy to trust: you can point to the exact text they came from. Generative answers are flexible but harder to verify.
The Risk of Hallucination
Because generative models invent wording, they can hallucinate facts that sound right but are false. Extractive QA cannot do that.
When to Pick Extractive
Choose extractive QA when answers live inside trusted documents and you need exact, auditable quotes, like legal or medical text.
When to Pick Generative
Choose generative QA when you need fluent, combined answers or want to respond even when no single passage holds the full reply.
This Course Starts Extractive
We begin with extractive QA because it is concrete and easy to evaluate. You will load a passage and pull the exact answer from it.
Quick Check
Test your grasp of the two QA families.
Recap
QA returns precise answers. Extractive copies an exact span from a context; generative writes new text. Extractive is auditable and where we start. 🎯
Frequently asked questions
Is the “Extractive vs Generative QA” lesson free?
Yes — the full text of “Extractive vs Generative QA” is free to read here on the web, and the NLP Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the NLP Academy course, upgrade to CoddyKit PRO.
What will I learn in “Extractive vs Generative QA”?
Two ways to answer a question. You practise NLP Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start NLP Academy?
No prior experience is required. NLP Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Extractive vs Generative QA” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this NLP Academy lesson?
Yes. Every NLP Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Extractive vs Generative QA
- Running a QA Pipeline
- Finding Answer Spans in Context
- Handling No-Answer and Long Docs