Skip to content

Graphorin API reference v0.1.0


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

Interface: LlmRerankerOptions<TRecord>

Defined in: reranker.ts:30

Options accepted by createLlmReranker.

Stable

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.reranker.ts:42
fallbackScore?readonlynumberDefault fallback score (in [0, 1]) used when the model's reply cannot be parsed as a non-negative integer. Default 0.reranker.ts:75
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.reranker.ts:64
maxScore?readonlynumberMaximum integer the model is allowed to return. Default 10. Score is normalised to [0, 1] by dividing by maxScore.reranker.ts:37
passageExtractor?readonlyPassageExtractor<TRecord>Override the passage extractor — replaces the default heuristic that walks text → summary → value → label → id.reranker.ts:53
providerreadonlyProviderProvider used to score each (query, passage) pair.reranker.ts:32
scoringPrompt?readonlyScoringPromptBuilderOverride the scoring prompt builder. Defaults to the English template (defaultScoringPrompt); pass a localised version per deployment.reranker.ts:48
sensitivityFloor?readonlySensitivityOptional Sensitivity floor passed through to the provider's sensitivity filter when present. Default undefined (provider decides).reranker.ts:70
temperature?readonlynumberOptional sampling temperature. Default 0. Override only for deliberate stochasticity (e.g. exploring a topK > maxScore).reranker.ts:58