File_search - search nothing

Hi there! Please help me to understand what I’m doing wrong.

I have a txt file with IT documentation. File contains an answer for specific question - “What is Checkout?”. I expect that I’ll ask the model the question and the model will use my txt file as a context and answer it.

First - I’ve uploaded my txt file into vector database open AI and linked it with new assistant. I’s worked well. Model answered my specific question as I expected on Playground.

Second - I’ve created a python file that used assistant and vector db by id that I’ve created earlier. And file search always did not contain any matches. Then I’ve tried to create new assistant and new db every time when I’ve run the script.

How it works now:
Initializing assistant and vector store…
Created vector store with ID: vs_fhy3SU4h6x2Dg3pRd8gpGi68
File uploaded to vector store: VectorStoreFileBatch(id=‘vsfb_19d4b5d50174497cbab4df25cb8dc176’, created_at=1736523775, file_counts=FileCounts(cancelled=0, completed=1, failed=0, in_progress=0, total=1), object=‘vector_store.file_batch’, status=‘completed’, vector_store_id=‘vs_fhy3SU4h6x2Dg3pRd8gpGi68’)
Polling vector store status…
Vector store status (attempt 1): completed
Vector store is ready for use.
Checking vector store content…
Vector store content: VectorStore(id=‘vs_fhy3SU4h6x2Dg3pRd8gpGi68’, created_at=1736523770, file_counts=FileCounts(cancelled=0, completed=1, failed=0, in_progress=0, total=1), last_active_at=1736523771, metadata={}, name=‘ducat-doc’, object=‘vector_store’, status=‘completed’, usage_bytes=37410, expires_after=None, expires_at=None)
Created assistant with ID: asst_NrEyjoWTiZdIWFW1ivsKXtgn
Assistant linked to vector store.
Direct file search test…
Error during direct file search test: ‘VectorStores’ object has no attribute ‘search’
Querying using assistant…
Thread created: Thread(id=‘thread_SkXNkTsR454gt8KyzLvN17h7o’, created_at=1736523778, metadata={}, object=‘thread’, tool_resources=ToolResources(code_interpreter=None, file_search=None))
Run results: Run(id=‘run_F9Ky1m545fdgJREd1yVxzFJP’, assistant_id=‘asst_NrEyjoW45dIWFW1ivsKXtgn’, cancelled_at=None, completed_at=1736523784, created_at=1736523779, expires_at=None, failed_at=None, incomplete_details=None, instructions=‘You are a support assistant. Use the file_search tool to find relevant information from the provided documents.’, last_error=None, max_completion_tokens=None, max_prompt_tokens=None, metadata={}, model=‘gpt-4o’, object=‘thread.run’, parallel_tool_calls=True, required_action=None, response_format=‘auto’, started_at=1736523780, status=‘completed’, thread_id=‘thread_SkXNkTsRx4545gt8KyzLvN17h7o’, tool_choice=‘auto’, tools=[FileSearchTool(type=‘file_search’, file_search=FileSearch(max_num_results=None, ranking_options=FileSearchRankingOptions(score_threshold=0.0, ranker=‘default_2024_08_21’)))], truncation_strategy=TruncationStrategy(type=‘auto’, last_messages=None), usage=Usage(completion_tokens=91, prompt_tokens=11630, total_tokens=11721, prompt_token_details={‘cached_tokens’: 0}), temperature=1.0, top_p=1.0, tool_resources={})
File search tool content: FileSearchTool(type=‘file_search’, file_search=FileSearch(max_num_results=None, ranking_options=FileSearchRankingOptions(score_threshold=0.0, ranker=‘default_2024_08_21’)))
File search tool did not contain ‘matches’.

I’ve tried:

  1. Switch different models 4o,3.5 and etc.;
  2. Switch temperature option
  3. Switch text embedding model to “text-embedding-3-small” and " text -embedding -ada -002"