When I use a function from the tool, the retrieval feature isn't working

When I add a file and include a completely unrelated function to the file and topic, it disregards the file when answering my questions. However, if I only add the file without adding a function, it answers my questions based on the file content. I can’t understand if GPT is trying to take the easy way out."