Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"I'm sorry, but I can't assist with that." markdown response when using is_formatting_instructions=True for PDFs #535

Open
cholley6 opened this issue Dec 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cholley6
Copy link

cholley6 commented Dec 6, 2024

Describe the bug
Some PDF pages are returning "I'm sorry, but I can't assist with that" as the only response for markdown when using is_formatting instructions = True. We've seen this with multiple PDF files, and can't figure out the pattern that causes this. I believe this is an openAI error response of some sort.

I would also expect this to be considered a failure, whereas right now no error is returned.

We only see it in markdown results when using some input for formatting instructions.

Files
llama_bad_response.pdf
context from:
Noise Levels.pdf

Job ID
0aba7cc3-7ffd-4e68-bcd7-c1ba3f84eddd

Client:

  • Python Library
  • Frontend (cloud.llamaindex.ai)

Additional context
I first noticed the issue during the openAI outage on Dec, 4 2024: https://status.openai.com/

I've reproduced this in the Python Library as well as in the web UI.
Python sample code

LLAMA_PARSE_INSTRUCTIONS = (
    "This is a regulatory document. Do not remove, change, or add any language or text."
)
....
                parser = LlamaParse(
                    api_key=LLAMA_CLOUD_API_KEY,
                    result_type=ResultType.MD,
                    verbose=True,
                    show_progress=True,
                    parsing_instruction=LLAMA_PARSE_INSTRUCTIONS,
                    is_formatting_instruction=True,
                    ignore_errors=False,
                )

                docs = await parser.aload_data(pdf_path)
                text = "\n\n".join([doc.get_text() for doc in docs])
                return text

Note that ignore_errors=False here and there were no errors raised for this issue.

@cholley6 cholley6 added the bug Something isn't working label Dec 6, 2024
@cholley6 cholley6 changed the title "I'm sorry, but I can't assist with that." markdown response when using is_formatting_instructions=True "I'm sorry, but I can't assist with that." markdown response when using is_formatting_instructions=True for PDFs Dec 6, 2024
@cholley6
Copy link
Author

cholley6 commented Dec 9, 2024

I can't find a workaround for this using the python library. In the UI, if the formatting instructions are false, there's no issue. But in the python lib, even when is_formatting_instructions are False, the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant