llm.ReRankResponse

Note:

The content in this help topic pertains to SuiteScript 2.1.

Object Description

The response returned by llm.reRank(options) or llm.reRank.promise(options).

Its ReRankResponse.documentRanks property contains results ordered by relevance. Each result identifies a document in the original input array. Its ReRankResponse.model property identifies the model used.

Supported Script Types

Server scripts

For more information, see SuiteScript 2.1 Script Types.

Module

N/llm Module

Methods and Properties

ReRankResponse Object Members

Since

2026.2

Syntax

Important:

The following code sample shows the syntax for this member. It isn't a functional example. For a complete script example, see N/llm Module Script Samples.

            // Add additional code
...

const response = llm.reRank({
    documents: ["Shipping information", "Return information"],
    prompt: "How do I return an item?"
});

const documentRanks = response.documentRanks;
const model = response.model;

...
// Add additional code 

          

Related Topics

General Notices