How to build a ChatGPT-powered documentation generator

Today you’ll learn how to build a ChatGPT-Powered Documentation Generator.

Do not index
Do not index
Hello there!! 👋
Let’s dive straight into it.

Today’s Task 📝

🧱 Project: Draft Documents Effortlessly
⏲️ Estimated time: 30 minutes
🛠️ Tools: ChatGPT

Context📄

Today, you'll make a ChatGPT-powered document generator.
What does this mean? It's essentially a tool that will help you quickly draft important business documents. It works like an AI assistant (or you can think of it like your own assistant), writing for you.
Here's an example of how you can write a marketing strategy document with ChatGPT for our fictional product WhosApp 👇
notion image
 
In this lesson you’ll learn:
  • How to construct prompts using the PREP framework
  • How to build a ChatGPT-powered documentation generator
  • How to modify your prompts

Let's Prep 🥗

We introduced the PREP framework in the Intro to AI guide, but let's just take a moment to recap. It’s a four-step framework to help you create effective prompts for ChatGPT that generate outputs based on your specific requirements. It stands for:
  • Prompt: Setting the context for your interaction with ChatGPT.
  • Role: Defining ChatGPT's role in this scenario.
  • Explicit Instruction: Clearly stating what you want ChatGPT to do.
  • Parameters: Defining the scope and limits of the task.
Here are 3 examples of how you might use the PREP framework for creating different types of document. These are deconstructed prompts; we have annotated them with each step in the framework (in bold) 👇
 
Product Requirements Document (PRD)
Prompt: We're working on a new feature for our app that will help users message each other securely called WhosApp.
Role: You're an expert product manager with deep technical and design experience.
Explicit Instruction: Draft a product requirements document for this feature. The document should include sections such as: an overview, goals, features, user experience, and technical requirements.
The product features include messaging, user profiles and login functionality.
Parameters: The document should be clear and succinct, aiming for a maximum of 3 pages in length.
 
Legal Document
Prompt: We need to create a non-disclosure agreement (NDA) for a potential business partnership between our company WhosApp and a contractor.
Role: You are an experienced legal advisor who understands the intricacies of business law.
Explicit Instruction: Draft a comprehensive NDA. The document should include sections like: definition of confidential information, obligations and exceptions, term and termination, and legal remedies.
Parameter: Aim for a complete, legally sound document consistent with US commonwealth law, but keep it as concise as possible, ideally not more than 5 pages.
 
Marketing Strategy
We're launching a new product called WhosApp and need to create a marketing strategy to promote it. WhosApp is a secure messaging app for people who care about privacy.
You're a seasoned marketing strategist with a knack for innovative and impactful campaigns.
Develop a comprehensive marketing strategy. The strategy should cover sections such as: executive summary, target audience, unique selling proposition, marketing tactics, budget, and key performance indicators (KPIs).
The strategy should be succinct and no more than 3-pages long.
 
As you can see, the PREP framework allows you to create specific, tailored prompts that can help ChatGPT generate a wide variety of documents for you. In the next sections, we'll dig deeper into each part of the PREP framework.
 
Prepare to create:
Before we dive into constructing prompts and generating documents, it's beneficial to ensure you have the necessary tools and resources at your fingertips. Follow these steps to get ready:
  • Create an account on ChatGPT here.
  • Start thinking about what document(s) you want to create (if you have a real life example of something you need to create, that will work best)

Time to Cook 👩‍🍳

  1. Write your PREP prompt.
Once you have decided which document you'd like to create, write your prompt using the PREP framework. As you write, it's useful to ask yourself:
  • What's the goal of this document?
  • What kind of knowledge should ChatGPT have to write this?
  • What type of document do you need to be written - a technical one, a customer support doc, a business process?
  • What length and tone should this document have?
As a reminder, here is the PREP framework:
  • Prompt: Setting the context for your interaction with ChatGPT.
  • Role: Defining ChatGPT's role in this scenario.
  • Explicit Instruction: Clearly state what you want ChatGPT to do.
  • Parameters: Defining the scope and limits of the task.
 
Enter your prompt into ChatGPT and hit enter. The more context you can give ChatGPT, the better. Go as detailed as you have time for.
 
  1. Modify and refine your document.
Watch the draft unfold. Review it.
If you want to make some tweaks, take charge and ask ChatGPT to add, remove, or modify sections using follow-up prompts. See the example 👇
Add a section about our company overview. Here’s our company description:
{insert company description}
Continue refining your document until you're happy it's ready for real-world business use!
 
  1. Finalize your document.
Happy with your creation? Save it to your text editor of choice for any final formatting changes and edits.
 
That’s a wrap, we hope you found this lesson helpful!
  • If you have any questions, feel free to reach out.

The easiest way to learn practical tech skills in 100 days.

Join other 40,231+ learners now!

Subscribe

Written by

Max Haining
Max Haining

Founder of 100School.com