Make sure assistant answers questions ONLY from vector store

I have 2 questions:

  • Can I force the assistant to return answers based on vector store files? I have tried to set the temperature to 0 and specify in the instructions that it should answer only from vector store files. If I ask it regarding a different context, it still answers my question.
  • Can I specify to hide references in response? I don’t want it to include references.

The first topic was already asked in 2023, but there is no answer. Since then, many things changed. Maybe there is a way to achieve this now.


Unfortunately no. Your assistant will try and find the data from your vector store, but it can also respond without that if it returns no data.

Setting it to 0 Temp does nothing to this effect.

Well, you could format the response before its shown to the user. The references usually come back in a structured way, and you could hide it, or remove it before showing it to the user.

The only way you can achieve the first and second is to use an external vector store (Eg: PineCone). In this scenario, you will still use Assistants, but you would have some code that does a check on your external PineCone for a match (say >90% probability), and if no data, then dont set the instruction with this data.

Does this help? Do you need any more information? I’m online for the rest of the day.

Hi there – you should be able to use the tool_choice param to force the use of the file_search tool

1 Like