Ask

The SDK provides a straightforward method to generate default questions for any given Index. This feature uses the underlying protocol to automatically produce high-quality questions based on the necessary information associated with the Index.

Generate questions using SDK

To generate default questions for an Index, you can use the getDefaultQuestionsOfIndex method provided by the SDK.

This method simplifies the process of obtaining contextually relevant questions for an Index, enhancing user interaction and engagement.

const indexId = "kj234...b83";

const questions = await indexClient.generateQuestionsForIndex(indexId)

// response: ["question1", "question2" ... ]

Last updated