Real-World Custom Instruction & Plugin Application: Create a complex B2B customer profile (school district) using only a teachers email address!

Here is a link to the entire conversation that led to the creation of these custom instructions.
For context: I re-used an old conversation because I liked the plugins (ignore the first few prompts) that I had used for diagramming MARSfarm’s software architecture.

My Process to create Custom Instructions

Goal: Create a MARSfarm quote based on a (validated) customer profile using only a teacher’s email address. This is complex because it requires identifying the purchasing organization (district), and the school the teacher actually works at which is the shipping organization. It is possible though because almost every school provides a public list of their faculty and there are government websites that index school domains and associate them to unique identifiers.

  1. I began by testing the order of operations for the process with a simple outline. I went back and forth with GPT for hours to rearrange that process after testing the functionality of various plugins, public data sources, and validation methods. At this phase I used only prose and quickly found myself running up against the 1500 max characters. I would run the same prompt over and over again (from the beginning of a new chat): use this email address to identify purchasing organization teachername@schoolname.org - automatically proceed to step b

CI Section 1

User Profile: Peter Webb, Sales & Support Specialist, MARSfarm Corporation;

Company Profile: St. Louis Missouri, 4 employees, founded in 2020; Company vision: Technology is revolutionizing agriculture and educators are desperate to bridge the growing disconnect between the technology being used in the industry and what is accessible to them. 

Products: MARSfarm sells countertop-sized smart greenhouses and consumable growing material kits. Firmware controls the heat, light, water, and uploads data hourly. Our online platform converts sensor data into charts and photo time-lapses for students to view. Through our web application, platform, students are able to program new climate recipes, which may then be sent to their greenhouses.

Customers: The price and size of MARSfarm allows for multiple units in a classroom. We want schools to purchase one countertop-sized greenhouse for every 4 students in their schools agriculture education program. Suggest integrations with FFA Agriscience Fair, CASE Curriculum, Horticulture Labs, Plant Science Labs, Agriscience, etc; CTE Directors and admin is more interested in enrollment into agriculture classes or expansion into middle schools, agricultural educators want to allow for more student inquiry; Our competition is traditional greenhouses which about half of schools have. If a school has a greenhouse the MV1 can help determine how to set its thermostat or lighting schedule. If they do not have an ag program, suggest the FG.V4.GCK.

CI Section 2

Email threads: 1. Extract all text from the email threads. 2. Provide a summary of the email conversation formatted as a timeline. Include a very brief summary of who did what action (ex: peter updated invoice #423 and sent it to rhonda cotes). 3. Use the customers email signature (my email will end in @marsfarm.com) to identify the purchasing organization in this B2B sale. 4. Extract the billing address for the purchasing organization (District, school board, etc.) as well as any other addresses or fields included in the customers email signature (shipping address, email, phone, role, specific school location). 5. If address was not included in signature, use wikipedia or public data (prior to 2021) to identify the billing address, shipping address, phone number, and lastly its sales tax-exemption status based on the type of organization and state in which they are located. Compile all of those into a drafted customer profile. 6. Provide options for next steps (see below hotkeys list).

Hotkeys List:
🔑 4+ multiple-choice options

a: read the email thread again and extract more key fields and context about the customer. 
b: use historical public data from places like wikipedia to identify more information about the customer.
c-1: draft email response to the customer suggesting the purchase of one MV1 for $1579 with a ship date of 10/14. 
c-2: draft email...suggesting the purchase of FOUR MV1 for $6316 with a ship date of 10/14. 
c-3: draft email...suggesting the purchase of a FG.V4.GCK for $689 with a ship date of 10/01.
c-4: draft email...suggesting the purchase of FIVE FG.V4.GCK for $3445 with a ship date of 10/01.
c-5: draft email...suggesting the purchase of a FG.V4.ERP for $114 with a ship date of 10/01.
  1. Once I had a pretty clear outline, I wanted to diagram it to understand it better and reduce it to its bare bones components (to minimize text required) - I believe this is the step that converted my prose into JSON.

  1. Ask it to rewrite the process as custom instructions, which I then describe as a feature to create pre-assigned context as a user when prompting - it got the idea. I have already shared my method of getting ChatGPT-4 to write its own custom instructions on this topic:

Thanks to quick replies/encouragement from @Reese @sonny_ahsan and @germano - I decided to make this topic and share my entire instructions:

CI Section 1

{
  "Customer_Profile": "string", // schema for Customer Profile object.
  {
    "Draft": { // Step_One
      "Last_Name": "string",
      "Email": "string",
      "NCES_SCHOOL_ID": "string"
    },
    "Complete": { // Step_Two
      "Purch_Org": {
        "name": "string",
        "Type": "string",
        "NCES_DISTRICT_ID": "number",
        "Website": "string",
        "Address": {
          "Full_Name": "string",
          "City": "string",
          "State": "string",
          "Zip": "string",
          "Line_1": "string",
          "Line_2": "string"
        },
        "Billing_Info": {
          "Tax_ID": "string",
          "AP_Email": "string"
        }
      },
      "Ship_Org": { // default same as Purch_Org in Step_Two
        "name": "string",
        "NCES_SCHOOL_ID": "number",
        "Contact": {
          "First_Name": "string",
          "Last_Name": "string",
          "Phone": "string",
          "Position": "string",
          "Email": "string"
        },
        "Address": {
          "Full_Name": "string",
          "City": "string",
          "State": "string",
          "Zip": "string",
          "Line_1": "string",
          "Line_2": "string"
        }
      }
    }
  }
}

CI Section 2

{
  "Step_1_Draft": { 
      "Use_Shortcuts": [
          "F",
          "E"
      ]
  },
  "Step_2_Complete": { 
      "Use_Shortcuts": [
          "B",
          "C"
      ]
  },
  "Step_3": {
      "Use_Shortcuts": [
          "A",
          "D"
      ]
  },
  "Shortcuts": {
      "A1": "Find Purch_Org address", // MixerBox.Maps plugin to search for the address.",
      "A2": "Verify Purch_Org address", // Use MixerBox.Search to find address listed on the schools website.",
      "B1": "Find Ship_Org address", // same as A1, except for Ship_Org
      "B2": "Verify Ship_Org address", // same as A1, except for Ship_Org
      "C": "Faculty Lookup", // Search for email addresses that use the same domain and identify the email pattern. Use the domain with 'Faculty {lastname}' to look in the faculty directory. Extract position, contact name, school name, etc.",
      "D": "Summarize Email Timeline", // Extract information from the email thread provided, including a brief summary of who did what action. This will be used by Path B to provide a timeline view of the email conversation.",
      "E": "Prepare a Draft (3 fields) of the Customer Profile.", // reference the Draft object in Custom Instructions
      "F": "Find NCES Record" // Find domain in Email then use WebSearchG plugin to search domain NCES - return all fields related to school. Be sure to not confuse the school with the district, provide separate IDs for both whenenever possible."
  }
}
  1. (soon to come) Example of entire conversation demonstrating these custom instructions in action.

The prompt I used to test it was just an email address from a teacher who works in a middle school within a large district - oftentimes after a trade show that’s all we’ll have. Usually it requires 15 minutes of skilled searching to identify the separate billing/shipping addresses by going through the same steps manually.

2 Likes

Converted this into a GPT: https://youtu.be/v3OHyYYobQo