Solved: OpenAI Assistant File/Document Disclosure: Stopping File Disclosure in Conversations

Please Remove if it’s not allowed.

When working with OpenAI Assistant APIs for File Search, sometimes Assistant slips away and reveals about the existence of Files or Document that you’ve uploaded.

As a developer creating Assistants using OpenAI, I never want the end user to know about the files or documents I’ve uploaded. If you are still confused about what I’m talking here, look at this below conversation I’m having with OpenAI Assistant:

I was able to fix this issue, to some extent using function calling:

here’s the schema:

{
  "name": "tell_purpose",
  "description": "Tells the purpose of the Assistant to the user when asked by the user. User can ask question like these: 'what is your purpose?', 'how can you help me?', 'what are you?, what is your job'",
  "parameters": {
    "type": "object",
    "properties": {
      "query": {
        "type": "string",
        "description": "Purpose asked by the end User"
      }
    },
    "required": [
      "query"
    ]
  }
}

After Implementing Function Calling:

If you want detailed step by step instruction, I’ve covered this in a LinkedIn post. Here’s the link: Solving OpenAI Assistant File/Document Disclosure: Stopping File Disclosure in Conversations

I hope by posting this am not breaking forum rules. I hope this helps people here.