UNPKG

rag-cli-tester

Version:

A lightweight CLI tool for testing RAG (Retrieval-Augmented Generation) systems with different embedding combinations

44 lines 1.55 kB
import { BaseMetric, BaseMetricResult } from './base-metric'; export interface SQLMetricResult extends BaseMetricResult { sqlAccuracy: number; tableRelevance: number; semanticUnderstanding: number; queryCompleteness: number; syntaxCorrectness: number; tablePresence: number; columnPresence: number; joinAggregation: number; queryParsability: number; queryDifference: number; semanticEquivalence: number; } export declare class SQLMetric implements BaseMetric { private readonly sqlKeywords; private readonly tableKeywords; private readonly businessTerms; calculate(expected: string, actual: string, similarity: number): SQLMetricResult; private calculateSQLAccuracy; private calculateTableRelevance; private calculateSemanticUnderstanding; private calculateQueryCompleteness; private calculateSyntaxCorrectness; private calculateConfidence; private extractSQLComponents; private extractTableReferences; private extractBusinessTerms; private calculateTablePresence; private calculateColumnPresence; private calculateJoinAggregation; private calculateQueryParsability; private calculateQueryDifference; private calculateSemanticEquivalence; private extractTableNames; private extractColumnNames; private levenshteinDistance; private extractQueryStructure; private classifyQueryType; private areQueriesSimilar; getName(): string; getDescription(): string; } //# sourceMappingURL=sql-metric.d.ts.map