Skip to content

Create food_tour_workflow.yaml #1470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

Sonali1701
Copy link

@Sonali1701 Sonali1701 commented Jun 4, 2025

User description

This is yaml file which contain actual code


PR Type

enhancement


Description

  • Introduces a workflow for planning foodie tours across cities

  • Integrates weather, dish, and restaurant search steps per city

  • Uses LLM to recommend dining type and generate tour plan


Changes walkthrough 📝

Relevant files
Enhancement
food_tour_workflow.yaml
Introduce foodie tour planning workflow YAML                         

food_tour_workflow.yaml

  • Adds a new YAML workflow for planning foodie tours.
  • Defines input schema for a list of cities.
  • Includes steps for weather check, dish and restaurant search, and tour
    generation.
  • Utilizes LLM and search tools for recommendations.
  • +43/-0   

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.

  • Important

    Adds food_tour_workflow.yaml to plan a foodie tour using weather, dining preferences, and restaurant searches.

    • Workflow:
      • Adds food_tour_workflow.yaml to define a foodie tour planning workflow.
      • Uses for_each loop to iterate over cities array from input.
    • Steps:
      • get_weather: Fetches weather for each city using weather tool.
      • decide_dining_type: Determines dining type (indoor/outdoor) using llm based on weather.
      • search_dishes: Searches for 3 iconic dishes in each city using brave_search.
      • search_restaurants: Finds top-rated restaurants serving the dishes using brave_search.
      • generate_foodie_tour: Plans a one-day tour with meal suggestions using llm.

    This description was created by Ellipsis for b527f0c. You can customize this summary. It will automatically update as commits are pushed.

    This is yaml file which contain actual code
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Array Access

    The workflow attempts to access specific array indices from search results that may not be structured as expected. The search_dishes.output and search_restaurants.output might not return indexed arrays, potentially causing workflow failures.

    - Breakfast: ${search_dishes.output[0]} at ${search_restaurants.output[0]}
    - Lunch: ${search_dishes.output[1]} at ${search_restaurants.output[1]}
    - Dinner: ${search_dishes.output[2]} at ${search_restaurants.output[2]}
    Weather Format

    The workflow assumes get_weather.output will have a description property, but this depends on the actual structure returned by the weather tool. This assumption should be verified against the weather tool's documentation.

    It's currently ${get_weather.output.description} in ${city}.
    Would you recommend indoor or outdoor dining?

    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Fix restaurant search logic

    The search_restaurants.output likely contains search results for only one dish
    query (the first one), not separate results for each dish. Create separate
    restaurant search steps for each meal to get appropriate restaurant
    recommendations.

    food_tour_workflow.yaml [31-43]

    +- id: search_breakfast_restaurants
    +  tool: brave_search
    +  input:
    +    query: "top-rated restaurants in ${city} serving ${search_dishes.output[0]}"
    +- id: search_lunch_restaurants
    +  tool: brave_search
    +  input:
    +    query: "top-rated restaurants in ${city} serving ${search_dishes.output[1]}"
    +- id: search_dinner_restaurants
    +  tool: brave_search
    +  input:
    +    query: "top-rated restaurants in ${city} serving ${search_dishes.output[2]}"
     - id: generate_foodie_tour
       tool: llm
       input:
         prompt: |
           Plan a one-day foodie tour in ${city}:
    -      - Breakfast: ${search_dishes.output[0]} at ${search_restaurants.output[0]}
    -      - Lunch: ${search_dishes.output[1]} at ${search_restaurants.output[1]}
    -      - Dinner: ${search_dishes.output[2]} at ${search_restaurants.output[2]}
    +      - Breakfast: ${search_dishes.output[0]} at ${search_breakfast_restaurants.output[0]}
    +      - Lunch: ${search_dishes.output[1]} at ${search_lunch_restaurants.output[0]}
    +      - Dinner: ${search_dishes.output[2]} at ${search_dinner_restaurants.output[0]}
           It's currently ${get_weather.output.description}, so recommend ${decide_dining_type.output} options.

    [To ensure code accuracy, apply this suggestion manually]

    Suggestion importance[1-10]: 8

    __

    Why: This suggestion addresses a significant workflow logic issue where the single search_restaurants step cannot provide appropriate restaurant recommendations for three different dishes, and provides a comprehensive solution with separate search steps.

    Medium
    Process search results properly

    The search results may not be structured as an array of dishes that can be
    directly indexed. Add a processing step using LLM to extract and format the top
    3 dishes from the search results into a structured list.

    food_tour_workflow.yaml [27-30]

     - id: search_dishes
       tool: brave_search
       input:
         query: "3 most iconic dishes in ${city}"
    +- id: extract_dishes
    +  tool: llm
    +  input:
    +    prompt: |
    +      Based on these search results about iconic dishes in ${city}:
    +      ${search_dishes.output}
    +      
    +      Extract exactly 3 iconic dishes from ${city} and output them as a numbered list with only the dish names.
    • Apply / Chat
    Suggestion importance[1-10]: 7

    __

    Why: The suggestion correctly identifies that search_dishes.output may not be directly indexable and proposes adding an LLM processing step to structure the data properly, which improves the workflow's robustness.

    Medium
    Fix array access in query

    The search_dishes.output is likely an array of search results, not individual
    dishes. Accessing it directly will pass the entire array to the query, causing
    unexpected search results. Use a specific index to target individual dishes.

    food_tour_workflow.yaml [31-34]

     - id: search_restaurants
       tool: brave_search
       input:
    -    query: "top-rated restaurants in ${city} serving ${search_dishes.output}"
    +    query: "top-rated restaurants in ${city} serving ${search_dishes.output[0]}"
    • Apply / Chat
    Suggestion importance[1-10]: 6

    __

    Why: The suggestion correctly identifies that using the entire search_dishes.output array in a search query would be problematic, but the fix is incomplete as it only addresses one dish while the workflow needs restaurants for multiple meals.

    Low
    • More

    Copy link
    Contributor

    @ellipsis-dev ellipsis-dev bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Caution

    Changes requested ❌

    Reviewed everything up to b527f0c in 1 minute and 25 seconds. Click for details.
    • Reviewed 49 lines of code in 1 files
    • Skipped 0 files when reviewing.
    • Skipped posting 1 draft comments. View those below.
    • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
    1. food_tour_workflow.yaml:1
    • Draft comment:
      Consider matching the workflow name with the file name for consistency.
    • Reason this comment was not posted:
      Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% This is a style/naming suggestion that doesn't affect functionality. While consistency is good, this seems like a minor issue. The current name is clear and descriptive. Without seeing other workflow files or naming conventions, we can't be certain this is even inconsistent with the codebase's standards. The comment could be valid if there's a strict naming convention in the codebase. The suggestion might improve maintainability. Without seeing other files or documented conventions, this is a speculative style suggestion rather than a clear issue requiring change. Delete the comment as it's a minor naming suggestion without clear evidence of violating any conventions, and the current name is perfectly functional.

    Workflow ID: wflow_qz57Lr14GGw52bMX

    You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

    - id: search_restaurants
    tool: brave_search
    input:
    query: "top-rated restaurants in ${city} serving ${search_dishes.output}"
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Ensure output type consistency for 'search_dishes.output'; it’s used as an entire array later but here interpolated as a string.

    Suggested change
    query: "top-rated restaurants in ${city} serving ${search_dishes.output}"
    query: "top-rated restaurants in ${city} serving ${search_dishes.output[0]}"

    input:
    prompt: |
    Plan a one-day foodie tour in ${city}:
    - Breakfast: ${search_dishes.output[0]} at ${search_restaurants.output[0]}
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Consider handling cases where the outputs may have fewer than 3 items to avoid out-of-bound indexing.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant