Package com.sap.ai.sdk.grounding.model
Class MergeStrategyScoreReuse
java.lang.Object
com.sap.ai.sdk.grounding.model.MergeStrategyScoreReuse
- All Implemented Interfaces:
RetrievalSearchInputPostProcessingInnerStrategy,Strategy
public class MergeStrategyScoreReuse
extends Object
implements RetrievalSearchInputPostProcessingInnerStrategy, Strategy
The MergeStrategyScoreReuse merges the given PerFilterSearchResult instances according to the
scores returned by the downstream retrieval process. It is important that the scores are
comparable, meaning they should come from the same embedding model or reranker model.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for MergeStrategyScoreReuse. -
Method Summary
Modifier and TypeMethodDescriptionstatic MergeStrategyScoreReusecreate()Create a newMergeStrategyScoreReuseinstance.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theMergeStrategyScoreReuse.getType()Get typeinthashCode()voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisMergeStrategyScoreReuseinstance.voidsetType(MergeStrategyType type) Set the type of thisMergeStrategyScoreReuseinstance.toMap()Get the value of all properties of thisMergeStrategyScoreReuseinstance including unrecognized properties.toString()type(MergeStrategyType type) Set the type of thisMergeStrategyScoreReuseinstance and return the same instance.
-
Constructor Details
-
MergeStrategyScoreReuse
protected MergeStrategyScoreReuse()Default constructor for MergeStrategyScoreReuse.
-
-
Method Details
-
type
Set the type of thisMergeStrategyScoreReuseinstance and return the same instance.- Parameters:
type- The type of thisMergeStrategyScoreReuse- Returns:
- The same instance of this
MergeStrategyScoreReuseclass
-
getType
Get type- Returns:
- type The type of this
MergeStrategyScoreReuseinstance.
-
setType
Set the type of thisMergeStrategyScoreReuseinstance.- Parameters:
type- The type of thisMergeStrategyScoreReuse
-
getCustomFieldNames
Get the names of the unrecognizable properties of theMergeStrategyScoreReuse.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisMergeStrategyScoreReuseinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisMergeStrategyScoreReuseinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisMergeStrategyScoreReuseinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a newMergeStrategyScoreReuseinstance. No arguments are required.
-
toMap()instead.