Claude-sonnet 3 strange response - Receipt data extraction

I’ve followed the latest Community Hangout video with great interest, one of the presentation by @oleg was about parsing receipt image with Clause 3 Sonnet.

Describe the problem/error/question

I’ve recreated the workflow, however I got results that make no sense, not a single value is correct… So I’ve tested the same prompt using the Antropic chat with the same model and JSON schema and the results were perfect:
Antropic chat

n8n integration

What is the error message (if any)?

just garbage output

Please share your workflow

Share the output returned by the last node

see above.
Note that I’ve set the temperature to 0 but the results are bananas (literally)

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

I’m trying to do a similar routine and I had the same problem. In your case you are not sending the image to the model so it has to fill the json with example data (made up)

Add a promt to the LLM node: type user, image type (binary) and Image data field name “data” or whatever is in red letters on your binary input.

That made it work for me, except the model Claude3 returns two answers, one with the correct data and a second one with made up data. Maybe because it’s prompted twice by the node, don’t know. I’m trying to fix this in my routine right now.

thanks for looking into this, I made the change you suggested but made no difference:

Hi @diramazioni, this should now be fixed in the latest stable release(1.34.2). Could you please upgrade your instance and try again? :pray:

Hi Oleg!
I’ve tried, upgraded to latest stable 1.34.2, same bogus output, can you share your workflow maybe I’ve missed something obvious following your video?

sorry, I just forgot to set the chat messages, when I set them I got

what could it be?

I see the issue now if I use a “Read Files from disk” node it works!
Is the a Split out that outputs attachment_0 instead of data!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.