/**
 * src/knowledge/extraction.ts
 * استخراج الكيانات — Entity extraction from text using Qwen
 * Handles Arabic + English text, extracts structured entities and relationships
 */
export type EntityType = 'Person' | 'Product' | 'Location' | 'Company' | 'Price' | 'Date' | 'Event' | 'Policy';
export type RelationshipType = 'interested_in' | 'purchased' | 'referred_by' | 'located_in' | 'works_at' | 'priced_at' | 'valid_until' | 'prefers' | 'lives_in' | 'related_to' | 'mentions' | 'has_policy' | 'offers';
export interface ExtractedEntity {
    name: string;
    type: EntityType;
    properties: Record<string, string | number | boolean>;
}
export interface ExtractedRelationship {
    from: string;
    to: string;
    type: RelationshipType;
    properties: Record<string, string | number | boolean>;
}
export interface ExtractionResult {
    entities: ExtractedEntity[];
    relationships: ExtractedRelationship[];
    /** (C6) Set when extraction failed at the LLM/parse layer.
     * Callers must check this before assuming an empty result means
     * "the conversation had no entities" vs "extraction is broken." */
    failed?: boolean;
    reason?: string;
}
export interface CustomerInsights {
    preferences: string[];
    sentiment: 'positive' | 'neutral' | 'negative' | 'mixed';
    intent: string;
    topics: string[];
    urgency: 'low' | 'medium' | 'high';
}
/**
 * Extract structured entities and relationships from text
 */
export declare function extractEntities(text: string): Promise<ExtractionResult>;
/**
 * Extract customer insights from conversation history
 */
export declare function extractCustomerInsights(conversationHistory: string): Promise<CustomerInsights>;
//# sourceMappingURL=extraction.d.ts.map