Package com.tnsai.intelligence.rag
Record Class Reranker.Request
java.lang.Object
java.lang.Record
com.tnsai.intelligence.rag.Reranker.Request
- Record Components:
query- original retrieval querydocuments- immutable retrieval candidatesmodel- exact provider model identifiertopN- maximum number of results retained after reranking
- Enclosing interface:
Reranker
public static record Reranker.Request(String query, List<RetrievedDocument> documents, String model, int topN)
extends Record
Immutable input passed to a
Reranker provider.-
Constructor Summary
ConstructorsConstructorDescriptionRequest(String query, List<RetrievedDocument> documents, String model, int topN) Creates a validated immutable request. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedocumentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.query()Returns the value of thequeryrecord component.inttopN()Returns the value of thetopNrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Request
Creates a validated immutable request.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-
documents
Returns the value of thedocumentsrecord component.- Returns:
- the value of the
documentsrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
topN
public int topN()Returns the value of thetopNrecord component.- Returns:
- the value of the
topNrecord component
-