Share via


SemanticSearchOptions interface

Defines options for semantic search queries

Properties

answers

If set, the query returns answers extracted from key passages in the highest ranked documents.

captions

If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to 'extractive', highlighting is enabled by default. Defaults to 'None'.

configurationName

The name of a semantic configuration that will be used when processing documents for queries of type semantic.

debugMode

Enables a debugging tool that can be used to further explore your search results.

errorMode

Allows the user to choose whether a semantic call should fail completely, or to return partial results (default).

maxWaitInMilliseconds

Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails.

queryRewrites

When QueryRewrites is set to generative, the query terms are sent to a generate model which will produce 10 (default) rewrites to help increase the recall of the request. Defaults to none.

semanticFields

The list of field names used for semantic search.

semanticQuery

Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase.

Property Details

answers

If set, the query returns answers extracted from key passages in the highest ranked documents.

answers?: ExtractiveQueryAnswer

Property Value

captions

If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to 'extractive', highlighting is enabled by default. Defaults to 'None'.

captions?: ExtractiveQueryCaption

Property Value

configurationName

The name of a semantic configuration that will be used when processing documents for queries of type semantic.

configurationName?: string

Property Value

string

debugMode

Enables a debugging tool that can be used to further explore your search results.

debugMode?: string

Property Value

string

errorMode

Allows the user to choose whether a semantic call should fail completely, or to return partial results (default).

errorMode?: "partial" | "fail"

Property Value

"partial" | "fail"

maxWaitInMilliseconds

Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails.

maxWaitInMilliseconds?: number

Property Value

number

queryRewrites

When QueryRewrites is set to generative, the query terms are sent to a generate model which will produce 10 (default) rewrites to help increase the recall of the request. Defaults to none.

queryRewrites?: GenerativeQueryRewrites

Property Value

semanticFields

The list of field names used for semantic search.

semanticFields?: string[]

Property Value

string[]

semanticQuery

Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase.

semanticQuery?: string

Property Value

string