@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio
29 lines (28 loc) • 1.26 kB
TypeScript
import type { EnhancedEvaluationContext, EvaluationResult, GetPromptFunction } from "../types/index.js";
/**
* Implements a RAGAS-style evaluator that uses a "judge" LLM to score the
* quality of an AI response based on rich, contextual information.
*/
export declare class RAGASEvaluator {
private evaluationModel;
private providerName;
private threshold;
private promptBuilder;
private promptGenerator?;
constructor(evaluationModel?: string, providerName?: string, threshold?: number, promptGenerator?: GetPromptFunction);
/**
* Evaluates an AI-generated response using a model-based approach.
*
* @param context The rich, contextual information for the evaluation.
* @returns A promise that resolves to a detailed `EvaluationResult`.
*/
evaluate(context: EnhancedEvaluationContext): Promise<EvaluationResult>;
/**
* Parses the raw JSON string from the judge LLM into a structured `EvaluationResult` object.
* It includes error handling to gracefully manage malformed JSON.
*
* @param rawResponse The raw string response from the evaluation model.
* @returns A structured object containing the evaluation scores and feedback.
*/
private parseEvaluationResponse;
}