Chatting with an Airbnb listing using data-backed generation.

Screenshot of a ChatGPT interaction where it doesn't know the answer to the question asked.

As today's most impressive language models make incredible strides at creating human-like interactions that are real enough to even keep Alan Turing shivering in his grave. These incredible innovations have created an immediate shift in user expectations, however.

Users interacting with these models want them to know the answers to their questions whether it's global, generally known knowledge, or its hyper-specific information, or even internal documents and data not found anywhere on the web.

While models are already being taught how to attempt to dynamically scour the internet to find the answers to questions it wasn't trained on, this approach will likely be error-prone, slow, and unideal for many use-cases for a long time.

At nokori we've worked hard to build a brilliantly simple way to interact with data that is already on hand, providing instant intelligence to any context where written or spoken user interactions demands accurate responses.

Chatting with an Airbnb listing

Screenshot of an Airbnb listing

For demonstration purposes, we're going to be having a brief dialog with this Airbnb listing.

We're using our JavaScript SDK for this. Feel free to check it out and follow along!

Some brief setup work

To get started, we simply copy and paste whatever text from the listing we can find into a global context variable we will use to pass to the nokori Generate API to answer context-specific prompts.

const context = [
  "Entire rental unit hosted by Laurel",
  "8 guests 2 bedrooms 4 beds 2 baths",
  "INTRODUCING our 2nd new luxury apt in the Burnham building. I had so much fun designing this one with the assistance of my amazing designer friend.PERFECT location to get the FULL Nashville experience! Walking distance to all attractions. Enjoy the GORGEOUS pool by day & fire pit at night, plus a gym! Broadway (Honky Tonks & Live Music), Bridgestone, Nissan Stadium, The Music City Center, Ryman Auditorium, The Convention Center, Honky-Tonks, Printer's Alley, Ole Smoky Moonshine & more. The space: Please note this building is in the very heart of downtown Nashville. We are not responsible for any uncontrolled variables outside of this building such as noise, private or public events, construction, etc that may be happening outside at the time of your trip. This is a multifamily complex whose ownership controls the amenities/common areas and exterior/shared interior spaces and maintenance of appliances and interior physical conditions of the apartment (including but not limited to plumbing, electrical, hvac, drywall, etc) and as such these items are out of our personal control. We are bound to abide by the building's protocol when it comes to maintenance issues and timelines to resolve. All other items we personally take care of. We strive to deliver a wonderful stay and experience on everything we can control within the apartment itself to ensure you have a fabulous time in Nashville, living like a local!. Guest access: Our unit has 1 PRIORITY private reserved parking space for $25 per night. There is street parking off premises, and paid parking in the garage and nearby lots. Paid parking in the garage is $30/day with 25 guest spots that are first come, first serve. I also recommend carpooling!",
  "Courtyard view Kitchen Wifi Dedicated workspace Shared pool - available all year TV Elevator EV charger Free washer – In unit Free dryer – In unit",
  "4.93 136 reviews",
  "Nashville, Tennessee, United States We are located at the corner of 5th Avenue South and Peabody Street. We are less than seven miles from the airport and walking distance from everything Downtown Nashville including: Bridgestone Arena The Famous Broadway Strip The Gulch Nissan (Titans) Stadium The SoBro District Ryman Auditorium BB King's Blues Bar Frist Art Museum",
  "During your stay: I'm a short 12 minute drive from the building and run a cleaning service inside of it as well so I'm on site 6 to 7 days a week.",
  "Laurel is a Superhost: Superhosts are experienced, highly rated hosts who are committed to providing great stays for guests."
  ]

Notice: no formatting was applied to the content. We simply found whatever text content we could and pasted it in.

We've constructed the content as an array of strings to show that in many real-world contexts you may need to provide multiple documents in order to construct the full "context" needed to answer the prompts.

For this particular example, we could have easily combined it all as one large body of text.

Answering Listing-Specific Questions

Now that our global context is established, let's start asking some questions!

"Is this a single room or full home?"

const {data: result, error} = nokori.ai.generate({
  prompt: "Is this a single room or full home?",
  context: context
})

Result: "This is a full rental unit with 2 bedrooms, 4 beds, and 2 baths."

"Is wifi available in the property?"

const {data: result, error} = nokori.ai.generate({
  prompt: "Is wifi available in the property?",
  context: context
})

Result: "Yes, Wifi is available in the home."

"Can I charge my Tesla here?"

const {data: result, error} = nokori.ai.generate({
  prompt: "Can I charge my Tesla here?",
  context: context
})

Result: "Yes, you can charge your Tesla at this rental unit, as it offers an EV charger for guests."

Notice here the model's knowledge that Tesla is an electric car company from it's broad training, but leverages the specific context we are providing to answer context-specific questions that would never be answerable from the model's general knowledge and training alone.

Bonus Round

What if we want to ask the listing a question that has a lot of subjectivity?

Perhaps given the proximity to the world-famous Broadway there in Nashville noise concerns at night may be of concern to guests who tend to go to bed at an earlier hour. How might the model respond?

"Should I have any concerns about noise levels at night?"

const {data: result, error} = nokori.ai.generate({
  prompt: "Should I have any concerns about noise levels at night?",
  context: context
})

Result: "You may experience noise levels at night due to the central location of the rental unit in downtown Nashville. The host is not responsible for any uncontrolled variables outside of the building, such as noise and public events. However, the rental has good reviews, and the host is committed to providing a pleasant stay."

This was an extremely subjective question that was just asked, but notice how the model picks up both the fact that the property is described as being close to the heart of a busy area, and also that it has a 4.93 average review based on over 100 reviews and references that in it's response to be holistic.

Awesome!

Wrapping Up

As you can see, data-backed generation allows for an incredible, accurate way to build chat experiences based on real-world data. Use-cases extend far beyond publicly accessible data like this Airbnb listing.

Internal documents, knowledge bases, databases, FAQs, emails, and more can be used as context to answer highly specific questions accurately and based on factual information.

Interested in how you can use nokori Generate in your own company? Shoot us a note at hello@nokori.com.✌️

Join the newsletter.

Receive updates when we ship new features, as well as tips and guides for getting the most out of nokori.

Timely articles
We only publish high quality content when we have something to useful to share. No fluff, no spam.