Non string tool message content is not supported in local AI RAG

Not for all documents, primarily PDFs, what may be causing the error and how can I fix it? Looking online it says that RAG can only work with text and somehow the workflow have imported non-text data.

1 Like

Did you check the output of the RAG pipeline to see what was extracted from the PDFs? If something is wrong in your workflow where it isn’t routing to the node specifically to extract from PDF documents, that’ll cause “garbage” data to get put in the database. You could also check the contents of the documents table to see if anything looks off!

Would images in the PDF cause this kind of issue. I noticed your were always using text files in your testing.

It could be! But I have worked with PDFs with this before and it works fine, as long as you are using the version with the extract from PDF node.

Could you see what the output is from the tool that isn’t a string?