Document Parsing and OCR
The knowledge base can only retrieve text that has already been parsed. For scanned PDFs, double-column papers, complex tables, and image-based pages, first make sure the main text is parsed correctly, then adjust the model and retrieval parameters.
First determine the document type
Markdown, TXT, HTML
Read by default
Heading levels, encoding, line breaks
PDF, DOCX, PPTX with copyable text
Use default processing first
Paragraph order, headers and footers, tables
Scanned PDFs, screenshots, image-based pages
Local or system OCR
Recognition language, amounts, dates, serial numbers
Multicolumn, formula-heavy, or complex-table PDFs
Dedicated document processor
Reading order, table structure, footnotes
Where parsing sits in the retrieval pipeline

Configure and validate one sample document
2. Configure processing capabilities
Open [Settings] → [Document Processing], and configure the document parsing service and OCR as needed. Cloud services usually require an API key or service address; local capabilities may require downloading a model first.

How to choose a processor and OCR
Read by default
Common text-based formats
Few settings, fast speed
Complex layouts and scanned pages may lose content
System OCR
Supported by the system and clear images
No extra API key required, fast speed
Accuracy depends on the operating system, language, and image quality
Local PaddleOCR
Offline recognition needed
Documents do not leave the local machine
Local models need to be downloaded before first use
Cloud or self-hosted processor
Double-column, complex tables, many formulas
Usually stronger at layout analysis
Cloud solutions receive the document content for processing
How to troubleshoot typical issues
Main text is empty or very short
Whether the file is a scanned document
Enable OCR or switch processors
Double-column text is interleaved
Reading order of the main text
Use a processor that is good at layout analysis
Tables become scattered text
Table headers, row-column relationships
Switch processors, or organize key rules into Markdown notes
Headers and footers repeat over and over
Duplicate noise in chunks
Clean up the source file or change the parser; do not just increase Top K
OCR gets numbers wrong
Amounts, dates, serial numbers
Improve image clarity and manually verify high-risk fields
Configuration notes
Document processor
Use default processing first
Wrong text order, missing tables, scanned pages are blank
Reindex the sample document
OCR
Clear scanned documents should use local or system capabilities first
Image-based pages have no text or many typos
Reindex and verify key fields
Chunk size and overlap
Keep the knowledge base default settings first
Conditions and conclusions are split apart
Change only one item per round and reindex
Validation question
3–5 real questions
After changing the processor, OCR, or chunking
Use the same question set for comparison
User case
Xiaolin imported a double-column travel policy PDF. The status was already ready, but the main text interleaved the left and right columns, and the approval conditions in the retrieval results were incomplete. Instead of first increasing Top K, he switched to a processor better suited for layout analysis, reindexed the same file, and then checked the main text and chunks.
The completion standard is: the approval conditions are readable in the original order, the amounts and dates are correct, and fixed questions can retrieve chunks containing the complete conditions.
FAQ
Continue reading
Last updated
Was this helpful?
