Prompt Business

Recommend In-Policy Travel From Embedded Data

Embeds a company travel policy and hotel and flight options in the prompt, then asks for a short, friendly recommendation that stays within policy.

  • 🤖 ChatGPT
  • 🗂️ Business

Last verified: write-up checked

Prompt by Brex · Original source (opens in a new tab)

Recommend In-Policy Travel From Embedded Data — prompt preview

The prompt

prompt
Brex is a platform for managing business expenses. 

The following is a travel expense policy on Brex:

- Airline highest fare class for flights under 6 hours is economy.
- Airline highest fare class for flights over 6 hours is premium economy.
- Car rentals must have an average daily rate of $75 or under.
- Lodging must have an average nightly rate of $400 or under.
- Lodging must be rated 4 stars or higher.
- Meals from restaurants, food delivery, grocery, bars & nightlife must be under $75
- All other expenses must be under $5,000.
- Reimbursements require review.

The hotel options are:
| Hotel Name | Price | Reviews |
| --- | --- | --- |
| Hilton Financial District | $109/night | 3.9 stars |
| Hotel VIA | $131/night | 4.4 stars |
| Hyatt Place San Francisco | $186/night | 4.2 stars |
| Hotel Zephyr | $119/night | 4.1 stars review |

The flight options are:
| Airline | Flight Time | Duration | Number of Stops | Class | Price |
| --- | --- | --- | --- | --- | --- |
| United | 5:30am-7:37am | 2hr 7 min | Nonstop | Economy | $248 |
| Delta | 1:20pm-3:36pm | 2hr 16 min | Nonstop | Economy | $248 |
| Alaska | 9:50pm-11:58pm | 2hr 8 min | Nonstop | Premium | $512 |

An employee is booking travel to San Francisco for February 20th to February 25th.

Recommend a hotel and flight that are in policy. Keep the recommendation concise, no longer than a sentence or two, but include pleasantries as though you are a friendly colleague helping me out:

What it is

Embeds a company travel policy and hotel and flight options in the prompt, then asks for a short, friendly recommendation that stays within policy. The guide was created by Brex from its own work on production prompts, and the guide's screenshot of this travel example is captioned GPT-4. The prompt text is copied unmodified from Brex's Prompt Engineering Guide (MIT licence, Copyright (c) 2023 Brex). Original author: Brex.

Who it's for

  • Operations and finance teams
  • Developers embedding data in prompts

يضمّن سياسة السفر في الشركة وخيارات الفنادق والرحلات في البرومبت، ثم يطلب توصية قصيرة وودودة ضمن حدود السياسة.

Examples

JSON output add-on from the guide

Prompt
prompt
Produce your output as JSON. The format should be:
```
{
    message: "The message to show the user",
    hotelId: 432,
    flightId: 831
}
```

Do not include the IDs in your message.

Expected output: The guide adds this to the travel prompt so the result can drive buttons in a UI.

Tips

  • The source calls giving the bot all the information it needs the most reliable approach, and says to use it whenever you can.