Skip to content

VectorStoreRAG demo with Azure AI Search, my implementation fails because IVectorSearch<T> doesn't know how to generate embeddings #11878

Answered by westey-m
godefroi asked this question in Q&A
Discussion options

You must be logged in to vote

@godefroi, firstly on adding the embedding generator during DI. If you register an IEmbeddingGenerator before you register your record collection, the IEmbeddingGenerator will automatically be added to your options.
See https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Connectors/Connectors.Memory.AzureAISearch/AzureAISearchServiceCollectionExtensions.cs#L140

You of course also don't have to use the DI registration helper methods we provide and can easily do something like the following yourself if you want to further customize the registration. There's no secret source in our registration helpers, they are just convenience methods.

        services.AddKeyedSingleton<IVect…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@godefroi
Comment options

@westey-m
Comment options

westey-m May 7, 2025
Collaborator

Answer selected by godefroi
@godefroi
Comment options

@westey-m
Comment options

westey-m May 7, 2025
Collaborator

@westey-m
Comment options

westey-m May 9, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
.NET Issue or Pull requests regarding .NET code
3 participants