Skip to content

Commit 52630aa

Browse files
committed
Add notation for chunk rescorer
1 parent 0ec5f46 commit 52630aa

File tree

4 files changed

+225
-17
lines changed

4 files changed

+225
-17
lines changed

output/schema/schema.json

Lines changed: 181 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_types/Retriever.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { Rescore } from '@global/search/_types/rescoring'
2424
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2525
import { Id, IndexName } from './common'
2626
import { QueryContainer } from './query_dsl/abstractions'
27+
import { ChunkRescorerChunkingSettings } from './mapping/ChunkingSettings'
2728

2829
/**
2930
* @variants container
@@ -150,10 +151,15 @@ export class TextSimilarityReranker extends RetrieverBase {
150151
rank_window_size?: integer
151152
/** Unique identifier of the inference endpoint created using the inference API. */
152153
inference_id?: string
153-
/** The text snippet used as the basis for similarity comparison */
154+
/** The text snippet used as the basis for similarity comparison. */
154155
inference_text: string
155-
/** The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text */
156+
/** The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text. */
156157
field: string
158+
/** Whether to rescore on only the best matching chunks.
159+
* @availability stack since=9.2.0 stability=experimental
160+
* @availability serverless stability=experimental
161+
*/
162+
chunk_rescorer?: ChunkRescorer
157163
}
158164

159165
export class RuleRetriever extends RetrieverBase {
@@ -166,3 +172,10 @@ export class RuleRetriever extends RetrieverBase {
166172
/** This value determines the size of the individual result set. */
167173
rank_window_size?: integer
168174
}
175+
176+
export class ChunkRescorer {
177+
/** The number of chunks per document to evaluate for reranking. */
178+
size?: integer,
179+
/** Chunking settings to apply */
180+
chunking_settings?: ChunkRescorerChunkingSettings
181+
}

0 commit comments

Comments
 (0)