Skip to content

Python: Bug: BadRequestError for AzureTextEmbedding with text-embedding-ada-002 model #12895

@amal-sukumaran

Description

@amal-sukumaran

Describe the bug
While using the new VectorStoreField in combination with AzureAISearchCollection for performing hybrid/vector search on an existing index, if i pass the embedding generator as the text-embedding-ada-002 model, then the search is getting a BadRequestError (This model does not support specifying dimensions )

Expected behavior
The search should happen irrespective of the model chosen.

Screenshots
Error Recieved:

Image

Function triggering the error from semantic kernel:

Image

Platform

  • Language: Python
  • Source: Semantic Kernel version 1.35
  • AI model: text-embedding-ada-002 for embeddings
  • IDE: VS Code
  • OS: Mac

Additional context
The most probable reason is that the specific model doesn't support specifying dimensions. But the _generate_vector_from_values function in vector.py automatically sets the dimension from the data model described

Metadata

Metadata

Labels

bugSomething isn't workingmemorypythonPull requests for the Python Semantic Kernel

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions