Classifies SEC annual reports into 75 industry groups, then uses the Choice confidence to decide whether to publish a specific group or its broader SIC division.
Original by TypeSafe AIClassificationTypeSafe cookbookSource reviewed
Before you dive in
What you’ll find in the original
Build the group-to-division mapping in code.
Ask for the fine-grained group once, then fall back to its parent on an uncertain answer.
Evaluate whether broadening the label actually improves the accuracy you need.
Worth knowing
The fallback threshold is a policy choice, not a guarantee that the broader category is correct.