DEV Community

Cover image for 🥳 with Bedrock - partyrock!

🥳 with Bedrock - partyrock!

What is Partyrock?

AWS puts it as - "PartyRock is an educational tool for providing any builder with low-friction access to learn through experimentation in a foundation model playground built on Amazon Bedrock." Here is the AWS blog post about it.

What is it really?

It is AMAZING! After spending the last 2 days playing around with it, I can confidently say its a gamechanger! It allows anyone (and I mean anyone!) with an idea to get up and running in mins (yes mins). You simply click on "Generate an App" and provide information of what your app should do, and the AI takes care of the rest.

Generate App window

What is it not?

Right off the bat let me clarify what it most certainly is not:

  • its not a product or service, its just a playground

  • the underlying models aren't connected to the internet (yet), so take the information provided with a grain of salt

  • its not going to build you a production ready application

  • your limited to only text inputs and text or image outputs (as of now)

So what can you really do with it?

Well anything really, your imagination is your limit. The playground enables anyone to build a text based app within mins that is functional and publicly shareable.
Here is a step by step walkthrough of how I built the Trip Planner app

  • The initial prompt: Try to be as specific as possible by outlying the exact inputs you want from a user that the AI needs to factor into account. I found the below format to be effective in controlling the input labels that get generated

Generate App filled

  • Customizing the layout: The app that was generated looked like this -

App initial

Not so pretty right, lets re-size the boxes and rename the app title. Click on Edit on the top to get into the edit mode. Here is the updated view -

App resized

  • Try it out: Fill in the inputs and watch the AI work its magic -

App attempt 1

Neat! but whats with the 7 day itinerary when my dates are from March 1st to 4th? This brings us to the next step.

  • Prompt Engineering!!: Hit the edit button on the Itinerary widget to see the prompt that powers the AI response. You'll notice that it says "Suggest a detailed 7 day itinerary"! Not so smart eh AI! I modified the prompt to give it more specific instructions on how to create the itinerary -
Suggest a detailed day-by-day itinerary starting from the [From] city to [To] from [Dates], with a total budget of [Budget] USD.
Include cost of travel from [From] city to [To] city (suggesting multiple modes of transport if available), proposed attractions, activities, places to stay, and places to eat. Provide hours of operation and cost estimates where available. 
Take into consideration the number of travelers mentioned - [Travelers] 
You should recommend restaurants based on the food preferences specified - [Food Preferences].
You should recommend hotels based on stay preferences - [Stay Preferences] 
Day 1 of itineray should start with travel from [From] to [To] and the last day of itinieray should be the travel back from [To] to [From].
Consider [From] to be the home city of the user.
Do not make stuff up, if there isn't enough information to make a recommendation then say - "I'm sorry, I couldn't find enough information to make a recommendation".
Enter fullscreen mode Exit fullscreen mode

And that should give you a much better result -

App attempt 2

  • Publish the app: Once you are satisfied with the results, you can hit the "Make public and Share" button to share your app

The app that I ended up publishing here has more customizations and an added widget for Hotel Recommendations and a chatbot that lets you discuss your itinerary and customize it. Here are the prompts for them -

Hotel Recommendations -

Based on the itinerary defined here - [Itinerary], suggest hotels for the trip factoring in the suggested hotel costs.
Take into consideration the following -
1. traveler profile specified by the user - [Traveler Profile].
2. stay preferences - [Stay Preferences] 
3.food preferences specified - [Food Preferences].
Do not make stuff up, if there isn't enough information to make a recommendation then say - "I'm sorry, I couldn't find enough information to make a recommendation".
Your response should only be in the format - 
=> {Hotel Name} - {Price per night} - {reason for recommendation}
Enter fullscreen mode Exit fullscreen mode

Trip Advisor -

Assuming the role of an experienced travel advisor, answer any questions the user may have about the trip they are planning. 
Context for the chat - 
Number of travelers - [Travelers] 
Origin City - [From] 
Destination - [To] 
Dates - [Dates] 
Budget - [Budget] 
Stay Preferences - [Stay Preferences] 
Food preferences - [Food Preferences] 
Traveler profile - [Traveler Profile] 
Current Itinerary - [Itinerary]
Enter fullscreen mode Exit fullscreen mode

Have fun partying!!

Top comments (0)