import { PrismaService } from "../../../core/database/prisma/prisma.service";
import { QAFeedback } from '@prisma/client';
import { RagflowService } from './ragflow.service';
export interface SourceDocument {
    id: string;
    type: 'document' | 'article';
    title: string;
    webUrl?: string;
    snippet: string;
    authorityLevel: string;
    docType: string;
    relevanceScore: number;
}
export interface AskResult {
    id: string;
    answer: string;
    sources: SourceDocument[];
    confidence: number;
    metadata: {
        modelUsed: string;
        tokensUsed: number;
        cost: number;
        responseTimeMs: number;
    };
}
export declare class KnowledgeQaService {
    private readonly prisma;
    private readonly ragflowService;
    constructor(prisma: PrismaService, ragflowService: RagflowService);
    ask(question: string, userId: string): Promise<AskResult>;
    submitFeedback(qaLogId: string, feedback: QAFeedback, comment?: string): Promise<void>;
    getUserHistory(userId: string, limit?: number): Promise<Array<{
        id: string;
        question: string;
        answer: string;
        createdAt: Date;
    }>>;
    private buildSources;
    private calculateConfidence;
    private clipSnippet;
}
