News for hackers. Stuff that matters.
Re:Show HN: PDF to MD by LLMs – Extract Text/Tables/Image De... by avibhu on Sunday September 22, 2024 @11:38AM (#41617799)
Have you tried few shot prompting? Something on the lines of:

User: Extract x from the given scanned document. <sample_img_1>

Assistant: <sample_img_1_output>

User: Extract x from the given scanned document. <sample_img_2>

Assistant: <sample_img_2_output>

User: Extract x from the given scanned document. <query_image>

In my experience, this seems to make the model significantly more consistent.

Re:Show HN: PDF to MD by LLMs – Extract Text/Tables/Image De... by yigitkonur35 on Sunday September 22, 2024 @03:03PM (#41619146)
For highly consistent responses, manually transcribing the most challenging page of the document (or engaging in multiple rounds of dialogue with Claude) and incorporating it as a few-shot example can dramatically improve overall consistency.