Visual walkthrough of the intent-to-transaction pipeline
User pastes raw recipe text — a URL, a paragraph, or free-form ingredient list. No structured format required.
Input
Unstructured natural language text
Output
Raw text string passed to extraction pipeline
AI Involvement
None — pure user input capture
GPT-4o-mini parses natural language into structured ingredient objects with quantities, units, preparation notes, and recipe metadata (title, times, difficulty, servings).
Input
Raw recipe text string
Output
Array of RawIngredient objects + RecipeMetadata
AI Involvement
GPT-4o-mini with structured JSON output prompt. Single API call extracts both ingredients and metadata. Handles ambiguous quantities, implied ingredients, and regional terminology.
Client-side engine converts heterogeneous units into standard measures, deduplicates overlapping ingredients, and assigns categories. Handles cup→ml, oz→g, "pinch"→count conversions.
Input
RawIngredient[] with mixed units and formats
Output
StructuredIngredient[] with standardized quantities and categories
AI Involvement
None — deterministic rule engine. 11 category classifiers, unit conversion tables, and vague-quantity heuristics (e.g., "a handful" → 30g).
Fuzzy term matcher maps each normalized ingredient to the best product SKU from a 42-item inventory. Applies store-specific price multipliers and ranks up to 4 alternatives per ingredient.
Input
StructuredIngredient[] + selected store profile
Output
SKUMatch[] with bestMatch, alternatives[], and confidence scores
AI Involvement
Fuzzy string matching against SKU matchTerms arrays. Store pricing applied via category-specific multipliers. Coverage and waste ratios calculated per match.
Scoring algorithm selects optimal SKUs based on the chosen mode (Budget, Quality, or Dietary). Factors in pantry filtering, package waste minimization, and quality tier preferences.
Input
SKUMatch[] + optimization mode + pantry exclusions
Output
OptimizedCartItem[] with line totals and reason annotations
AI Involvement
Multi-factor scoring: effective price (40%), coverage ratio (25%), waste penalty (20%), quality/dietary bonus (15%). Mode weights shift factor importance.
Final cart is assembled with line items, totals, cost-per-serving calculations, and savings estimates. Cart updates reactively when servings, store, or mode change.
Input
OptimizedCartItem[] + serving count + store
Output
Rendered shopping cart with product images, prices, totals, and substitution options
AI Involvement
None — reactive state management. Serving changes trigger debounced (400ms) re-optimization. Store switches trigger instant SKU re-matching.
GPT-4o-mini generates contextual suggestions (swap, add, remove, tip) and merchant analytics compute margin analysis, cross-sell opportunities, and upsell paths.
Input
Optimized cart + recipe context + metadata + store + mode
Output
4-6 typed AI suggestions + MerchantMetrics with margin/revenue data
AI Involvement
GPT-4o-mini for suggestion generation with full cart context. Deterministic analytics engine for margin calculations, cross-sell pair detection, and category performance scoring.
Users go from unstructured cooking intent to a purchasable cart in under 5 seconds. No manual ingredient searching, quantity calculation, or price comparison required. The pipeline eliminates the entire recipe-to-cart workflow that typically takes 15-20 minutes.
Natural language is progressively refined through each pipeline stage — from ambiguous text to normalized quantities to matched SKUs to an optimized cart. Each transformation adds structure and intelligence, making the data increasingly actionable for commerce.
Every pipeline stage embeds merchant value: extraction enables metadata-driven suggestions, SKU matching surfaces upsell alternatives, optimization respects margin targets, and the intelligence layer actively promotes cross-sell and premium substitutions — turning every cart into a revenue opportunity.