[GH-ISSUE #9979] Vision models: regex sometimes doesn't catch file name from prompt #68594

Open
opened 2026-05-04 14:33:30 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @RicoElectrico on GitHub (Mar 25, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9979

What is the issue?

The regex at ce929984a3/cmd/interactive.go (L513) doesn't like some characters like : in the prompt. See the console output below for 2 examples

Relevant log output

michal@t480s:~$ ollama run llama3.2-vision:11b "From this menu card photo extract data in CSV format. Do not translate them. Remember about proper quotation for the output format. Columns: 1) name of the position 2) its category 3) ingredients and/or description 4) price (number without currency. /home/michal/Downloads/menu_card.jpg"
However, I don't see a menu card^C

# Let's try removing some characters. Now it works :)

michal@t480s:~$ ollama run llama3.2-vision:11b "From this menu card photo extract data in CSV format. Do not translate them. Remember about proper quotation for the output format. Columns should be 1. name of the position 2. its category 3. ingredients, description or both 4. price - number without currency. /home/michal/Downloads/menu_card.jpg"
Added image '/home/michal/Downloads/menu_card.jpg'
Here is the extracted data from the menu card photo in CSV format:

"position","category","ingredients, description or both","price"
"Siciliana",Pizza,"pomodoro, mozzarella cubetti, cebula, peperoncino","36"
"Margherita",Pizza,"pomodoro, mozzarella cubetti, oregano","36"
"Vegetariana",Pizza,"pomodoro, mozzarella cubetti, cebula, peperoncino","38"
"Cotto",Pizza,"pomodoro, mozzarella cubetti, cebula, oregano","38"
"Inferno",Pizza,"pomodoro, mozzarella cubetti, swieże piepko^C

OS

Linux

GPU

Other

CPU

Intel

Ollama version

0.6.0

Originally created by @RicoElectrico on GitHub (Mar 25, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9979 ### What is the issue? The regex at https://github.com/ollama/ollama/blob/ce929984a33230269905e0e3cfa335cb8d6ba781/cmd/interactive.go#L513 doesn't like some characters like `:` in the prompt. See the console output below for 2 examples ### Relevant log output ```shell michal@t480s:~$ ollama run llama3.2-vision:11b "From this menu card photo extract data in CSV format. Do not translate them. Remember about proper quotation for the output format. Columns: 1) name of the position 2) its category 3) ingredients and/or description 4) price (number without currency. /home/michal/Downloads/menu_card.jpg" However, I don't see a menu card^C # Let's try removing some characters. Now it works :) michal@t480s:~$ ollama run llama3.2-vision:11b "From this menu card photo extract data in CSV format. Do not translate them. Remember about proper quotation for the output format. Columns should be 1. name of the position 2. its category 3. ingredients, description or both 4. price - number without currency. /home/michal/Downloads/menu_card.jpg" Added image '/home/michal/Downloads/menu_card.jpg' Here is the extracted data from the menu card photo in CSV format: "position","category","ingredients, description or both","price" "Siciliana",Pizza,"pomodoro, mozzarella cubetti, cebula, peperoncino","36" "Margherita",Pizza,"pomodoro, mozzarella cubetti, oregano","36" "Vegetariana",Pizza,"pomodoro, mozzarella cubetti, cebula, peperoncino","38" "Cotto",Pizza,"pomodoro, mozzarella cubetti, cebula, oregano","38" "Inferno",Pizza,"pomodoro, mozzarella cubetti, swieże piepko^C ``` ### OS Linux ### GPU Other ### CPU Intel ### Ollama version 0.6.0
GiteaMirror added the bug label 2026-05-04 14:33:30 -05:00
Author
Owner

@rick-github commented on GitHub (Mar 25, 2025):

The "/" in "and/or" is detected as the start of a (technically valid) path "/or description 4) price (number without currency. /home/michal/Downloads/menu_card.jpg".

<!-- gh-comment-id:2751075898 --> @rick-github commented on GitHub (Mar 25, 2025): The "/" in "and/or" is detected as the start of a (technically valid) path "/or description 4) price (number without currency. /home/michal/Downloads/menu_card.jpg".
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#68594