Package com.tnsai.rag
Record Class RetrievalEvidence.Provenance
java.lang.Object
java.lang.Record
com.tnsai.rag.RetrievalEvidence.Provenance
- Record Components:
sourceName- canonicalKnowledgeSourceConfig.name()documentId- stable document or chunk identitylocation- optional external location such as a file path or URIscore- strategy-specific relevance scorerank- one-based rank in the returned resultstrategy- executed retrieval strategy, or configured fallback for DIRECT
- Enclosing class:
RetrievalEvidence
public static record RetrievalEvidence.Provenance(String sourceName, String documentId, String location, double score, int rank, Search.Strategy strategy)
extends Record
Stable provenance required for audit, citation, and diagnostics.
Scores are required to be finite but are not constrained to
0..1; keyword and graph strategies may use other score ranges.
-
Constructor Summary
ConstructorsConstructorDescriptionProvenance(String sourceName, String documentId, String location, double score, int rank, Search.Strategy strategy) Validates provenance fields. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedocumentIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.intrank()Returns the value of therankrecord component.doublescore()Returns the value of thescorerecord component.Returns the value of thesourceNamerecord component.strategy()Returns the value of thestrategyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Provenance
public Provenance(String sourceName, String documentId, String location, double score, int rank, Search.Strategy strategy) Validates provenance fields.
-
-
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 '=='. -
sourceName
Returns the value of thesourceNamerecord component.- Returns:
- the value of the
sourceNamerecord component
-
documentId
Returns the value of thedocumentIdrecord component.- Returns:
- the value of the
documentIdrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
score
public double score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
rank
public int rank()Returns the value of therankrecord component.- Returns:
- the value of the
rankrecord component
-
strategy
Returns the value of thestrategyrecord component.- Returns:
- the value of the
strategyrecord component
-