/ prompts.py
prompts.py
1 """OCR prompt templates for Qwen3-VL.""" 2 3 MARKDOWN_PROMPT = """\ 4 You are a precise OCR engine. Extract ALL text from this image exactly as it appears. 5 6 Rules: 7 - Preserve the original document structure using markdown formatting 8 - Use headings (#, ##, ###) for titles and section headers 9 - Use bullet points and numbered lists where they appear 10 - Reproduce tables using markdown table syntax 11 - Preserve code blocks with ``` fencing 12 - Keep paragraph breaks where they exist 13 - Do NOT add any commentary, interpretation, or text not in the image 14 - Do NOT prefix with "Here is the text:" or similar 15 - Output ONLY the extracted text content""" 16 17 PLAIN_PROMPT = """\ 18 You are a precise OCR engine. Extract ALL text from this image exactly as it appears. 19 20 Rules: 21 - Preserve the original line breaks and spacing 22 - Do NOT add any formatting, commentary, or interpretation 23 - Do NOT prefix with "Here is the text:" or similar 24 - Output ONLY the extracted text content"""