# How to train a model to extract specific data from PDFs?

**URL:** <https://discuss.huggingface.co/t/how-to-train-a-model-to-extract-specific-data-from-pdfs/56169>\
**Category:** Beginners\
**Created:** [September 24, 2023, 4:05pm UTC](https://discuss.huggingface.co/t/how-to-train-a-model-to-extract-specific-data-from-pdfs/56169 "2023-09-24T16:05:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fireche](https://avatars.discourse-cdn.com/v4/letter/f/a5b964/32.png) [@Fireche](https://discuss.huggingface.co/u/Fireche)\
**Post date:** [September 24, 2023, 4:05pm UTC](https://discuss.huggingface.co/t/how-to-train-a-model-to-extract-specific-data-from-pdfs/56169/1 "2023-09-24T16:05:36Z")

</div>

I want to fine-tune a model to recognize specific data from PDFs. What steps do I need to take to make this work?

The PDFs are structured in a way so that that certain data like “address”, “type”, “project name” etc is mostly in the same spot but doesn’t have to be. Optimally the model would automatically detect these things.

Any advice and input is appreciated. Thanks

---

<div class="post-metadata">

**Author:** ![HassanMahmood](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@HassanMahmood](https://discuss.huggingface.co/u/HassanMahmood)\
**Post date:** [January 30, 2025, 7:14am UTC](https://discuss.huggingface.co/t/how-to-train-a-model-to-extract-specific-data-from-pdfs/56169/2 "2025-01-30T07:14:32Z")

</div>

Did you find any solution for this purpose?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [January 30, 2025, 8:50am UTC](https://discuss.huggingface.co/t/how-to-train-a-model-to-extract-specific-data-from-pdfs/56169/3 "2025-01-30T08:50:16Z")

</div>

If you want LLM to process something other than text, I think many people would use RAG to achieve this.

> **[@openfree on Hugging Face: "📚 Multilingual RAG Chatbot with PDF Support

Chat...](https://huggingface.co/posts/openfree/663990074045065)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.
