UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

73 lines (72 loc) 2.34 kB
/** * Adaptive Quality Workflow * ========================= * * Layer-based execution optimizing for maximum quality: * - Start with fast validation tier * - Escalate to premium tier if needed * - Final expert tier for complex cases * * Ideal for: Quality-critical tasks with cost awareness * * @module workflow/workflows/adaptiveWorkflow */ import type { WorkflowConfig } from "../../types/index.js"; /** * Quality-Max Adaptive Workflow * * Uses 3-tier layer-based execution: * 1. Validation tier (parallel): 2 fast models check complexity * 2. Premium tier (parallel): 2 high-quality models if validation uncertain * 3. Expert tier (sequential): Best model for final polish * * Each tier evaluates if next tier is needed based on confidence * * @example * ```typescript * import { runWorkflow } from '../core/workflowRunner.js'; * import { QUALITY_MAX_WORKFLOW } from './adaptiveWorkflow.js'; * * const result = await runWorkflow(QUALITY_MAX_WORKFLOW, { * prompt: 'Design a scalable microservices architecture', * verbose: true, * }); * * console.log('Quality score:', result.score); * console.log('Tiers executed:', result.ensembleResponses.length); * ``` */ export declare const QUALITY_MAX_WORKFLOW: WorkflowConfig; /** * Speed-First Adaptive Workflow * * Optimizes for speed with quality fallback: * 1. Fast tier: Single fast model (GPT-4o-mini) * 2. Balanced tier: If fast fails, use Gemini 2.0 * 3. Quality tier: If both fail, use GPT-4o */ export declare const SPEED_FIRST_WORKFLOW: WorkflowConfig; /** * Balanced Adaptive Workflow * * Balances speed, cost, and quality: * 1. Standard tier (parallel): GPT-4o-mini + Gemini Flash * 2. Premium tier (parallel): GPT-4o + Claude 3.5 if standard uncertain */ export declare const BALANCED_ADAPTIVE_WORKFLOW: WorkflowConfig; /** * Create custom adaptive workflow * * @param tiers - Number of quality tiers (2, 3, or 4) * @param strategy - 'speed' | 'balanced' | 'quality' * @returns Configured adaptive workflow * * @example * ```typescript * const workflow = createAdaptiveWorkflow(3, 'quality'); * const result = await runWorkflow(workflow, { * prompt: 'Complex technical analysis', * }); * ``` */ export declare function createAdaptiveWorkflow(tiers: 2 | 3, strategy: "speed" | "balanced" | "quality"): WorkflowConfig;