Class RetrievalGrader

java.lang.Object
dev.langchain4j.adaptiverag.RetrievalGrader
All Implemented Interfaces:
Function<RetrievalGrader.Arguments,RetrievalGrader.Score>

public class RetrievalGrader extends Object implements Function<RetrievalGrader.Arguments,RetrievalGrader.Score>
The RetrievalGrader class implements a function to assess the relevance of a retrieved document to a user's question. It uses an AI service to generate a binary score ('yes' or 'no') indicating relevance. This class relies on external services for processing and grading documents, making it dependent on network availability and the stability of the used API.