@tpmjs/tools-recipe-curate-rank
Rank multiple recipes by quality, efficiency, or custom criteria. Each criterion has a weight that determines its importance. Returns ranked list with scores and identifies the top pick.
Test @tpmjs/tools-recipe-curate-rank (recipeCurateRankTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-recipe-curate-rankpnpm add @tpmjs/tools-recipe-curate-rankyarn add @tpmjs/tools-recipe-curate-rankbun add @tpmjs/tools-recipe-curate-rankdeno add npm:@tpmjs/tools-recipe-curate-rankimport { recipeCurateRankTool } from '@tpmjs/tools-recipe-curate-rank';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { recipeCurateRankTool } from '@tpmjs/tools-recipe-curate-rank';
const result = await generateText({
model: openai('gpt-4o'),
tools: { recipeCurateRankTool },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
recipesarrayArray of recipe objects to rank
criteriaarrayArray of ranking criteria. Common criteria: simplicity, speed, quality, completeness, reliability, innovation, cost
Schema extracted: 1/1/2026, 8:18:24 AM
Rank recipes by quality, efficiency, or custom criteria using weighted scoring.
npm install @tpmjs/tools-recipe-curate-rank
import { recipeCurateRankTool } from '@tpmjs/tools-recipe-curate-rank'; const result = await recipeCurateRankTool.execute({ recipes: [ { name: 'Quick Deploy', steps: [ { action: 'build', duration: 2 }, { action: 'deploy', duration: 1 } ], complexity: 3, estimatedTime: 3 }, { name: 'Full CI/CD', steps: [ { action: 'test', duration: 5 }, { action: 'build', duration: 3 }, { action: 'scan', duration: 2 }, { action: 'deploy', duration: 2 } ], complexity: 7, estimatedTime: 12, metadata: { quality: 9 } } ], criteria: [ { name: 'speed', weight: 0.6 }, { name: 'quality', weight: 0.4 } ] }); console.log(result.topPick); // { // recipeName: 'Quick Deploy', // score: 0.85, // reason: 'Best overall score with strong speed (95%) and quality (60%)' // }
Common criteria names (case-insensitive):
You can also use custom criteria names that match recipe properties.
Recipes can include:
name (required) - Recipe identifiersteps - Array of step objects with optional durationcomplexity - Numeric complexity score (1-10)estimatedTime - Total time in minutesmetadata - Additional properties like quality, reliability, innovation, costEach criterion is:
The tool automatically normalizes values and provides detailed score breakdowns.
const result = await recipeCurateRankTool.execute({ recipes: [ { name: 'A', estimatedTime: 5 }, { name: 'B', estimatedTime: 15 }, { name: 'C', estimatedTime: 10 } ], criteria: [{ name: 'speed', weight: 1.0 }] }); // Top pick: 'A' (fastest)
const result = await recipeCurateRankTool.execute({ recipes: [ { name: 'Fast but risky', estimatedTime: 5, metadata: { reliability: 0.3 } }, { name: 'Balanced', estimatedTime: 10, metadata: { reliability: 0.8 } }, { name: 'Slow but safe', estimatedTime: 20, metadata: { reliability: 0.95 } } ], criteria: [ { name: 'speed', weight: 0.4 }, { name: 'reliability', weight: 0.6 } ] }); // Top pick: 'Balanced' (best combination)
const result = await recipeCurateRankTool.execute({ recipes: [ { name: 'Recipe A', customScore: 85 }, { name: 'Recipe B', customScore: 92 }, { name: 'Recipe C', customScore: 78 } ], criteria: [{ name: 'customScore', weight: 1.0 }] }); // Top pick: 'Recipe B' (highest custom score)
{ ranked: [ { recipe: { name: '...' }, score: 0.85, rank: 1, breakdown: { speed: 0.9, quality: 0.8 } } ], scores: [ { recipeName: '...', totalScore: 0.85, breakdown: { speed: 0.9, quality: 0.8 } } ], topPick: { recipeName: '...', score: 0.85, reason: 'Best overall score with strong speed (90%)' } }
MIT
Downloads/month
0
Quality Score