Package com.tnsai.rag
Record Class RetrievalDiagnostics
java.lang.Object
java.lang.Record
com.tnsai.rag.RetrievalDiagnostics
- Record Components:
elapsed- total engine latencycandidateCount- candidates considered before final filteringreturnedCount- evidence entries returned to the callercacheOutcome- cache behavior for this invocationwarnings- non-fatal warnings, such as a partial source failureattributes- implementation-specific diagnostics
public record RetrievalDiagnostics(Duration elapsed, int candidateCount, int returnedCount, RetrievalDiagnostics.CacheOutcome cacheOutcome, List<String> warnings, Map<String,Object> attributes)
extends Record
Entry-point-neutral diagnostics emitted by a retrieval engine.
- Since:
- 0.13.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCache behavior visible to callers and observability integrations. -
Constructor Summary
ConstructorsConstructorDescriptionRetrievalDiagnostics(Duration elapsed, int candidateCount, int returnedCount, RetrievalDiagnostics.CacheOutcome cacheOutcome, List<String> warnings, Map<String, Object> attributes) Validates counts and defensively copies diagnostic state. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.Returns the value of thecacheOutcomerecord component.intReturns the value of thecandidateCountrecord component.elapsed()Returns the value of theelapsedrecord component.static RetrievalDiagnosticsempty()Returns diagnostics for an immediate empty, uncached result.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thereturnedCountrecord component.final StringtoString()Returns a string representation of this record class.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
Method Details
-
empty
Returns diagnostics for an immediate empty, uncached result.- Returns:
- empty diagnostics
-
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 '=='. -
elapsed
Returns the value of theelapsedrecord component.- Returns:
- the value of the
elapsedrecord component
-
candidateCount
public int candidateCount()Returns the value of thecandidateCountrecord component.- Returns:
- the value of the
candidateCountrecord component
-
returnedCount
public int returnedCount()Returns the value of thereturnedCountrecord component.- Returns:
- the value of the
returnedCountrecord component
-
cacheOutcome
Returns the value of thecacheOutcomerecord component.- Returns:
- the value of the
cacheOutcomerecord component
-
warnings
Returns the value of thewarningsrecord component.- Returns:
- the value of the
warningsrecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-