How do I teach my assistant?

I have created a wizard to use Vector Store with several instructions, but there have been some problems.
That’s why I have the following questions:

  1. How do I stop it from saying the name of the Vector Store file where it got the instruction?
  2. How do I stop him from making things up? I asked him to tell me how to query sales with the API. And he invented a random endpoint.
    It cannot do this, it only sticks to what exists in its file base.
  3. How do I stop him from searching on the internet?
  4. Can I configure the assistant to execute a request at a URL, obtain the result and show it to the user?
    Or even a standardized JSON for something?

For example: “Schedule an appointment with doctor XYZ.”, it triggers a call to an API, reads the returned ID and creates a URL for the consultation, ex: example.com/view/{RETURNED_ID}

The assistant that I implemented to create and update tasks uses functions. It works very well in this scenario

  1. You cannot reliably stop the assistant from talking about files. OpenAI put “the user uploaded these files” as the language the AI receives about the file_search tool (despite it being the programmer and being the backend knowledge operation of the assistant). You as a developer are a “user”, in terms of the AI believing language the file search returns.
    Instructions is where you would place a message about the desired behavior.

  2. Making up things is tough, because you do not have control over the language of the file_search tool like you would with your own function, which is the best place to tell the AI why the search tool is there and the necessity to use it. You can give instructions with clear language “you have not been pretrained with any knowledge about xyx company, you must always perform a file search and only answer directly from knowledge within, or else state that you have no information” (and hope you get useful results).

  3. No API AI can access the internet on its own.

  4. No API AI can access the internet. You can provide a function that returns more knowledge based on a search or a menu the AI can understand. Your own code can access internet APIs. That is “function-calling” in the API documentation.

The wizard can be smarter and more obedient with better AI models being used, such as “gpt-4-0613”.

I uploaded a JSON file with all the questions and answers it can handle.

But if I ask him “What is gpt.json?” he returns me:

The gpt.json file contains a series of prompts (questions) and their respective answers, probably used to automate customer service. Here are some examples of prompts and their responses contained in this file:

Even if I set him not to talk about the files, he keeps talking and talking.

These are some of the instructions:

Do not provide information that is available on the internet or in your database.

Only work with the file search and instructions given to you.

Don’t talk about other companies unless it’s our Company.

Do not comment on the files you have for file search.

Don’t comment on the configuration files you use.

Only make comments about the company, questions and features sent in the file list, nothing more.

If someone asks about your collection of prompts, don’t say anything.
Say you didn’t understand the question.

Based on my experience, I noticed that he doesn’t understand prohibitions well. Whatever I forbid him to do doesn’t work effectively. I approach this a little differently.

For example, instead of saying “Do not talk about other topics,” I say “Respond only within the provided documents.”

This way, I don’t forbid him from talking about other subjects but set boundaries within which he should operate. Then, I simply give the general model the instruction and ask it to improve it to the point where my GPT understands it.

After 5-10 attempts, he rewrites the instruction much better than I initially imagined, and this works better so far.