Data Science · Advanced level

Advanced level · Module 4: Text Data and Open-Ended Responses · Lesson 3 of 4

Topic Models and AI-Assisted Coding

Use automated methods to scale text analysis, and check their output against human coding.

In this lesson you will

  • Run a simple topic model
  • Use AI-assisted classification with validation against human codes

Key concepts

topic modellingclassificationvalidation sampleerror analysis

The lesson

Topic models group words that often appear together into topics, giving an overview of large text collections. Topics need human interpretation and naming.

AI tools, including language models, can suggest codes for each response quickly. Treat their output as a first draft: compare with human coding on a validation sample and measure agreement before relying on it.

Check privacy before using any external service: remove names and identifying details, and follow the organisation's rules on sending data outside.

Step by step

  1. Run a topic model and name the topics.
  2. Prepare an anonymised validation sample.
  3. Generate AI-suggested codes for it.
  4. Compare with human codes and analyse errors.

Practice activity

Complete the AI-assisted coding comparison from the practical activity.

Expected result: Agreement figures and an error analysis supporting a decision on whether to use AI coding.

Check your understanding

  1. How should AI-suggested codes be treated?

    Show answer

    As a first draft that must be validated against human coding.

  2. What must happen before sending text to an external AI service?

    Show answer

    Anonymisation and approval under the organisation's data rules.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.