export type RagChartsFilterParams = {
    applicationId: string;
    start?: string;
    end?: string;
    orgId?: string;
    projectId?: string;
    mode?: 'avg' | 'p60' | 'p90' | 'p99';
};
export declare class RagChartsService {
    private static instance;
    private constructor();
    static getInstance(): RagChartsService;
    /** Range-based bucket config: &lt; 3 days → hourly; 1–3 months → weekly; &gt;4 months → monthly; else daily. */
    private getBucketConfig;
    private generateTimeSeriesCTE;
    private buildWhere;
    /**
     * 1. Requests Breakdown - Passed, Error, Failed counts for pie chart.
     */
    getRequestsBreakdown(params: RagChartsFilterParams): Promise<{
        passed: number;
        failed: number;
        error: number;
    }>;
    /**
     * 2. Retrieval Hit Rate - Line chart: day vs percentage; optional mode for percentile of latency.
     */
    getRetrievalHitRate(params: RagChartsFilterParams): Promise<Array<{
        day: string;
        percentage: number;
    }>>;
    /**
     * 3. Retrieval Latency - Line chart: day vs latency (avg or p60/p90/p99).
     */
    getRetrievalLatency(params: RagChartsFilterParams): Promise<Array<{
        day: string;
        latencyMs: number;
    }>>;
    /**
     * 4. Retrieval Latency Distribution - Histogram (bin, count).
     */
    getRetrievalLatencyDistribution(params: RagChartsFilterParams): Promise<Array<{
        bin: string;
        count: number;
    }>>;
    /**
     * 5. VectorDB Throughput - Multi-line: Queries, Documents Retrieved, Avg Docs/Request per day.
     */
    getVectorDbThroughput(params: RagChartsFilterParams): Promise<Array<{
        day: string;
        queries: number;
        documentsRetrieved: number;
        avgDocsPerRequest: number;
    }>>;
    /**
     * 6. Vector DB Performance Trend - Table/summary: Queries, Documents Retrieved, Avg Docs/Request (totals).
     */
    getVectorDbPerformanceTrend(params: RagChartsFilterParams): Promise<{
        queries: number;
        documentsRetrieved: number;
        avgDocsPerRequest: number;
    }>;
    /**
     * 7. Request Volume by Operation - Pie: operation -> count.
     * sumMapMerge returns a tuple (keys_array, values_array), not a Map; use tupleElement, not mapKeys/mapValues.
     */
    getRequestVolumeByOperation(params: RagChartsFilterParams): Promise<Array<{
        operation: string;
        count: number;
    }>>;
    /**
     * 8. Response Time Analysis By Operation - Multi-line: per operation, day vs latency (avg or percentile).
     */
    getResponseTimeByOperation(params: RagChartsFilterParams): Promise<Array<{
        day: string;
        operation: string;
        latencyMs: number;
    }>>;
}
export declare const ragChartsService: RagChartsService;
//# sourceMappingURL=ragChartsService.d.ts.map