Quick test on Llama3 running locally on my laptop (i.e. not a very powerful model). Prompts and outputs with extraneous details elided:
---
"You are an intelligent fast food restaurant automation system. For any order, generate an API call using curl with the specs below. Feel free to ask any clarifying questions in response to an order before making the API call. The actual order follows the API spec pseudocode:
<arbitrary spec pseudocode for an "orders" endpoint>
Customer order: Could I get a cheeseburger, fries and a 1000 glasses of water?"
Output:
"A thirsty customer! Before I make the API call, I just want to clarify that you meant "Thousand" glasses of water, not "1000". Just making sure I don't accidentally create a liquid-filled nightmare in our restaurant!
Assuming that's correct, here's the API call using curl:
```<correct curl call>```
"
---
I then tried removing the sentence about "clarifyng questions" from the prompt:
---
Output:
"```<correct curl call>```
Here's what I did:
1. Set the request method to `POST` since we're creating a new order.
2. Set the content type to `application/json` as per the API specification.
3. In the JSON payload, I created an array of `Order` objects with three items:
* The first item is the cheeseburger, with quantity 1.
* The second item is fries, again with quantity 1.
* The third item is... a lot of water! With quantity 1000."
---
I then added this sentence to the prompt: "If something seems off, make an API call for an order that represents a reasonable course of action, which may not necessarily correspond to the actual order."
---
Output:
A interesting request! While we don't typically sell 1000 glasses of water, I'll generate an API call based on the provided spec. Here it is:
```<correct curl call for only burger and fries>```
In this API call, I've set the quantity of each item to 1, assuming the customer wants one cheeseburger and one serving of fries. The order total would likely be affected by adding a large quantity of water, but since we don't typically sell that many glasses of water at once, I've omitted it from the API call.
---
In other prompt iterations, it suggested fewer glasses of water. Given the option of calling for human assistance, it did so.
In all cases, even without being explicitly prompted for it, the AI "knows" that 1000 glasses of water is an unreasonable amount.
---
"You are an intelligent fast food restaurant automation system. For any order, generate an API call using curl with the specs below. Feel free to ask any clarifying questions in response to an order before making the API call. The actual order follows the API spec pseudocode:
<arbitrary spec pseudocode for an "orders" endpoint>
Customer order: Could I get a cheeseburger, fries and a 1000 glasses of water?"
Output:
"A thirsty customer! Before I make the API call, I just want to clarify that you meant "Thousand" glasses of water, not "1000". Just making sure I don't accidentally create a liquid-filled nightmare in our restaurant!
Assuming that's correct, here's the API call using curl: ```<correct curl call>``` "
---
I then tried removing the sentence about "clarifyng questions" from the prompt:
---
Output:
"```<correct curl call>```
Here's what I did:
1. Set the request method to `POST` since we're creating a new order.
2. Set the content type to `application/json` as per the API specification.
3. In the JSON payload, I created an array of `Order` objects with three items:
* The first item is the cheeseburger, with quantity 1. * The second item is fries, again with quantity 1. * The third item is... a lot of water! With quantity 1000."
---
I then added this sentence to the prompt: "If something seems off, make an API call for an order that represents a reasonable course of action, which may not necessarily correspond to the actual order."
---
Output:
A interesting request! While we don't typically sell 1000 glasses of water, I'll generate an API call based on the provided spec. Here it is:
```<correct curl call for only burger and fries>```
In this API call, I've set the quantity of each item to 1, assuming the customer wants one cheeseburger and one serving of fries. The order total would likely be affected by adding a large quantity of water, but since we don't typically sell that many glasses of water at once, I've omitted it from the API call.
---
In other prompt iterations, it suggested fewer glasses of water. Given the option of calling for human assistance, it did so.
In all cases, even without being explicitly prompted for it, the AI "knows" that 1000 glasses of water is an unreasonable amount.