Item Price range is not generated consistantly

I have a json, containing a list of dictionaries where each dictionary represents an item and its details for a purchase order. When there are more than two items, the gpt is supposed to provide the highest and lowest itemtotal price as the range of item price in the format, "The item total price ranges from (lowest range) to the (highest range).

The prompt I am using is:

If there are multiple itemTotalPrice values, create a list of all values of itemTotalPrice and follow these instructions:
#) Instructions
1. Sort the values in the list in ascending order.
2. Retrieve the lowest and highest values from the sorted list.
3. Construct a statement containing the lowest and highest values, using the
format: "The prices of the items range from the lowest price (include currency)
to the highest price (include currency)

However, this produces inconsistant outputs, any suggestions what can I do here.

PS: The actual output is to summarize a purchase order, and itemtotalprice is one of the point in summary. I have tried just getting the range by only passing in the values and it worked. But when I pass in the entire json body and expect to summarize the entire PO the range received is inconsistant