Red HatPeter Samouelian, Swati Kale, Francesco PaceTutorial
Build an AI matching engine with Docling, Granite & OpenShift AI
Summary
PeopleMesh uses Docling and Granite4:3B LLM on Red Hat OpenShift to extract structured data from PDF resumes and match people across multiple dimensions. Docling converts documents into a DoclingDocument with semantic labels using an AI model trained on 150,000 annotated samples to recover reading order from PDF’s print-oriented encoding, then exports to Markdown for LLM-driven JSON extraction via a system prompt. For matching, PeopleMesh decomposes a user query with an LLM to extract intent, entity type, country, and language, then applies structured filtering followed by semantic vector search via cosine similarity on distilled query embeddings. To mitigate embedding dilution from concatenated concepts, PeopleMesh uses a weighted scoring algorithm that reranks top 100 candidates using 7 information channels including nice-to-have skills and penalty multipliers for missing must-have and negative skills. The scoring provides relative ordering only, not normalized probabilities, and default weights are adjustable via the SearchOptions Java record.
Context
Organizations often rely on chance encounters for connecting people with the right skills, leading to missed opportunities. This post presents PeopleMesh, an AI matching engine deployed on Red Hat OpenShift that uses Docling for resume parsing and Granite LLMs for extraction and matching.
Approach / What changed
PeopleMesh implements a multi-step pipeline: Docling converts PDF resumes to a DoclingDocument with AI layout analysis, exports to Markdown, then Granite4:3B LLM extracts structured JSON via a system prompt. For matching, queries are decomposed by an LLM into intent, entity type, country, and language; then hybrid search combines traditional filtering with vector embedding cosine similarity, followed by a weighted scoring algorithm with 7 channels and penalty multipliers for missing must-have and negative skills.
Takeaways
Docling recovers reading order from PDFs by using an AI model trained on 150K samples to identify bounding boxes and semantic labels, then maps PDF Tm coordinates to these boxes.
PeopleMesh mitigates embedding dilution through a weighted scoring algorithm that combines cosine similarity with 7 additional information channels and penalty multipliers rather than chunking inputs.
The matching pipeline first decomposes a user query using an LLM to extract intent, entity type, country, and language, then applies structured filtering before semantic vector search.
FAQ
How does Docling handle PDFs that don't preserve reading order?
Docling uses an AI model trained on 150,000 annotated samples to identify layout bounding boxes and semantic labels. It then maps the PDF's Tm coordinates (print cursor positions) to these bounding boxes to recover the correct text order.
Can the matching weights be customized?
Yes, all weights in the scoring algorithm can be overridden by modifying the SearchOptions Java record. The default weights are notional and likely need adjustment for different use cases and datasets.
Source and freshness
- Source
- developers.redhat.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.