Unknown model: text-embedding-ada-002 and no such file and directory C:\\clientsearch\\assets\\intent_mapping.prompty

Working on Azure AI project 5 Reputation points
2025-02-17T11:55:48.9566667+00:00

S C:\clientsearch> python create_search_index.py

🗑️ Found existing index named 'example-index', and deleted it

Traceback (most recent call last):

https://learn.microsoft.com/en-gb/azure/ai-studio/tutorials/copilot-sdk-build-rag

Unclear and wrong instructions

File "C:\clientsearch\create_search_index.py", line 199, in <module>

create_index_from_csv(index_name, csv_file)

File "C:\clientsearch\create_search_index.py", line 169, in create_index_from_csv

docs = create_docs_from_csv(path=csv_file, content_column="description", model=os.environ["EMBEDDINGS_MODEL"])

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\clientsearch\create_search_index.py", line 141, in create_docs_from_csv

emb = embeddings.embed(input=content, model=model)

      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\sanja\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\tracing\decorator.py", line 105, in wrapper_use_tracer

return func(*args, **kwargs)

       ^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\sanja\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\ai\inference_patch.py", line 1035, in embed

raise HttpResponseError(response=response)

azure.core.exceptions.HttpResponseError: (unknown_model) Unknown model: text-embedding-ada-002

Code: unknown_model

Message: Unknown model: text-embedding-ada-002

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,222 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Alekhya Vaddepally 0 Reputation points Microsoft External Staff
    2025-03-07T11:53:53.41+00:00

    Hi Working on Azure AI project,

    It seems like the error message you are facing indicates that the model text-embedding-ada-002 is not recognized.

    This could be due to a few reasons:

    The model's name text-embedding-ada-002 might not be available or supported in your current environment, this could happen due to Azure OpenAI resource is not deployed in your model or not available, if it is not deployed you need to deploy them, and also if you are using OpenAI’s API, make sure your API key is valid and has access to embedding models, and also check you are using correct API versions when you are making request to Azure OpenAI service.

    Check the environment variable EMBEDDINGS_MODEL is correctly set to text-embedding-ada-002. If it is not correct or is set to an incorrect value, this may know as unknown model error, and also you can try another embedding model (like text-embedding-3-small or a newer available option).

    Check if the model is available in the region where your Azure OpenAI resource is deployed. if not, the model may be not accessible to specific region

    https://learn.microsoft.com/en-us/azure/ai-services/openai/tutorials/embeddings?tabs=python-new%2Ccommand-line&pivots=programming-language-powershell

    https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/legacy-models#embedding-models

    https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal

    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    Let me know if you have any further Queries.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.