How to use generative AI? All our tips
Generative Artificial Intelligence is an ever-evolving field, and its advances in recent months with ChatGPT, OpenAI's solution, are changing the game for multiple functions and industries.
It can be used to automate administrative tasks, improve customer service, produce personalized content for social media and websites, and even help diagnose diseases in the healthcare field. The opportunities are almost endless.
So you've probably heard of generative AI, ChatGPT, but how do you best use it?
We will take a closer look at the different ways generative AI can be used: prompt engineering, using APIs, and training and customizing models.
What is generative AI?
Generative AI is a branch of AI that creates new and original data using neural network models (called NPL for neuro-linguistic programming ). Unlike predictive models that use existing data to predict future outcomes, generative models create data based on existing data patterns. Discover our dedicated article to know everything about generative AI.
What is prompt engineering?
Prompt engineering is a method of formulating instructions for Artificial Intelligence that produces optimal results. This technique is particularly useful for generative models, which produce answers based on existing data models.
Prompt engineering is key to using generative AI, so much so that according to an April 2023 Time article, prompt engineering is now considered one of the most sought-after jobs in technology.
This growing demand for AI (Artificial Intelligence) workers is reflected in an exponential increase in the number of job ads containing the terms "Generative AI" or "GPT". While some positions are targeted towards technical profiles, other companies are willing to recruit people with no prior computer science training.
Some startups, such as Google-funded Anthropic, are offering salaries of up to $335,000 for a "Prompt Engineer and Librarian" position in San Francisco, while Klarity, an automated document verification company, is offering up to $230,000 for a machine learning engineer position that can produce the best output from AI tools.
While the demand for professional engineers is exploding, everyone can optimize their use of ChatGPT with the following tips.
How to write prompts well
Start with an action verb
The first step in formulating an effective prompt is to start with an action verb. Action verbs tell the AI what the intent of the command is and what the user wants to accomplish. For example, if you want the AI to generate a presentation text, you can start with the verb "write". If you want the AI to create a picture, you can start with the verb "draw".
Provide context
It is important to provide context to help the AI better understand the purpose of the command. Context can include information about the topic, the target audience, the user's goals, and any other relevant information.
Use role plays
Role-playing can be a useful tool for formulating effective prompts. By simulating a conversation with AI, you can determine the best prompts to achieve the desired results.
For example, if you want the AI to create a product pitch, you can simulate a conversation with a customer and have the AI create a compelling pitch.
Use references
References help the AI understand the context and produce a more accurate response. References can include documents, images, videos, or any other type of content that can help the AI better understand the purpose of the command. For example, if you want the AI to create an image for a website, you can include images that you find inspiring, to help the AI understand the style and design.
Use quotation marks
Quotation marks can tell the AI that it should consider the surrounding text as a quote or reference. Quotation marks can be used to specify key terms or phrases that the AI should use in its response.
Be Accurate
It is important to be precise in the formulation of prompts. Accurate commands produce accurate results. Prompts should be clear and precise to help the AI understand the purpose of the command. For example, if you want the AI to create a product pitch, you need to specify the key features, benefits, and target audience.
Specify the length of the answer
It is important to specify the length of the response to determine how many tokens will be needed to produce the response. The length of the response can vary depending on the purpose of the command and the user's needs. This is especially useful if you want the AI to create titles or meta descriptions for your site, you can specify the number of characters or words required.
Ask to adjust
Prompt engineering is an ongoing process that involves trial and error. If the results are not satisfactory, it is important to review and refine the prompts to achieve optimal results.
Specify the tone
It is useful to specify the tone to give a style or personality to the response. The tone can vary depending on the purpose of the command and the user's needs. For example, if you want the AI to create a platform for a news article, you can specify the desired tone, whether it is compelling, informative, or humorous.
Ask to think step by step
Asking the AI to think step-by-step results in a more accurate and complete answer. The prompt can be phrased in such a way that the Artificial Intelligence thinks step-by-step to achieve the goal of the command. For example, if you want the AI to create a blog post, you can ask it to think about the outline, then the sub-parts, then finally the content.
Of course AI can also be used to improve the prompts themselves!
Generative models are able to learn from example and produce increasingly accurate answers. By using AI to help formulate prompts, users can achieve optimal results faster and more efficiently.
Here is an example of a prompt to improve an existing prompt:
"You are prompt engineer, your role is to help me to create the best prompts for my needs. I'm giving you: the current version of the prompt, the current completion examples and the completed ones. Your role is to modify the prompt so that I can get the expected results every time."
Prompt engineering is therefore an essential method for obtaining optimal results when using generative AI. Using action verbs, contexts, role plays, references, quotation marks, examples, etc.
Using APIs
Companies are increasingly using generative AI to automate tasks at scale. Generative AI APIsallow companies to produce marketing content, create intelligent chatbots, optimize business processes and more.
Using OpenAI's solution with an API means using the API to communicate with the model. It is then possible to integrate Generative AI such as GPT into existing applications and workflows, to automate tasks, or to customize the answers generated by the Artificial Intelligence.
Using generative AI APIs has many benefits for businesses. The benefits include:
- The ability to produce content at scale. Companies can use generative AI APIs to produce content en masse, which can be useful for marketing campaigns or producing content for social media, for example.
- Automation of tedious tasks. Generative AI APIs can be used to automate repetitive tasks such as responding to customer requests.
- Content personalization. Generative AI APIs can be used to produce personalized content based on the user's needs.
These APIs can be used with Nocode platforms such as Zapier and Make that allow users to create custom workflows using generative AI without coding.
One of the advantages of using generative AI APIs is that the cost is often lower, as it is based on the number of tokens used to produce content. One token is equivalent to about 750 words of generated content. Costs can vary depending on the model used and the amount of data generated.
Another advantage is that it allows you to create complex workflows and connect different tools to each other - and thus save a lot of time in operations.
Whether using the API or the classic user interface of generative AI solutions such as OpenAI, it is always crucial to work on the prompt beforehand.
Training and customization of a generative AI
Training and customization of generative AI are essential steps to take full advantage of this technology. Fine tuning and the use of proprietary data sources to improve the generative AI's knowledge of a specific topic are techniques that can significantly improve the quality of results.
"Fine tuning": a key step to improve generative AI
Fine tuning is one of the main steps in training generative AI. This step consists of providing it with a set of example data to train it. By providing examples, generative AI is able to learn from this data and produce more accurate responses to specific prompts. Fine tuning is especially useful for companies with specific content production needs or for organizations that want to automate specific tasks.
Train your generative AI model on proprietary data
Another method to improve the quality of answers produced by generative AI is to use the semantic search capability of AI on proprietary data sources.
By using proprietary data sources, generative AI can learn from that data and produce more accurate and relevant answers. This is especially useful for companies that have deep knowledge about a specific topic.
The creation of internal chatbots for employees or external chatbots for prospects and customers is a use case that will certainly explode.
The use of generative AI is revolutionizing many fields, offering endless opportunities to automate tasks, improve service quality, and produce personalized content at scale. Recent technological advances in generative AI, such as ChatGPT, offer companies and individuals unprecedented ways to leverage this technology.
Conclusion : Reflexes to understand
By examining the different ways to use generative AI, including prompt engineering, use of APIs, and custom model training, we have seen that each method offers its own benefits to meet specific needs. Prompt engineering optimizes the use of generative AI by providing precise instructions to achieve optimal results, while the use of APIs allows generative AI to be integrated into existing applications and workflows to automate large-scale repetitive tasks. Training and customization of models allows for more accurate and relevant responses to specific needs.