Book Flights in Plaintext with Backengine

Simon Spurrier
Backengine
Published in
3 min readMay 12, 2023

--

In this post, I will detail the straightforward process of creating a Backengine endpoint that helps you build a flight search using plaintext.

Follow along in the playground!

First, head to the dashboard and select ‘Add New Endpoint’.

Give your endpoint a name and, if you like, a brief description. Click ‘Create Endpoint’.

For now, we’ll be working on the ‘Configure’ form.

There are only a few fields to complete:

  1. The prompt: this is the prompt that the LLM will receive, combined with the input you send to your endpoint.
  2. The LLM model you want your endpoint to use.
  3. Request template: the format of the incoming request to be combined with the prompt.
  4. Response template: the format of the response that the endpoint will return.

The prompt asks the endpoint to convert a description of a flight booking to discrete fields required to search for a flight.

We’ll also choose ChatGPT 3.5 for this task.

The request template and the return template tell our endpoint how the incoming request and outgoing response should look, as well as defining types. You can think of it a bit like providing an example. In this case, we’ll receive and return a string. Be as correct and specific as you can.

Click ‘Save & Deploy’ to save your endpoint. That’s it!

Testing

Let’s test it out by turning our attention to the ‘Test’ panel on the same page.

Here, we can define an input that we may pass from our own application, to see if the endpoint works as expected. Depending on what we find, we may have to do some prompt engineering to get the LLM to respond as we would like.

Looks good!

Deployment

Your endpoint should already be deployed. You’ll see the URL and an example curl request.

And that’s it! You can integrate this endpoint anywhere you like.

Sign up for free to have a go yourself.

--

--