What to do with Generated Citations?

I am developing a PDF assistant which uses file_search. The problem is the AI keeps spitting out these citations in the form, “[3:0†source]”. They don’t really make sense and they would only confuse my users. I’ve tried to prevent the AI from generating these citations using instructions, but it continues to do so anyway.

First of all, can anyone make sense of these? If not, how can I either suppress them or force the AI to stop returning them?

EDIT

I just realized, there is an annotations array in the message response which gives the text location of the annotations. So theoretically, assuming they are accurate, I can link them up to a location in the PDF. I would still like to suppress annotations if possible.

Just tell him in instructions to not mention citations in his responses, and test the assistant to see if it works.

I tried instructions. The AI will included annotations less often but it still does it maybe 40% of the time.

I also went through that problem, and I was never able to solve it just with instructions in the assistant.

Since I use Python in my application, before displaying the text, I replace it to remove it:
clean_message = re.sub(r'【.*?】', '', assistant_response)

This replaces it with an empty string.

You have to handle the Citation Problem at your code level. There are plenty of posts regarding the same problem and no level of Prompting helps removing the citation to 100%. But like @joaquin.marroquin suggested, code will fix this for sure.