liveBook · Manning

Topic classification

As explained in The Art of AI Product Development

Topic classification is assigning documents or other inputs to predefined topical categories.

Topic classification assigns documents to predefined categories so an application can select relevant sources instead of generating content from mismatched material. section 8.2.2

A practical implementation emphasizes:

  • Let users specify a topic, then use only documents explicitly tagged with that topic. section 8.2.2
  • Use supervised fine-tuning when a language model must perform the classification task. section 8.2.2
  • Consider small language models for efficiency, simpler troubleshooting, and lower-cost scaling. section 8.2.2

Filtering a document library

A content application classifies documents as “Workflow automation,” “Compliance and security,” or “Cutting-edge automation.” A user selecting “Compliance and security” receives content grounded in matching documents rather than irrelevant sources. section 8.2.2

Table 8.2 Data sample for supervised fine-tuning

Input

Target output

Document title

Text excerpt

Label

“API integration guide”

“Detailed steps to integrate workflows . . .”

Workflow automation

“Compliance checklist 2024”

“Ensures adherence to data protection . . .”

Compliance and security

“Top-10 trends in IT governance”

“In this article, we will present the top trends in compliance . . .”

Compliance and security

“AI trends in automation”

“Examining the latest advances in ML . . .”

Cutting-edge automation

Sample labeled records pair document titles and excerpts with topic labels, illustrating the data structure used for supervised fine-tuning. section 8.2.2

How The Art of AI Product Development covers it

How deep it goes
Defines the task and model choice, but stops short of detailing the complete fine-tuning procedure.
Examples
Uses workflow automation, compliance and security, and cutting-edge automation labels in a document dataset.
What it assumes
Assumes familiarity with supervised learning and classification while introducing language models for these tasks.
What you can do after
Apply supervised fine-tuning to classify documents and restrict content generation to matching topics.
How it connects
Connects supervised fine-tuning with language models, taxonomies, small language models, and document filtering.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.