Semantic Configuration Error in Javascript Azure AI Search SDK

Riteesh 0 Reputation points
2024-07-19T07:15:37.1766667+00:00

In my Nodejs application, I'm trying to initialize an index with semantic search, and then reference it with a semantic search query. I am able to successfully initialize the index with semantic configurations, but when I go to use that configuration in the search query, I keep getting this error:

"The parameter 'semanticConfiguration' must not be empty. Alternatively, set a default semantic configuration for this index.\r\nParameter name: semanticConfiguration"

I have defined the semanticConfiguration in the options of the 'search' method I'm using on SearchClient, and have confirmed that the semantic configuration is also present in the index I create. But I keep getting this error. I am currently on the semantic ranker free trial version.

Any help would be appreciated, here is a snippet of the part giving me an error - the app works fine while using queryType: "full" or "simple", but this is not what I want.

Thanks

const searchResults = await searchClient.search(userInput, {
            filter,
            queryType: "semantic",
            queryLanguage: "en-us",
            querySpeller: "lexicon",
            semanticConfiguration: "default-config",
            top: 3
        });

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,062 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.