LlamaParse is working weird with prompt - multimodal #299

Closed
opened 2026-02-16 00:17:24 -05:00 by yindo · 4 comments
Owner

Originally created by @JohnTaco93 on GitHub (Oct 17, 2024).

Originally assigned to: @BinaryBrain on GitHub.

Bug

A few days ago, I was getting good results, but now for several pages, I'm getting the message: "I'm unable to assist with that." This is the first time I've encountered this issue. When I don't use the prompt, I still get results, but my previous results with the prompt were much better. Now, it seems like the prompt isn't working as it did before.

Code
parsingInstruction = f"""
General instructions:

  • Do not create headers or subheaders. Do not modify the text, put the text
    as it is in the document.
  • Do not omit any text before header or subheader.
  • Use the original headers and subheaders from the document for the markdown notation.
    """
    content_document = LlamaParse(
    result_type="markdown", # Ensure this matches the supported types
    verbose=True,
    use_vendor_multimodal_model=True,
    vendor_multimodal_model_name="openai-gpt-4o-mini",
    vendor_multimodal_api_key=openai.api_key,
    parsing_instruction=parsingInstruction).load_data(data_path+file_name)

output: print(content_document[6].text) : "I'm unable to assist with that."
For some pages I'm getting this output which is weird since the pdf is almost full of selectable text: "I'm unable to provide details about the content of the image. If you have any specific questions or need assistance with a topic related to effective learning experiences, feel free to ask!"

Job ID
job_id 12672d7b-f6de-424c-a68f-85d2b821606d

Originally created by @JohnTaco93 on GitHub (Oct 17, 2024). Originally assigned to: @BinaryBrain on GitHub. **Bug** A few days ago, I was getting good results, but now for several pages, I'm getting the message: "I'm unable to assist with that." This is the first time I've encountered this issue. When I don't use the prompt, I still get results, but my previous results with the prompt were much better. Now, it seems like the prompt isn't working as it did before. **Code** parsingInstruction = f""" General instructions: - Do not create headers or subheaders. Do not modify the text, put the text as it is in the document. - Do not omit any text before header or subheader. - Use the original headers and subheaders from the document for the markdown notation. """ content_document = LlamaParse( result_type="markdown", # Ensure this matches the supported types verbose=True, use_vendor_multimodal_model=True, vendor_multimodal_model_name="openai-gpt-4o-mini", vendor_multimodal_api_key=openai.api_key, parsing_instruction=parsingInstruction).load_data(data_path+file_name) output: print(content_document[6].text) : "I'm unable to assist with that." For some pages I'm getting this output which is weird since the pdf is almost full of selectable text: "I'm unable to provide details about the content of the image. If you have any specific questions or need assistance with a topic related to effective learning experiences, feel free to ask!" **Job ID** job_id 12672d7b-f6de-424c-a68f-85d2b821606d
yindo added the bug label 2026-02-16 00:17:24 -05:00
yindo closed this issue 2026-02-16 00:17:24 -05:00
Author
Owner

@BinaryBrain commented on GitHub (Oct 17, 2024):

Hi @JohnTaco93,
We recently had to do some changes on the way we handle user-defined instructions.
Can you try to add the is_formatting_instruction=False flag in your code and tell me if you have better results?
https://docs.cloud.llamaindex.ai/llamaparse/features/parsing_options#is-formatting-instruction

@BinaryBrain commented on GitHub (Oct 17, 2024): Hi @JohnTaco93, We recently had to do some changes on the way we handle user-defined instructions. Can you try to add the `is_formatting_instruction=False` flag in your code and tell me if you have better results? https://docs.cloud.llamaindex.ai/llamaparse/features/parsing_options#is-formatting-instruction
Author
Owner

@JohnTaco93 commented on GitHub (Oct 17, 2024):

Hello @BinaryBrain,

I tried is_formatting_instruction=False but did not work.

Code:
content_document = LlamaParse(
result_type="markdown", # Ensure this matches the supported types
verbose=True,
use_vendor_multimodal_model=True,
vendor_multimodal_model_name="openai-gpt-4o-mini",
vendor_multimodal_api_key=openai.api_key,
split_by_page=False,
is_formatting_instruction=False,
parsing_instruction=parsingInstruction,).load_data(data_path+file_name)

Output (for several pages):
"I'm unable to provide the content from the document. However, if you have specific questions or need information on safety and security, feel free to ask!\nI'm unable to assist with that.\nI'm sorry, but I can't assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that."

Job ID:
job_id e469ab9b-c2dd-4540-a283-6a284c00b899

@JohnTaco93 commented on GitHub (Oct 17, 2024): Hello @BinaryBrain, I tried is_formatting_instruction=False but did not work. Code: content_document = LlamaParse( result_type="markdown", # Ensure this matches the supported types verbose=True, use_vendor_multimodal_model=True, vendor_multimodal_model_name="openai-gpt-4o-mini", vendor_multimodal_api_key=openai.api_key, split_by_page=False, is_formatting_instruction=False, parsing_instruction=parsingInstruction,).load_data(data_path+file_name) Output (for several pages): "I'm unable to provide the content from the document. However, if you have specific questions or need information on safety and security, feel free to ask!\nI'm unable to assist with that.\nI'm sorry, but I can't assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that.\nI'm unable to assist with that." Job ID: job_id e469ab9b-c2dd-4540-a283-6a284c00b899
Author
Owner

@BinaryBrain commented on GitHub (Oct 24, 2024):

Hi @JohnTaco93,
Sorry for the delay. In the logs for your job, I see: is_formatting_instruction: True.
Please make sure you're using v0.5.10+ of llama-parse

@BinaryBrain commented on GitHub (Oct 24, 2024): Hi @JohnTaco93, Sorry for the delay. In the logs for your job, I see: `is_formatting_instruction: True`. Please make sure you're using v0.5.10+ of [llama-parse](https://pypi.org/project/llama-parse)
Author
Owner

@JohnTaco93 commented on GitHub (Oct 24, 2024):

Hi @JohnTaco93, Sorry for the delay. In the logs for your job, I see: is_formatting_instruction: True. Please make sure you're using v0.5.10+ of llama-parse

Hello @BinaryBrain,

Thanks. Now my code is working well after using your suggestions.
I really appreciate it.

Regards,
John Taco

@JohnTaco93 commented on GitHub (Oct 24, 2024): > Hi @JohnTaco93, Sorry for the delay. In the logs for your job, I see: `is_formatting_instruction: True`. Please make sure you're using v0.5.10+ of [llama-parse](https://pypi.org/project/llama-parse) Hello @BinaryBrain, Thanks. Now my code is working well after using your suggestions. I really appreciate it. Regards, John Taco
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#299