/**
 * LLM-reasoned entity ranking via Claude Haiku.
 *
 * Given a pool of candidate entities (from memory-search) and a natural-language
 * ranking criterion, returns a ranked ordering with per-item reasoning. When the
 * LLM is unavailable (no API key, network error, malformed response, or all
 * hallucinated nodeIds), returns a fallback reason that callers use to produce
 * an unranked result with a visible "[Ranking unavailable: ...]" notice.
 *
 * Trust boundary: the `criteria` string comes from an agent (admin, public, or
 * workflow). The system prompt explicitly sandboxes it as a ranking directive —
 * any imperative verbs inside it are data, not instructions. This follows the
 * same pattern as email/screening.ts.
 *
 * Hallucination defence: Haiku only sees nodeIds from the candidate pool, and
 * the parser discards any nodeId in its response that is not in the input set.
 * If all rankings are hallucinated, we fall back.
 */
export interface RankCandidate {
    nodeId: string;
    labels: string[];
    properties: Record<string, unknown>;
    related: Array<{
        relationship: string;
        direction: string;
        labels: string[];
        properties: Record<string, unknown>;
    }>;
}
export interface Ranking {
    nodeId: string;
    rank: number;
    reasoning: string;
}
export type RankResult = {
    kind: "ranked";
    rankings: Ranking[];
    hallucinated: number;
} | {
    kind: "fallback";
    reason: string;
};
/**
 * Rank a pool of candidates against a natural-language criterion via Haiku.
 *
 * Returns:
 *   { kind: "ranked", rankings, hallucinated } on success (hallucinated counts
 *       nodeIds Haiku invented that were filtered out)
 *   { kind: "fallback", reason } when the LLM is unavailable or its output
 *       cannot be used — callers should return the unranked memory-search
 *       results prefixed with "[Ranking unavailable: <reason>]".
 */
export declare function rankCandidates(candidates: RankCandidate[], criteria: string, accountId: string): Promise<RankResult>;
//# sourceMappingURL=llm-ranker.d.ts.map