Package com.tnsai.rag
Record Class RetrievalEvidence
java.lang.Object
java.lang.Record
com.tnsai.rag.RetrievalEvidence
- Record Components:
content- retrieved textprovenance- source, ranking, score, and strategy provenancemetadata- implementation-neutral evidence metadata
public record RetrievalEvidence(String content, RetrievalEvidence.Provenance provenance, Map<String,Object> metadata)
extends Record
Immutable evidence returned by a
RetrievalEngine.
Action-context evidence marked selection=DIRECT retains the
complete normalized original text, including surrounding whitespace.
Other evidence retains the usual stripping of surrounding whitespace.
DIRECT has an unranked score of zero; its strategy identifies the configured
retrieval fallback and its rank is the one-based output position. The
selection metadata is descriptive, not an authorization or trust signal.
- Since:
- 0.13.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordStable provenance required for audit, citation, and diagnostics. -
Constructor Summary
ConstructorsConstructorDescriptionRetrievalEvidence(String content, RetrievalEvidence.Provenance provenance, Map<String, Object> metadata) Validates and defensively copies evidence state. -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.Returns the value of theprovenancerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RetrievalEvidence
public RetrievalEvidence(String content, RetrievalEvidence.Provenance provenance, Map<String, Object> metadata) Validates and defensively copies evidence state.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
provenance
Returns the value of theprovenancerecord component.- Returns:
- the value of the
provenancerecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-