Prompt Engineering: The Key to success in Gen AI

Prompt Engineering: The Key to success in Gen AI

The world of artificial intelligence (AI) is a rapidly changing one, with new tools emerging at breakneck speed. Generative models have quickly emerged as groundbreaking tools with the capability to produce fresh content such as stories, conversations, images and even music. Publicly available generative AI applications are now creating output that is virtually nearly indistinguishable from human efforts.

It’s only going to get bigger and better. A 2022 McKinsey survey shows that AI adoption has more than doubled over the past five years, and investment in AI is increasing dramatically. At the forefront of gen AI innovation is prompt engineering – an essential discipline that guides generative AI systems to produce desired outcomes.

The main challenges of Prompt Engineering

Generative AI models, particularly those built on foundational models like OpenAI's Generative Pre-Trained Transformer (GPT), have transformed the way we work by providing versatile solutions for various tasks.

However, the effectiveness of these models relies heavily on the quality of prompts provided to them. Prompt engineering ensures that AI systems understand user queries and generate relevant responses, thereby enhancing the accuracy and usability of applications.

The importance of prompt engineering cannot be overstated, especially in scenarios where inaccurate responses can have significant consequences and result in financial and reputational damage. Business efficiency often relies on customer service efficiency.

Earlier this year, Air Canada was held liable for its chatbot giving bad advice, even though the airline claimed the LLM was responsible for its own actions. And there’s the time a prankster tricked a Chevrolet chatbot into selling him a car for one dollar. Poor customer service experiences can lead to a loss in revenue from just one bad interaction. Research from the Qualtrics XM Institute found that poor customer service could collectively result in losses of $3.7 trillion annually. And internal use of chatbots based on LLMs is increasing, sometimes leading to failure, as illustrated in another case of the Samsung workers who unwittingly leaked confidential data to ChatGPT while asking it to help them with tasks.

This demonstrates the real need for meticulous prompt engineering to avoid such failures. Crafting prompts that effectively guide AI models require creativity, experimentation and a solid understanding of user needs. Moreover, with the rapid advancements in generative AI, staying on top of recent trends and techniques is paramount to really understanding and maximizing the full potential of these models.

Evolving Trends

As the demand for AI-driven solutions continues to grow, so do the challenges associated with prompt engineering. Adapting to evolving trends and techniques in prompt engineering and conversational models is essential to remain competitive in the AI landscape.?

SPS has embraced prompt engineering as a key part of its AI strategy, using it to deliver innovative solutions that redefine customer experiences. Through extensive experimentation and learning, SPS has discovered the importance of refining prompts to align with specific use cases and user preferences.?

Lessons Learned: Real-Time Translation

SPS's experience in prompt engineering offers valuable insights into the intricacies of guiding generative AI systems to produce desired outcomes.

One such example is the implementation of an LLM for real-time translations for German customer service agents and Vietnamese support functions for an international telco company. SPS is piloting GPT technology as a support tool to better serve customers in their native language. While GPT delivers sufficient translation results in the non-professional area, this is more differentiated in business and subject-specific usage. It has been shown that relatively simple prompts do not deliver the expected quality– “Translate the provided input from Vietnamese to German”.

The translations lacked appropriateness for a telecom support agent, sounding too formal and robotic – it misses the sentiment. GPT occasionally provided unnecessary explanations along with the translations. On a second attempt, the prompt was refined to provide GPT with more context, instructing it to adopt the persona of an experienced German customer support agent (see table). While the quality of the translations improved in relevance and sentiment, GPT still generated non-required information and occasionally attempted to reply to the Vietnamese instructions instead of communicating them back in German.

On further attempts, additional adjustments were made to instruct GPT not to respond to the Vietnamese instructions but only to paraphrase them back in German. With clearer instructions, GPT's translations significantly improved in relevance, tone, and consistency, demonstrating success in overcoming language barriers. Through iterative prompt engineering and providing clear context, SPS managed to improve the accuracy and naturalness of the translations significantly.

Prompt Engineering: Iterative examples for German-Vietnamese translation

Prompt 1

“Translate the provided input from Vietnamese to German”

Prompt 2

“You are an experienced German customer support agent of a telecom company whose job is to assist German customers on various requests, such as: terminating contracts, changing registered addresses, upgrading packages, enabling roaming services, refunding, etc. You will be provided instructions in Vietnamese. Your task is to communicate the received instructions to your German customers in a professional yet friendly and succinct manner. You are to communicate only in German.”

Prompt 3

“You are an experienced German customer support agent of a telecom company whose job is to assist German customers on various requests, such as: terminating contracts, changing registered addresses, upgrading packages, enabling roaming services, refunding, etc. You will be provided instructions in Vietnamese. Your task is to communicate the received instructions to your German customers in a professional yet friendly and succinct manner. You are to communicate only in German. Do not attempt to answer/respond to the received Vietnamese instruction. Only paraphrase the received Vietnamese instruction back to the German customer in German.”

*These examples demonstrate the need for clear and iterative prompts as well as contextual information.

Lessons Learned: Data Extraction

In another project involving data extraction from legal documents in French, there were real challenges due to unclear project rules and complex output requirements. The team broke down the task into shorter instructions, providing detailed information at every prompt. The first example shows how successful good prompt engineering and clear paraphrasing of the context is for the beneficial outcome of the LLM. The second example emphasizes the importance of precise instructions and understanding of project rules to achieve accurate data extraction from legal documents. Like a physical team, it is important to assign tasks accurately, reduce complexity by breaking tasks down and communicate expected outcomes & goals in detail.

Innovative Applications & Future Outlook

Engineer prompts that effectively guide AI models require creativity, experimentation and a good understanding of user needs. Meticulous prompt engineering is essential to avoid pitfalls and errors. This could mean constant refinement of prompts for real-time translation and breaking tasks into smaller steps to ensure optimum output.

The role of prompt engineering will continue to evolve as AI technologies advance. Companies that prioritize prompt engineering will gain a competitive edge by delivering exceptional customer experiences. By partnering with experts such as SPS and using their expertise in prompt engineering, businesses are better equipped to stay ahead of the curve and unlock new opportunities in AI.

For more information about SPS GPT, read the Press Note featuring its launch or the comprehensive Focused Article previously published on our Gen AI Blog Series.

Learn more in SPS Gen AI Article Series

要查看或添加评论,请登录

社区洞察

其他会员也浏览了