@@ -5,14 +5,10 @@ import * as Core from '../core';
5
5
6
6
export class Rerank extends APIResource {
7
7
/**
8
- * Rank a list of documents according to their relevance to a query and your custom
9
- * instructions about how to prioritize retrievals. We evaluated the model on
10
- * instructions for recency, document type, source, and metadata, and it can
11
- * generalize to other instructions as well.
8
+ * Rank a list of documents according to their relevance to a query.
12
9
*
13
- * The total request cannot exceed 400,000 tokens. The combined length of the
14
- * query, instruction and any document with its metadata must not exceed 8,000
15
- * tokens. Email
10
+ * The total request cannot exceed 400,000 tokens. The combined length of any
11
+ * document, instruction and the query must not exceed 4,000 tokens. Email
16
12
17
13
* feedback or questions.
18
14
*/
@@ -56,14 +52,12 @@ export namespace RerankCreateResponse {
56
52
57
53
export interface RerankCreateParams {
58
54
/**
59
- * The texts to be reranked according to their relevance to the query and the
60
- * optional instruction
55
+ * The texts to be reranked according to their relevance to the query
61
56
*/
62
57
documents : Array < string > ;
63
58
64
59
/**
65
- * The version of the reranker to use. Currently, we just have
66
- * "ctxl-rerank-en-v1-instruct".
60
+ * The version of the reranker to use. Currently, we just have "v1".
67
61
*/
68
62
model : string ;
69
63
@@ -73,21 +67,19 @@ export interface RerankCreateParams {
73
67
query : string ;
74
68
75
69
/**
76
- * Instructions that the reranker references when ranking retrievals. We evaluated
77
- * the model on instructions for recency, document type, source, and metadata, and
78
- * it can generalize to other instructions as well. Note that we do not guarantee
79
- * that the reranker will follow these instructions exactly. Examples: "Prioritize
80
- * internal sales documents over market analysis reports. More recent documents
81
- * should be weighted higher. Enterprise portal content supersedes distributor
82
- * communications." and "Emphasize forecasts from top-tier investment banks. Recent
83
- * analysis should take precedence. Disregard aggregator sites and favor detailed
84
- * research notes over news summaries."
70
+ * Instructions that the reranker references when ranking retrievals. Note that we
71
+ * do not guarantee that the reranker will follow these instructions exactly.
72
+ * Examples: "Prioritize internal sales documents over market analysis reports.
73
+ * More recent documents should be weighted higher. Enterprise portal content
74
+ * supersedes distributor communications." and "Emphasize forecasts from top-tier
75
+ * investment banks. Recent analysis should take precedence. Disregard aggregator
76
+ * sites and favor detailed research notes over news summaries."
85
77
*/
86
78
instruction ?: string ;
87
79
88
80
/**
89
81
* Metadata for documents being passed to the reranker. Must be the same length as
90
- * the documents list. If a document does not have metadata, add an empty string.
82
+ * the documents list.
91
83
*/
92
84
metadata ?: Array < string > ;
93
85
0 commit comments