Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider hybrid text+OCR strategy #6

Open
deepdive101 opened this issue Jan 30, 2025 · 1 comment
Open

Consider hybrid text+OCR strategy #6

deepdive101 opened this issue Jan 30, 2025 · 1 comment

Comments

@deepdive101
Copy link

deepdive101 commented Jan 30, 2025

Consider also giving the LLM the coarsely extracted text from the page using a traditional PDF-to-markdown non-OCR package, e.g. pymupdf4llm, pdf2markdown4llm, etc. The idea is that this could help the LLM ground its OCR response using the given rough text. The prompt will then have to be updated accordingly to ask the LLM to consider both inputs. This can then be an optional enum keyword argument, disabled by default.

You don't have to then bundle the traditional package itself as a hard requirement of aipdf. If a user wants to use it, the user can include it in their personal package requirements. aipdf will just be an integrator.

@torrmal
Copy link
Contributor

torrmal commented Jan 31, 2025

this is a great idea, like a plugin, that does the job pre-llm?
do you want to collaborate on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants