semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

Python: Bug: Python: Search results using vector is empty

Open Farhad-Heybati opened this issue 10 months ago • 2 comments

Describe the bug Runing the step_1_interact_with_the_collection.py, I can get some result with Search results using text but Search results using vector is empty: earch results using text: 25 (in Metairie, USA): Newly Redesigned Rooms & airport shuttle. Minutes from the airport, enjoy lakeside amenities, a resort-style pool & stylish new guestrooms with Internet TVs. (score: 3.8262758) 40 (in Scottsdale, USA): Only 8 miles from Downtown. On-site bar/restaurant, Free hot breakfast buffet, Free wireless internet, All non-smoking hotel. Only 15 miles from airport. (score: 3.66492) 21 (in Atlanta, USA): 1 Mile from the airport. Free WiFi, Outdoor Pool, Complimentary Airport Shuttle, 6 miles from Lake Lanier & 10 miles from downtown. Our business center includes printers, a copy machine, fax, and a work area. (score: 3.2264395) Search results using vector:

When I verify in Azure AI Search, my index, hotels-sample-index has 50 documents, 561.42 KB of total storage but Vector index quota usage is 0.

Can you confirme that vectorization in Azure AI Search works for hotels-sample dataset? To Reproduce Steps to reproduce the behavior:

  1. Follow the instructions in python\samples\concepts\memory\azure_ai_search_hotel_samples\README.md
  2. Run python\samples\concepts\memory\azure_ai_search_hotel_samples\step_1_interact_with_the_collection.py

Expected behavior Return 2 set of results:

  1. based on text search
  2. based on the vector search

Screenshots If applicable, add screenshots to help explain your problem.

Platform

  • Language: [Python]
  • Source: [main branch of repository]
  • AI model: [e.g. OpenAI:GPT-4o-mini(2024-07-18)]
  • IDE: [VS Code]
  • OS: [Windows]

Additional context Add any other context about the problem here.

Farhad-Heybati avatar Apr 17 '25 17:04 Farhad-Heybati

Hi @Farhad-Heybati, when you inspect your index in the portal, can you confirm that you do see vectors for description_vector?

moonbox3 avatar Apr 18 '25 07:04 moonbox3

Hello, yes the vector for description_vector is present. I add some screen shot.

hotel vector.docx

There was also an issue with size of the vector: 3072 instead of 1536

I found the same issue described here: https://learn.microsoft.com/en-au/answers/questions/2101167/azure-ai-search-adding-a-vector-field-returns-empt

Farhad-Heybati avatar Apr 18 '25 08:04 Farhad-Heybati

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Jul 22 '25 02:07 github-actions[bot]