ContextRelevanceResult

org.llm4s.agent.guardrails.rag.ContextRelevanceResult
final case class ContextRelevanceResult(overallScore: Double, chunkScores: Seq[Double], relevantChunkCount: Int, explanation: String)

Result of context relevance evaluation.

Value parameters

chunkScores

Individual relevance scores for each chunk

explanation

Brief explanation of the evaluation

overallScore

Overall relevance score (0.0 to 1.0)

relevantChunkCount

Number of chunks meeting the threshold

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def irrelevantChunkIndices(threshold: Double): Seq[Int]

Get the indices of irrelevant chunks.

Get the indices of irrelevant chunks.

Attributes

def relevantChunkIndices(threshold: Double): Seq[Int]

Get the indices of relevant chunks.

Get the indices of relevant chunks.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product