ChatGPT for Startup

Best practices and pitfalls

--

If you are considering implementing GPT-4 into your startup’s MVP, I guarantee that this article will save you a lot of time and money.

I’ve been using it for the last six months and I can say that it’s been a game changer for our workflow. It wasn’t easy getting started, but I’ve learned a lot along the way about best practices and potential pitfalls.

Before I get into the details, I recommend thinking of GPT-4 as a Swiss Army Knife for machine learning. It allows you to complete various tasks without any machine learning expertise, making it a game-changer for startups looking to quickly develop their MVP.

Where can I use ChatGPT in my workflow?

It’s important to note that not all use cases are suitable for GPT-4, so it’s important to carefully consider whether it’s the right fit for your startup’s needs.

To determine whether GPT-4 is a good fit for your workflow, it’s important to evaluate your tasks and identify where it can be used effectively.

Here are a 2 conditions that makes your tasks a good candidate for GPT-4:

  1. Requires human interaction and understanding to be completed effectively. This means that it cannot be easily codified or automated, as it involves nuanced decision-making and context that is difficult for machines to replicate.
  2. Requires a clear objective or decision that needs to be made. This objective should be well-defined and concrete, meaning that it should be specific and unambiguous. For example, determining whether a user should choose option A or B based on a given piece of text. If the task is too abstract or open-ended, it will be impossible to write a prompt that provides a useful and accurate response.

To better understand, consider the following examples:

  • Generating text for a given situation, such as emails, answers, or titles, is a task that can benefit from GPT-4’s ability to analyse and generate natural language text.
  • Classifying text based on meaning or ideas, such as analysing sentiment or tone, is another task that can be effectively handled by GPT-4.
  • Extracting information from text is yet another area where GPT-4 can be useful. Whether it’s identifying keywords, dates, or other important pieces of information, GPT-4 can help streamline this process and make it more efficient.

What are the pitfalls?

Let’s start with the limitations. While it’s a highly advanced language model that can generate impressive results, there are still some inherent limitations to keep in mind when using it for your startup’s needs:

1. Generic knowledge

While the model has been trained on an enormous amount of diverse data, it’s impossible for it to possess knowledge about every topic or domain. As the knowledge becomes more specific or niche, the accuracy of output may decrease. Additionally, the training data is derived from human input, which means that there may be errors or gaps in the knowledge that is being used to train the model.

2. Different output for same prompt and data

Unlike traditional IT systems where the same input will always produce the same output, GPT-4 is a conversational AI that can produce different responses based on a variety of factors such as the context, the user’s intent, or the training model version. While this variability can be acceptable for basic questions, it can become a problem if we want to incorporate it into our company’s workflow. If our system is not designed to handle this variability, it can lead to inconsistencies or failures.

Example of different output with same prompt

3. Random errors:

As an AI model that imitates human behavior, GPT-4 can sometimes fail to provide a response even when the data and prompt are correct. There may be no apparent reasons for this, and the same input may have worked in previous calls. In most cases, repeating the question or providing more context may help the model produce a response. However, these occasional errors can be frustrating and may impact the stability of our workflow.

4. Limit of text

GPT-4 has a limit on the amount of text it can process. The model works with tokens, where each token corresponds to about 4 characters of English text. The maximum token length allowed by GPT-4 is 8192 tokens, which translates to around 6000 words. While this may seem like a lot, keep in mind that this limit includes both the prompt and the generated response. As a result, this limit can be reached quickly when dealing with complex tasks or large amounts of data. It’s important to be aware of this limitation when using GPT-4 in your startup and to plan accordingly.

There are some projects available that can help overcome the limitation of token length in GPT-4, such as LlamaIndex.

5. Pricing structure

The cost of API calls is calculated based on the number of tokens used, which can add up quickly for operations that require a lot of data. For instance, a prompt of 1000 tokens plus an answer of 2000 tokens will cost $0.09, while a prompt of 3000 tokens plus an answer of 5000 tokens will cost $0.40.

What are the best practices?

1. Systems, Assistant and User prompts

There are 3 types of prompts that can improve communication and enhance the completion of tasks:

  • System: indicate the rules of communication, such as the desired response, context information or how to act in a specific use cases to prevent errors.
  • Assistant: provide the necessary data for GPT-4 to work, such as text or information to be extracted.
  • User: indicate the desired command for GPT-4 to perform based on the assistant data and system conditions.
Setting rules and data to GPT-4

It’s important to keep in mind that these three prompts are included in the prompt tokens and should be used effectively to optimize the use of GPT-4 in your startup workflow.

2. Talks with JSON or CSV

ensure consistency and clarity in the data being passed between your software and GPT4. By defining the structure of the data in a standardized format, you can avoid any confusion or misinterpretation of the data.

Additionally, using a structured format can make it easier to manipulate the data downstream in your software, allowing for more efficient processing and analysis.

Example of PGT-4 returning JSON

3. Break the process

Breaking the process into smaller, more manageable parts is another good practice when working with GPT-4. Asking too many questions or expecting too much in a single prompt can lead to confusion for the model and can result in poor quality responses. Instead, consider breaking the request into multiple prompts, each focused on a specific task or piece of information.

For example, instead of asking “Can you give me the summary of this text, the name of the user and what the user thinks about it?” consider breaking it down into three separate prompts: “Can you provide a summary of this text?”, “What is the name of the user?”, and “What is the user’s opinion of the text?”.

This approach not only makes the task more manageable for the model but also makes it easier for you to interpret and use the results.

4. Don’t be polite

It’s important to be mindful of the way we phrase our prompts. While being polite is always appreciated, it’s not always the most efficient use of tokens. Using phrases like “Can you please…” or “Would it be possible…” can consume unnecessary tokens and result in GPT-4 answering with extra text that is not relevant to the question.

Instead, it’s better to be direct and consistent in what you want. Furthermore, it’s advisable to indicate in the system to avoid any text that is not related to the request. This will skip responses such as “Sure!” or “Here are your answers…” and help maximize the token usage. Remember, every token counts, so it’s important to use them wisely.

5. Use parameters to refine responses errors

GPT4 offers several parameters that can be adjusted to tailor the response based on our specific needs:

  • Temperature: Determine the level of randomness and creativity in the response. A higher temperature will produce more varied and creative responses, while a lower temperature will produce more focused and predictable answers. This can be useful for generating creative email titles versus more formal ones.
  • N-number: determines the number of different responses generated for each user prompt question. This can be useful when we want to generate multiple options at once, such as when offering different products to a customer.
  • Presence penalty: affects the level of diversity in the response. A higher presence penalty will ensure that a wider range of topics are covered in the response. This can be useful when generating summaries or overviews of complex topics.
  • Frequency penalty: Controls the repetition of words in the response. A higher frequency penalty will produce responses that are less repetitive, which can be useful for generating text that doesn’t sound like a broken record. By experimenting with these parameters, we can refine our responses and minimize errors.
Default parameters of GPT-4 Sandbox

6. Versioning your prompts

Modifying the prompts is important to improve the results and avoid unexpected answers, but not all changes lead to improvement. Keeping old versions of the prompts is helpful in case of issues or to adapt to different use cases. This is especially important when we are alternating parameters to achieve different results.

7. Track and analyse your results

GPT4 answers can be expensive and time-consuming, so it’s a good idea to save and analyse them. By keeping track of the results, you can compare the quality of different prompts and parameter settings, and make improvements accordingly. Additionally, by saving the results, you can avoid making unnecessary API calls in the future if your process fails or if you need to repeat a similar task.

Conclusions

In summary, GPT-4 can be a valuable solution for addressing core issues during the initial stages of a MVP, particularly for tasks that require model training or reducing human interaction. This can accelerate the development of the necessary user journey and increase its early-stage robustness.

GPT-4 is a powerful tool that can bring significant benefits to your startup, but it should not be seen as a one-size-fits-all solution. It is important to use it wisely and in combination with other strategies, such as data preprocessing and model training, to create a well-rounded and scalable solution.

By implementing good practices and regularly evaluating the results, you can leverage the full potential of GPT-4 to drive innovation and growth in your startup.

However, it’s not a sustainable long-term solution. At some point, it’s necessary to implement these processes or train your own model to mature your system and enable scalability.

--

--

Francisco Arias
𝐀𝐈 𝐦𝐨𝐧𝐤𝐬.𝐢𝐨

CTO - Rapid development and AI/ML. Driving technical strategy and leading teams to innovate and deliver solutions.