[GH-ISSUE #12613] issue: Mistral OCR only partially parses PDF documents #16658

Closed
opened 2026-04-19 22:32:59 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Sky-creates on GitHub (Apr 8, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12613

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.2

Ollama Version (if applicable)

No response

Operating System

Debian

Browser (if applicable)

Chrome

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

I have encountered an issue with Mistral OCR's PDF parsing functionality when used within the knowledge base component. When processing the same PDF document:

  1. Mistral OCR in knowledge base: Produces incomplete extraction, significantly shorter than expected
  2. Tika with the same document: Successfully extracts the complete content
  3. Mistral Chat with the same document: Successfully parses the PDF without truncation issues

This suggests the issue may be specific to how Mistral OCR is implemented within the knowledge base integration.

Technical details:

Is there a known limitation in how Open WebUI implements the Mistral API for knowledge base document processing? Are there configuration parameters that need adjustment to enable complete document parsing?

Actual Behavior

Mistral OCR in knowledge base: Produces incomplete extraction, significantly shorter than expected

Steps to Reproduce

  1. Set Document, Content Extraction Engine to Mistral OCR
  2. Go to Workspace, Knowledge base, open any knowledge base
  3. Upload the pdf and check the parsed document

Logs & Screenshots

open-webui | 2025-04-08 15:58:12.929 | INFO | open_webui.routers.files:upload_file:88 - file.content_type: application/pdf - {}
open-webui | 2025-04-08 15:58:12.950 | INFO | open_webui.retrieval.loaders.mistral:_upload_file:59 - Uploading file to Mistral API - {}
open-webui | 2025-04-08 15:58:15.416 | INFO | open_webui.retrieval.loaders.mistral:_upload_file:78 - File uploaded successfully. File ID: c412a12e-6bb7-498f-84d5-05135671dc83 - {}
open-webui | 2025-04-08 15:58:15.417 | INFO | open_webui.retrieval.loaders.mistral:_get_signed_url:86 - Getting signed URL for file ID: c412a12e-6bb7-498f-84d5-05135671dc83 - {}
open-webui | 2025-04-08 15:58:15.887 | INFO | open_webui.retrieval.loaders.mistral:_get_signed_url:97 - Signed URL received. - {}
open-webui | 2025-04-08 15:58:15.887 | INFO | open_webui.retrieval.loaders.mistral:_process_ocr:105 - Processing OCR via Mistral API - {}
open-webui | 2025-04-08 15:58:21.559 | INFO | open_webui.retrieval.loaders.mistral:_process_ocr:124 - OCR processing done. - {}
open-webui | 2025-04-08 15:58:21.560 | INFO | open_webui.retrieval.loaders.mistral:_delete_file:133 - Deleting uploaded file ID: c412a12e-6bb7-498f-84d5-05135671dc83 - {}
open-webui | 2025-04-08 15:58:21.979 | INFO | open_webui.retrieval.loaders.mistral:_delete_file:142 - File deleted successfully: {'id': 'c412a12e-6bb7-498f-84d5-05135671dc83', 'object': 'file', 'deleted': True} - {}
open-webui | 2025-04-08 15:58:22.043 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:811 - save_docs_to_vector_db: document s41586-025-08725-5-test2.pdf file-1ea98d0f-06e4-4f16-aabc-dd77fca5d28a - {}
open-webui | 2025-04-08 15:58:22.068 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:894 - adding to collection file-1ea98d0f-06e4-4f16-aabc-dd77fca5d28a - {}
open-webui | 2025-04-08 15:58:28.314 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 100.70.207.127:0 - "POST /api/v1/files/ HTTP/1.1" 200 - {}
open-webui | 2025-04-08 15:58:28.416 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:811 - save_docs_to_vector_db: document s41586-025-08725-5-test2.pdf c939aaec-f3ef-4cf9-a043-04a69e5fc9b4 - {}
open-webui | 2025-04-08 15:58:28.437 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:883 - collection c939aaec-f3ef-4cf9-a043-04a69e5fc9b4 already exists - {}
open-webui | 2025-04-08 15:58:28.437 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:894 - adding to collection c939aaec-f3ef-4cf9-a043-04a69e5fc9b4 - {}
open-webui | 2025-04-08 15:58:33.951 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 100.70.207.127:0 - "POST /api/v1/knowledge/c939aaec-f3ef-4cf9-a043-04a69e5fc9b4/file/add HTTP/1.1" 200 - {}

Additional Information

No response

Originally created by @Sky-creates on GitHub (Apr 8, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/12613 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.2 ### Ollama Version (if applicable) _No response_ ### Operating System Debian ### Browser (if applicable) Chrome ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior I have encountered an issue with Mistral OCR's PDF parsing functionality when used within the knowledge base component. When processing the same PDF document: 1. **Mistral OCR in knowledge base**: Produces incomplete extraction, significantly shorter than expected 2. **Tika with the same document**: Successfully extracts the complete content 3. **Mistral Chat with the same document**: Successfully parses the PDF without truncation issues This suggests the issue may be specific to how Mistral OCR is implemented within the knowledge base integration. Technical details: - Document tested: https://www.nature.com/articles/s41586-025-08725-5.pdf - Observed behavior: Approximately 40% of content extracted compared to Tika - Expected behavior: Complete extraction of document text content Is there a known limitation in how Open WebUI implements the Mistral API for knowledge base document processing? Are there configuration parameters that need adjustment to enable complete document parsing? ### Actual Behavior **Mistral OCR in knowledge base**: Produces incomplete extraction, significantly shorter than expected ### Steps to Reproduce 1. Set Document, Content Extraction Engine to Mistral OCR 2. Go to Workspace, Knowledge base, open any knowledge base 3. Upload the pdf and check the parsed document ### Logs & Screenshots open-webui | 2025-04-08 15:58:12.929 | INFO | open_webui.routers.files:upload_file:88 - file.content_type: application/pdf - {} open-webui | 2025-04-08 15:58:12.950 | INFO | open_webui.retrieval.loaders.mistral:_upload_file:59 - Uploading file to Mistral API - {} open-webui | 2025-04-08 15:58:15.416 | INFO | open_webui.retrieval.loaders.mistral:_upload_file:78 - File uploaded successfully. File ID: c412a12e-6bb7-498f-84d5-05135671dc83 - {} open-webui | 2025-04-08 15:58:15.417 | INFO | open_webui.retrieval.loaders.mistral:_get_signed_url:86 - Getting signed URL for file ID: c412a12e-6bb7-498f-84d5-05135671dc83 - {} open-webui | 2025-04-08 15:58:15.887 | INFO | open_webui.retrieval.loaders.mistral:_get_signed_url:97 - Signed URL received. - {} open-webui | 2025-04-08 15:58:15.887 | INFO | open_webui.retrieval.loaders.mistral:_process_ocr:105 - Processing OCR via Mistral API - {} open-webui | 2025-04-08 15:58:21.559 | INFO | open_webui.retrieval.loaders.mistral:_process_ocr:124 - OCR processing done. - {} open-webui | 2025-04-08 15:58:21.560 | INFO | open_webui.retrieval.loaders.mistral:_delete_file:133 - Deleting uploaded file ID: c412a12e-6bb7-498f-84d5-05135671dc83 - {} open-webui | 2025-04-08 15:58:21.979 | INFO | open_webui.retrieval.loaders.mistral:_delete_file:142 - File deleted successfully: {'id': 'c412a12e-6bb7-498f-84d5-05135671dc83', 'object': 'file', 'deleted': True} - {} open-webui | 2025-04-08 15:58:22.043 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:811 - save_docs_to_vector_db: document s41586-025-08725-5-test2.pdf file-1ea98d0f-06e4-4f16-aabc-dd77fca5d28a - {} open-webui | 2025-04-08 15:58:22.068 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:894 - adding to collection file-1ea98d0f-06e4-4f16-aabc-dd77fca5d28a - {} open-webui | 2025-04-08 15:58:28.314 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 100.70.207.127:0 - "POST /api/v1/files/ HTTP/1.1" 200 - {} open-webui | 2025-04-08 15:58:28.416 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:811 - save_docs_to_vector_db: document s41586-025-08725-5-test2.pdf c939aaec-f3ef-4cf9-a043-04a69e5fc9b4 - {} open-webui | 2025-04-08 15:58:28.437 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:883 - collection c939aaec-f3ef-4cf9-a043-04a69e5fc9b4 already exists - {} open-webui | 2025-04-08 15:58:28.437 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:894 - adding to collection c939aaec-f3ef-4cf9-a043-04a69e5fc9b4 - {} open-webui | 2025-04-08 15:58:33.951 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 100.70.207.127:0 - "POST /api/v1/knowledge/c939aaec-f3ef-4cf9-a043-04a69e5fc9b4/file/add HTTP/1.1" 200 - {} ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-19 22:32:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16658