Documentation
¶
Index ¶
- type RagasLLMJudge
- func (j *RagasLLMJudge) EvaluateAnswerRelevance(ctx context.Context, query string, answer string) (float32, string, error)
- func (j *RagasLLMJudge) EvaluateContextPrecision(ctx context.Context, query string, chunks []*entity.Chunk) (float32, string, error)
- func (j *RagasLLMJudge) EvaluateFaithfulness(ctx context.Context, query string, chunks []*entity.Chunk, answer string) (float32, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RagasLLMJudge ¶
type RagasLLMJudge struct {
// contains filtered or unexported fields
}
RagasLLMJudge implements the LLMJudge interface using standard RAGAS-style prompts. It leverages a strong LLM (like GPT-4) to grade the pipeline's output.
func NewRagasLLMJudge ¶
func NewRagasLLMJudge(judgeLLM chat.Client) *RagasLLMJudge
func (*RagasLLMJudge) EvaluateAnswerRelevance ¶
func (j *RagasLLMJudge) EvaluateAnswerRelevance(ctx context.Context, query string, answer string) (float32, string, error)
EvaluateAnswerRelevance checks if the answer actually answers the user's question.
Click to show internal directories.
Click to hide internal directories.