← Back to Projects

FlavorBot

AI Recipe System🏆 RamHacks 2025 Winner

A desktop AI recipe generator that personalizes recipes based on ingredients, allergies, and dietary constraints, with interactive LLM-driven refinement.

Most Practical Application of AI400+ recipes processed25% faster revisions

Overview

FlavorBot is a Java desktop application that generates personalized recipes using AI. Users input available ingredients and dietary constraints, and the system produces tailored recipes. What sets it apart: an interactive refinement loop where users can request specific changes that get routed back to the LLM for automated adjustment.

Problem

Recipe websites assume you have every ingredient and no dietary restrictions. Users with specific constraints—allergies, limited pantries, dietary preferences—spend significant time manually adapting recipes. When AI-generated recipes aren't quite right, there's no efficient way to request targeted modifications.

Constraints

  • Desktop application (JavaFX) with traditional UI patterns
  • Recipe output needed to be structured and parseable, not freeform text
  • Edit requests had to preserve context from previous iterations
  • API costs required efficient prompt design

Solution

I built a structured output interface that presents recipes in editable sections. When users request changes—"less salt," "substitute chicken for tofu"—the system routes those edits back to the OpenAI API with full conversation context. This refinement loop reduced revision turnaround time by 25% and improved first-pass acceptance.

Architecture & Stack

RuntimeJava (JDK 17+)
UI FrameworkJavaFX with FXML layouts
DatabaseSQL (local persistence for saved recipes)
AI LayerOpenAI API with structured prompt chains

Key Engineering Decisions

  • Structured JSON output from LLM for consistent recipe parsing across iterations
  • Conversation context preservation to maintain coherence during refinement
  • Sectioned UI that maps to recipe structure (ingredients, steps, notes)
  • Local SQL storage for recipe persistence without cloud dependency

Challenges & Tradeoffs

The main challenge was balancing conversation context with API token limits. Longer context means better refinement quality, but higher latency and cost. I implemented a sliding window approach: the system keeps the original constraints plus the last 2 refinement requests, which provided the best balance of quality and responsiveness.

Results

25%
Faster revision turnaround
Higher
First-pass acceptance rate

What This Demonstrates

  • Interactive AI system design with refinement loops
  • Structured LLM output parsing and validation
  • Desktop application development (JavaFX)
  • Token-aware prompt engineering for cost efficiency