brif

An AI pitch deck generator from 2023. I designed its pipeline of chained GPT roles and set up the AI infrastructure.

Year
2023
Status
archived
Role
Pipeline design, AI infrastructure

brif was an AI pitch deck generator I worked on in 2023 with a small team. A founder answered questions about their company and got back a deck with written slides and generated images. I designed the multi-expert model pipeline and set up the AI infrastructure. Teammates built the queue consumers, the backend and the email flow.

Why three models instead of one prompt

GPT-3.5 could not reliably analyze a company, write a deck and direct images all in one prompt. So I split the job into roles, where each one receives the previous output and does one thing. We called them experts. Today this shape would probably be called an agent pipeline.

brif pitch deck pipeline A job arrives from a RabbitMQ queue. A company analyzer passes its output to a pitch deck writer, which produces JSON slides, then a DALL-E prompter writes image prompts. DALL-E generates images, and the finished deck is saved through the backend API. If any step fails, the deck record is deleted. RabbitMQ jobfounder answers Company analyzergpt-3.5-turbo, reads the answers Pitch deck writergpt-3.5-turbo-16k, slides as JSON DALL-E promptergpt-3.5-turbo-16k, one image prompt per slide DALL-E images Deck saved through the API
Three chained model calls, each with its own role and prompt. If a step fails, the deck record is deleted.

Prompting in 2023

Most of the engineering was in the prompts:

  • Few-shot examples. Each role saw a worked input and output pair as earlier chat messages before getting the real input.
  • Labeled sections. Prompts marked their parts with tags such as <INSTRUCTION starts> and <NOTE starts>, to keep instructions apart from data.
  • JSON by instruction. The writer and the image prompter returned free-form text that we passed to JSON.parse, with no schema enforcing it. When the model broke the format, the job failed, and that drove a round of prompt fixes in September 2023.

Structured output now handles that last problem at the API level, but splitting one task into roles with narrow prompts is still how I would start.