Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/reranker-llm / / LlmRerankerOptions

Interface: LlmRerankerOptions<TRecord> ​

Defined in: src/reranker.ts:63

Stable

Options accepted by createLlmReranker.

Type Parameters ​

Type ParameterDefault type
TRecord extends MemoryRecordMemoryRecord

Properties ​

PropertyModifierTypeDescriptionDefined in
batchSize?readonlynumberConcurrent provider calls per batch. Default 5. Larger values improve throughput at the cost of provider rate-limit pressure.src/reranker.ts:75
fallbackScore?readonlynumberDefault fallback score (in [0, 1]) used when the model's reply cannot be parsed as a non-negative integer. Default 0.src/reranker.ts:108
maxOutputTokens?readonlynumberOptional max-tokens hint for the integer-only output. Default 8 - large enough for multi-digit maxScore values, small enough to fail-fast if the model drifts into a verbose response.src/reranker.ts:97
maxScore?readonlynumberMaximum integer the model is allowed to return. Default 10. Score is normalised to [0, 1] by dividing by maxScore.src/reranker.ts:70
passageExtractor?readonlyPassageExtractor<TRecord>Override the passage extractor - replaces the default heuristic that walks text → summary → value → label → id.src/reranker.ts:86
providerreadonlyProviderProvider used to score each (query, passage) pair.src/reranker.ts:65
scoringPrompt?readonlyScoringPromptBuilderOverride the scoring prompt builder. Defaults to the English template (defaultScoringPrompt); pass a localised version per deployment.src/reranker.ts:81
sensitivityFloor?readonlySensitivityOptional Sensitivity floor passed through to the provider's sensitivity filter when present. Default undefined (provider decides).src/reranker.ts:103
temperature?readonlynumberOptional sampling temperature. Default 0. Override only for deliberate stochasticity (e.g. exploring a topK > maxScore).src/reranker.ts:91