An AI/LLM Tour Guide

Manchester is a city rich in history. It is considered the birthplace of the industrial revolution and has a legacy of social activism. It seemed the perfect setting for an AI-driven social history tour guide.

This solo project emerged from in-depth conversations with ChatGPT about social history and its ability to create intricate narratives by connecting diverse themes and viewpoints. Its ability to answer context-driven questions inspired the idea of creating an interactive tour guide experience that would be informative, engaging and entertaing for fans of social history. With a blend of historical knowledge, multimedia elements such as music, videos, and images, the guide offered an immersive way for users to explore the city’s past.

In this post, I’ll go through how it was developed, discuss some of the challenges and solutions, and dig into the technical solutions implemented to bring the AI Tour Guide to life.

Getting started

The first task was to decide on the content of the tour. Manchester is full of history and so there was plenty to choose from. Naturally, ChatGPT helped with some suggestions.

Create an outline of a social history tour about industry and social activism in Manchester. It needs to last a few hours and be walkable.

Deciding What to Cover

This gave a short list of places with key themes that would be good to talk about, and why the stop would be important. I reshaped the themes and the order to create a manageable walk around Manchester, and checked that it was wheelchair accessible (because inclusivity matters). Pubs, bars and restaurants were added to each stop to give the user an opportunity to stop for something to eat or drink to increase the social aspect.

The list of places became:

  1. Castlefield the first canal and the start of the industrial revolution
  2. Friedrich Engels the roots of Engel's and Marx's work
  3. St. Peter's field the Peterloo Massacre and a change in governance of the country
  4. Emmeline Pankhurst and her fight for women's rights
  5. Northern Quarter the old mills of Cottonopolis
  6. Ancoats the world's 1st industrial suburb

By using Google Maps to look for places around each location which had good reviews, I made a list of generally 1-2 places that sold food and the same for places for drinking, along with their opening hours.

Adding media

The next step was to bring the experience to life with music, images and video. I found a track that I felt represented each place and got links to Spotify, Apple Music and YouTube. Images were particularly difficult to find in the public domain, or with a CC BY-SA 2.0 licence (public as long as you attribute the author).

The links for each section included relevant sites and downloads which add to the story, such as English Heritage guides, Wikipedia pages, or even an IMDB link in the case of a film about Peterloo.

Adding a Microsite

Having previously developed a love for microsites (small websites focused only on one small function) on my Lisbon itinerary and summer party site, I thought using the same idea here would be a great platform to deliver the different media and help set the tone of the experience with font and colour.

The microsite's theme was a clean and simple text design to mimic 1800s print style: large capital serif fonts, ligatures between some characters, and a background the colour of paper. Not only did this help with the historic feel, but it worked well for all screen sizes.

To keep responsive design in mind, I chose a simple accordion UI so users could choose their own order to the tour, and included an introduction page and a link to the overall walking route on Google Maps. Each stop had a section, with the same set layout.

  • The place to go to
  • The music to play on the way there
  • Images
  • Links
  • Places to eat and drink
  • Suggestions of further questions to ask the AI

By keeping the format uniform for each stop, the user could easily find their way around the stops on the microsite. Having got a design idea, and content, I put together a draft design in Figma to be able to play around with different arrangements, before settling on one.

With a chosen design and common reuseable UI components, the next step was building it.

Technical Implementation

The quickest way to get a microsite started is to use a template that is closest to your idea. The hosting service Vercel provides a range of pre-configured projects. I chose one of their Next.js templates because it offers built-in server-side rendering and static site generation, making it faster and SEO-friendly out of the box. In addition Vercel (being the creator of Next.js) takes care of all the hosting the project.

This made it effortless to get to website running on a custom domain with SSL certificate deploying from a Github repo.

All that was left to do was to check out the Github repo and alter the template.

Creating a Microsite

The template comes with all the boilerplate code needed to extend it. It used Tailwind CSS for styling, and so I just needed to build some components that matched the Figma design and things were quickly up and running.

The only configurable aspects in the site were the ability to choose the preferred music service (which alters the music link provided), and change the language.

Designing the Custom GPT

To those not familiar with ChatGPT custom GPT feature, it allows you to create a version of ChatGPT which has a pre-configured prompt, and a rather of other LLM-related functionality to create a specialised version of ChatGPT.

In the context of a social history tour guide, this allows

  • A prompt to define how the AI should talk, what it should focus on, and how it should lead the user through the experience
  • A file containing knowledge about each stop which the GPT could use for Retrieval Augmented Generation, commonly known as RAG.
  • A function or tool (or an action in OpenAI's terminology) that the GPT could call to get the current time in Manchester, necessary when reasoning which bars or restaurants were open if the user asked
  • A core text interface presented to the user to explain how to use the GPT, along with some sample questions a user might ask the GPT

The Prompt

The prompt was carefully crafted to set the parameters for the tour guide’s behaviour. Key components included:

  • An explanation of the RAG source format, and how the LLM should reference it.
  • A defined conversational tone to maintain user engagement.
  • Limits to keep discussions focused on relevant topics.
  • Instructions for integrating time-checking via a custom API.

The Action/Tool

To allow the user to ask about bar and restaurant opening times, I integrated worldtimeapi.org as a ChatGPT action which enabled the guide to reason about what was open based on Manchester local time. The API call was embedded in the GPT’s logic and its usage explained in the prompt.

View the code of the Action

The RAG Source

A structured text file formed the backbone of the guide. It included detailed information about each stop on the tour, historical facts, details about the links, images and videos on the microsite so the AI could refer to them. It provided details about each bar and restaurant along with opening times. The RAG source was structured inline with the explanation given to the LLM in the prompt.

Conversation Starters

The last aspect of the AI was the UI in ChatGPT. ChatGPT allows custom GPTs to have a range of buttons which act as helpful suggestions for conversations starters. They're just simple phrases that the user can click which are then passed to the AI. I added

  • "How does this work?"
  • "How do I start the tour?"
  • "What’s the website address?"

Managing Risks

As the vast majority of functionality was outsourced to OpenAI or Spotify/Apple Music/YouTube, with risk mitgation of their own, very little issues fell to the custom AI itself that hadn't already been taken care of by OpenAI. Things like malicious language, the AI giving instructions to illegal things, or other illicit conversations are blocked by OpenAI. There was a risk of prompt injection but if a user attempted this, and even succeeded, the only thing they'd do would be to end the tour.

The only potential issue was the user asking to be told the original prompt, which I was happy for the AI to give out. As the tool is free to use, there's no concern for loss of IP. I tested my own prompt injection and the AI did indeed give a version of the original prompt intermixed with the RAG source data.

The last remaining issue was that the user may try to download the RAG source itself, by discovering the name of the file and requesting it. OpenAI provide functionalities you can allow or disallow on a custom GPT, such as 'web browsing', or 'image generation' amongst others. By disabling the 'code interpreter & data analysis' this blocked any file downloads entirely, thus preventing users from accessing the underlying data.

User Testing

Trial in Manchester

To validate the guide, a friend and I tested it on-location in Manchester. We followed its instructions and explored the city, which helped identify areas for refinement and confirmed the guide’s practicality in a real-world setting.

We were both really impressed with its performance. The AI maintained an engaging tone throughout the tour, weaved an interesting narrative and connected topics which we asked it about in an interesting manner. The media really helped to ground the experience, and in particular the combination of bars made it an interesting day out.

Two particular stops on the tour gave me a particularly emotional experience that I wasn't expecting.

The first was walking to the Peterloo Monument. This was a place I'd walked past many times and hadn't even realised there was a monument there. But to walk up to it, aware of the deaths it represented, those fighting for the simple right of representation to no longer be forced to starve, whilst listening to the solumn and requiem-like Spiegel im Spiegel (the stop's recommended music) I must admit brought a tear to my eye.

The second was watching the Emmeline Pankhurst 'I incite this meeting to rebellion' speech (a link for the stop on the microsite) whilst sat facing her statue. To be in front of her statue and to hear her anger and frustration brought the statue and its meaning to life in a visceral way.

Gathering Feedback

I also shared the microsite with friends to gather feedback on its usability and content. Their input proved invaluable in tweaking the user experience and ensuring the guide was usable by others.

Challenges and Lessons Learned

Generally the project wasn't too difficult to carry out, except for a few issues.

  • Sourcing materials: Obtaining high-quality, public domain images and videos was more challenging than expected, particularly for older maps and rare photographs. I didn't realise that historic media is generally behind some kind of paywall.
  • Licensing music: Redirecting users to music streaming platforms avoided licensing fees while still providing an engaging experience. I would've preferred to have the user simply push a play button on the microsite but the cost would've been potentially thousands per track in licencing.
  • Information complexity: Structuring the RAG system required meticulous attention to detail to ensure the guide’s accuracy and coherence, gathering accurate details about the stops, bars and restaurants took many hours of note taking, searching and verification to check.

Conclusion

The AI Tour Guide for Manchester project demonstrated the potential of AI to make history more accessible and engaging. By combining conversational AI with multimedia elements, the project delivered an interactive exploration of Manchester’s rich heritage. While there were challenges, the end result was a unique, user-friendly experience that highlighted the conversational power of AI-driven education.

This project has inspired me to explore similar applications in other contexts, where AI can provide innovative ways to learn and connect with the past.

Feel free to try the experience at the microsite and be sure to send feedback.