File search vs code interpreter (PDF Text)


I would like to know whetherwhether to use the code interpreter or the file search feature when using assistants (GPT 4 and GPT 4o).

The use case is to create a text output based on strict instructions and some examples and guidelines from PDF documents I will upload.

Thanks in advance!

I’m also curious to know the difference between both spaces for file uploads. Is prompting better to do in code interpreter?

If the data in the PDF document is something the assistant needs to selectively search for, I’d recommend you use the file search tool.

If the data in the PDF document is something you expect the assistant to always be aware of, I’d recommend you take the contents of the document and add it to the Assistant’s instructions.

Code interpreter should generally be used for tabular data that needs to be mathematically analyzed or graphed (though there are some other valid use cases).

Thanks! The data in the PDFs is over the 8.000 word character limit for the instructions.

If you really want to make every assistant usage expensive, you can place the remaining text in “additional_instructions” with each run.

You can even then program turning on and off the part of the plain text that is not needed all the time. A UI checkbox “include training examples” “guideline documents” that can be per-run and even reset to force the minimum unless required.

When using Beta v2 by API header you can create or modify your assistant with more text:


The system instructions that the assistant uses. The maximum length is 256,000 characters.