From the lab

Parenting forum GPT

Can generative AI be used to recreate the tone and imitate content from a bustling internet forum like Familjeliv? Three developers decided to find out during Prototyp Week.

Tech used

  • LangChain
  • Pinecone
  • Fastify
  • Typescript
  • React.js
  • Redis

Press to view video

Background

Simon, Balthazar and Gustav initially wanted to explore the possibility of creating a job title generator using AI. After researching and experimenting with Meta's Llama 2 model and resources from Hugging Face, they decided to use OpenAI's API for their project.

As the idea evolved, the team took on a larger challenge. Instead, they aimed to create a GPT inspired by the popular, anonymous, and often conflict-ridden Swedish parenting forum, Familjeliv.se. All the data was readily available, and the tone of the forum is considered unique.

The Process & Challenges

The team divided the backend and frontend tasks. In the background, a response was generated to the visitor's question, which was then used in a prompt to OpenAI. It turned out to be important to tweak the prompt throughout the week to create more accurate output in the true spirit of Familjeliv.

One challenge was to fetch the forum's massive data flow in a structured way. The team built a scraper that fetched and sorted all forum threads into a vector database. From this, they could create their own language model. This process is often referred to as RAG, or Retrieval-Augmented Generation.

The work was time-consuming and didn't always go as planned, but since the essence of the project was not built on perfection, it became a test process that the team found both educational and entertaining.

Result & Key takeaways

The project explored how much context and framing one can create in an AI model to mimic a unique and multifaceted language use. With FamiljeGPT, the team showed that it is indeed possible. The interest in APIs and large data flows—from input to graphical user experience—thrived during the week, while the team got the opportunity to delve deeply into how language models and generative AI work under the hood.

Future Actions

The project demonstrates the power of tools like ChatGPT and provides inspiration on how to utilize existing data sources to carve out a unique knowledge base with a distinctive tone. There are plenty of other web-based forums or databases that could be used similarly in the future—or why not build a GPT from internal Slack history?

For Prototyp's customers, the project's insights are perhaps most applicable in the development of AI models for inspiration materials or customer service inquiries.