I’m using the Azure AI Search Javascript SDK in my NodeJS app to create a RAG based chatbot. I am uploading data to Blob Storage, creating an index (confirmed to be configured with semantic configuration), and want to run a semantic search.
After defining the search client, I keep getting the following error:
RestError: The parameter ‘semanticConfiguration’ must not be empty. Alternatively, set a default semantic configuration for this index.
This is how I’m using it in the ‘search’ method of my searchClient:
const searchResults = await searchClient.search(userInput, {
queryType: “semantic”,
top: 3,
semanticConfiguration: “my-semantic-config”
})
This part of the code is also where I’m getting the error. Unless I’m using incorrect syntax, I don’t know why it would give this error if semanticConfiguration is as defined above. Any insight would be appreciated
Shaunak Karmarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.