Merge multiple files for custom GPTs

I’m trying to build a custom GPT with multiple PDFs, my problem is I need not only the knowledge inside the documents, but the name of those files is critical for referencing.

I’ve extracted the text from those documents and merge it into a large “knowledge.txt” and tried to differenciate the original documents with this structure:

## {name of the document}


{document's content}


----------


## {name of onther the document}


{another document's content}


----------

I tried everything in the instructions (well, maybe everything not bc I didn’t solved it) but the GPT doesn’t return the name of the document correctly, I responds correctly, and gives the title of the section inside the document where it found the info, but not the document’s name

Any piece of advice?