LLamaReranker
Namespace: LLama
Get rank scores between prompt and documents
1 |
|
Inheritance Object → LLamaReranker
Implements IDisposable
Attributes NullableContextAttribute, NullableAttribute
Properties
EmbeddingSize
Dimension of embedding vectors
1 |
|
Property Value
Context
LLama Context
1 |
|
Property Value
Constructors
LLamaReranker(LLamaWeights, IContextParams, ILogger)
Create a new reranker, using the given LLamaWeights
1 |
|
Parameters
weights
LLamaWeights
params
IContextParams
logger
ILogger
Methods
Dispose()
1 |
|
GetRelevanceScores(String, IReadOnlyList<String>, Boolean, CancellationToken)
Retrieve relevance scores for input and documents by reranking, execute once.
1 |
|
Parameters
input
String
documents
IReadOnlyList<String>
normalize
Boolean
Whether to normalize the score to the range (0, 1)
cancellationToken
CancellationToken
Returns
Exceptions
GetRelevanceScoreWithTokenCount(String, String, Boolean, CancellationToken)
Retrieve relevance score for input and document by reranking
1 |
|
Parameters
input
String
document
String
normalize
Boolean
Whether to normalize the score to the range (0, 1)
cancellationToken
CancellationToken
Returns
Task<ValueTuple<Single, Int32>>