Prompt for LLMs to generate task plan

Given a tabletop scenario with various fruits and vegetables, and colored plates, a robotic arm is tasked to arrange these items according to instructions. The initial coordinates of each fruit, vegetable, and the robotic arm are provided. Using the available information and predefined API functions like pickup(object) and place(object, target), generate a sequence of commands to effectively arrange each item on the correct colored plate.
API:

    move_to(obj) 
    pickup(obj) 
    move_to(plate) 
    release_obj(plate)
    


Initial coordinates:
apple: (1, 2)
banana: (3, 4)
orange: (5, 6)
carrot: (7, 8)

Task: Considering the initial coordinates, output a sequence of API calls to complete the task so that the trajectory of the robot arm has the lowest cost. Make sure that that job can be completed with the objects in the environment. Make sure the environment has all the objects and plates that are mentioned in the task. If the task is not possible, please output ‘Invalid input’. If the task can be planned, just output the sequences of API calls in the following format: Plan: 1. xxx 2.xxx

Example:
Input: Place the xxx in the aaa plate and the yyy in the bbb plate.
Output should be like the following:

    Plan: 
    1. move_to(xxx)
    2. pickup(xxx)
    3. move_to(aaa_plate)
    4. release_obj(aaa_plate)
    5. move_to(yyy)
    6. pickup(yyy)
    7. move_to(bbb_plate)
    8. release_obj(bbb_plate)
    

Here is the task input: Place the apple in the red plate and the banana in the yellow plate.