Unexpected internal error when creating vector index in CosmosDB for MongoDB V core.

Junheok Cheon 40 Reputation points
2024-12-20T10:06:34.9466667+00:00

Hello,
For the context, I will briefly explain what I have right now.

So, I have stored about 8000 documents in cosmos DB for mongo DB Vcore.
Currently working as free tier.

I have used Azure open ai service to create embedding for each documents using model called 'embedding-text-3-large'. So the embedding dimension is 3072 currently.

I am trying to create a vector index for this embedding field using mongo db CLI.

I ran a command provided here to create vector index.
However, I get the error: MongoServerError: [ActivityId=ef7ba639-09ba-4fdf-ac8e-df42246e1e88] An unexpected internal error has occurred.

When I ran a sample code where I just use a key that does not exist and set dimensions to 3, it would work just fine. Is this problem due to limitation of free tier? Or is there something that I am doing wrong?

Thanks.

db.runCommand({
    createIndexes: 'myContainer',
    indexes: [
      {
        name: 'vectorSearchIndexDev',
        key: {
          "embedding": "cosmosSearch"
        },
        cosmosSearchOptions: {
          kind: 'vector-ivf',
          numLists: 3,
          similarity: 'COS',
          dimensions: 3072
        }
      }
    ]
  });
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,453 questions
{count} votes

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.