Insights  · 4 min read

Prompt-engineering for GPT-4 and other language models

Developer Kris explains how Sping uses AI to power the Highlight Delft 2024 tour guide, and shares six essential tips for writing effective prompts for language models.

Developer Kris explains how Sping uses AI to power the Highlight Delft 2024 tour guide, and shares six essential tips for writing effective prompts for language models.

AI Tourguide

Highlight Delft is Delft’s innovative art and technology festival that shapes the future through art, science and technology. Sping is sponsoring the festival with a tour guide powered by artificial intelligence, creating a unique fusion of science, innovation and creativity.

“Highlight Delft is a fantastic opportunity to experiment. Because the technological festival is ahead of the future; artists show things that do not exist today, but will be possible later on.” — Jan Gerard Snip, Founder/Director Sping

Large Language Models

Large Language Models (LLM) are models that predict the next logical word. These have become sophisticated enough to answer questions posed by users, functioning much like a chatbot. ChatGPT is the most well-known example.

How does a language model work?

For Highlight Delft’s chatbot, Kris uses GPT-4, the technology behind ChatGPT. GPT-4 is a language model created by OpenAI that can be “programmed” through instructions called prompts. For this project, Kris instructs GPT-4 to act as a virtual tour guide, answer visitor questions, and honestly admit when it lacks information.

The chatbot is programmed by giving commands that send information to OpenAI’s servers, where the language model predicts the outcome word by word, generating informative text. The chatbot is then integrated via API onto the website.

An intelligent chatbot for Highlight Delft

Kris’s concept involves deploying this technology on Highlight Delft’s website. A language model serves as an accessible way to demonstrate current technical capabilities. He creates a chatbot for each artwork, accessible via QR codes at the festival.

Art and technology often raise abstract questions from visitors. Rather than reading standard information signs, visitors can ask the chatbot directly—for example, “Why is there a blue light flashing at this artwork?” The language model is fed information about artworks and can access internet information, enabling the AI tour guide to answer all questions comprehensively.

Example: chatbot response

Question: Who is Sophia Bulgakova? And what kind of artwork does she have?

Sophia Bulgakova is an interdisciplinary artist born in 1997 in Odesa, Ukraine, currently based in The Hague. With an ArtScience background, her work explores the intersection of art, technology and society, focusing on light, perception and imagination through various sensory inputs.

One notable work is “YOU ARE SOURCE PROJECTION AND REFLECTION” (2019), a projection-based installation exploring physical space and nonlinear legibility. The audience navigates an environment of merging word clouds using transparent screens, creating infinite compositions centered on viewer imagination.

A new application of the technology

Language model technology has existed for only about a year, with several applications already emerging.

Kris van Melis, developer of the Highlight Delft AI tour guide However, Sping hasn’t seen this technology deployed as a personal tour guide before, making it a genuine innovation with potential for other festivals, museums and cultural events. This Highlight Delft project serves as an internal test for wider AI applications.

An important caution: “The danger of a language model is that not everything it says is substantively correct. Just as not everything on the Internet is true, people need to learn that not everything ChatGPT or any other language model says has to be true.” — Kris van Melis, Developer

6 tips for prompt engineering

1. Give your language model a role

Tell the model its function clearly. For Highlight Delft, GPT-4 is instructed it’s a tour guide. Define the chatbot’s role and purpose before asking questions. You can enhance direction by providing article titles and paragraph topics.

2. Split up your assignments

While language models can handle multiple tasks simultaneously, too many assignments cause errors. Ask the model to describe steps needed to complete a task, then execute each step individually.

3. Give your language model a personality

Personality helps users understand the chatbot can make mistakes. Phrases like “I sometimes make a mistake” increase user tolerance for occasional errors and set realistic expectations.

4. Tell your chatbot to be honest when it doesn’t know the answer

When instructed to indicate uncertainty, the language model will do so, reducing misinformation.

5. Provide a file with additional information

For event-specific questions (like “Where are the toilets?”), attach supplementary files to GPT-4 since this information may not exist online.

6. Suggest questions for your users

Sample questions guide users toward productive interactions and clarify that they should ask full questions rather than entering keywords.

Back to blog

Related posts

View all posts »
How we learned to trust our AI assistant

How we learned to trust our AI assistant

Sping built a sales assistant that challenged our assumptions about AI autonomy — and revealed that trust in algorithms works much like trust in human colleagues: through context and dialogue, not rigid rules.