← All questions
Retrieval & EmbeddingsMedium· Layout Analysis· Heuristics· Precision & Recall

A heading detection model performs well on PDFs but poo...

The mechanism is an absolute point size threshold. Because slide decks often use larger font sizes, the model incorrectly flags body text as headings. A better approach involves using a ratio based on the character-weighted modal size. You should also consider edge cases, such as contracts where headings differ only by weight, and monitor precision as the primary metric since this failure mode leads to over-firing.

Code playground (Python)