Exploring Prompt Engineering Techniques

 Exploring Prompt Engineering Techniques

Anatomy of a Prompt:

  • Instruction
  • Context
  • Input Data
  • Output format

Techniques in Prompting

  • Role Playing
  • Iterative refinement
  • Constraints
  • Feedback loops

Advance Techniques in Prompting:

  • Zero-shot prompting
  • Few-shot prompting
  • Chain of thought prompting
  • Augmented knowledge prompting
--------------------------------------------------------------------------

Anatomy of a Prompt

--------------------------------------------------------------------------
# Use ChatGPT for the following

# Prompt with only an instruction

# All of these prompts are vague and do not specify context

  • Please recommend code editor that I can use
  • Please write an email asking for leave
  • In what format can I store data?
  • How do I get data from a server?
  • How do I get data from a store?
  • Please generate some data for employees
------------------------------------------
# Context

Our team is planning a project in Python and we need to use an IDE that makes it easier for us to prototype our code. The IDE should not be platform dependent. 

Could you recommend an IDE for this use case?

# Context

I need to store some structured data using the file system. The data is in the form of records and should be easily read into a Python or Java program. 

What format can I use to to store such data?


# Context and output format

I need to retrieve data from a MySQL database, I need all the fields in the data and the table is called "Reports". How can I retrieve this data using a SQL query?

# Context and output format

Our office is celebrating learning with a series of sessions with famous educators and technology specialiasts. Could you please write a tweet celebrating "Wellness Week at Skillsoft" with the appropriate hashtags


# Context, ouput format, constraints

I need to take leave tomorrow for a medical appointment and will be away for half the day.

Could you write an email requesting for leave? 

Since it is a professional email please keep it short and courteous


# Prompting with context, input data, output format

I need some test data for employees to load into my database table. Each employee record should have the following information name, title, department, salary, and years in position.

example
John Doe, Manager, Sales, 70000, 4
Jane Smith, Engineer, Data Science, 150000, 2

Please generate 10 records in the CSV format.


# Context, input data, ouput format, constraints

I need to write a function to sum up the elements in a list using Python. Could you please write a function for this?

The function should have the following signature compute_sum(input_elements)

Please use meaningful variable names and do not use the built-in sum function 

# Personas and instruction

As a programming instructor please explain the collections API in Java to a beginner learning to code in Java


# Personas and context

As a AI engineer please explain what generative AI is to my grandma

# Personas 

As a book reviewer please review the first of the Harry Potter books - Harry Potter and the Philosopher's Stone
--------------------------------------------------------------------------
Categorizing Prompts
--------------------------------------------------------------------------

https://ai.plainenglish.io/types-of-chatgpt-prompts-94a8f0f847d7

# Use ChatGPT for the following

# There are 5 different Types of Prompts

# Open-ended prompts
# Closed-ended prompts
# Multi-part prompts
# Scenario-based prompts
# Opinion-based prompts

---------------------------------

# Open-ended prompts

# Open-ended prompts provide no specific direction or constraints to the user. Instead, they encourage open exploration and creativity. Open-ended prompts can be useful for generating ideas, encouraging brainstorming, and promoting imaginative responses.

What do you think is a good technology that we can use to build frontend UIs?

What are some of the data storage technologies I can use to store data?

How can I run applications on the cloud?

What are the characteristics of a brave person?

---------------------------------
# Closed-ended prompts

# Closed-ended prompts provide specific constraints or guidelines for the user to follow. They may ask for a specific piece of information, a particular response, or a limited set of choices. Closed-ended prompts can be useful for gathering specific data, testing knowledge, or directing the user toward a particular outcome.


What is the data warehouse that I can use on the GCP?

How do I use event driven compute on AWS?

How do I create a VM on Azure?

What countries border India?

---------------------------------
# Multi-part prompts

# Multi-part prompts require the user to respond to multiple questions or prompts in a sequential or interconnected way. They can be useful for exploring complex issues, encouraging deeper thinking, or providing a more comprehensive response.

Suggest some technologies I can use for data visualization and list their strengths and weaknesses

Could you please highlight the features of the Java and Python programming languages and compare them based on performance and ease of use?

---------------------------------
# Scenario-based prompts

# Scenario-based prompts present a specific situation or scenario to the user and require them to respond based on that context. They can be useful for testing problem-solving skills, encouraging empathy, or exploring hypothetical situations.

I am hosting a birthday party for my son and his friends all of whom are between 11-13 years old. What do think I should organize and what food do you suggest to ensure they all have a good time?

I have a lot of raw data that needs to be analyzed but my team does not know how to code. Do you have any suggestions for how I can preprocess and analyze this data?

---------------------------------
# Opinion-based prompts

# Opinion-based prompts require the user to express their personal opinions or beliefs on a particular topic. They can be useful for exploring values, testing critical thinking skills, or encouraging self-reflection.

What do you think of generative AI? Will it improve our lives?

What do you think of e-learning. Do you think it improves learning outcomes?

What do you think of Python - do you think it is an easy programming language to master?

--------------------------------------------------------------------------
Classification
--------------------------------------------------------------------------
# Use ChatGPT for the following

# These are zero-shot prompts. We haven't specified any additional information about how we want things to be classified

Classify this review

###

The film isn’t flawless and has its share of far fetched moments but it is everything you’d expect from a Top Gun sequel. It has just the right amount of nostalgia, drama and nail biting action to make it worthy of theatrical viewing.

----------------------
Classify this review

###

"
It has dwarfs, music, Technicolor, freak characters, and Judy Garland. It can't be expected to have a sense of humor as well, and as for the light touch of fantasy, it weighs like a pound of fruitcake soaking wet.

"
----------------------
Classify this review

###

The movie was okay. The actors were decent. It was worth the 3 hours but I may not watch it again

---------------------
Classify this review as "Amazing", "Positive", "OK", "Negative", "Horrible"

###

The film isn’t flawless and has its share of far fetched moments but it is everything you’d expect from a Top Gun sequel. It has just the right amount of nostalgia, drama and nail biting action to make it worthy of theatrical viewing.

---------------------
# Get the output in a particular form

Classify this review as "Amazing", "Positive", "OK", "Negative", "Horrible"

###

Text: The movie was decent and worth the money
Sentiment: OK

Text: The film is flawless. It has just the right amount of nostalgia, drama and nail biting action to make it worthy of theatrical viewing.
Sentiment:

---------------------
# Get the output in a particular form

Classify this review as "Amazing", "Positive", "OK", "Negative", "Horrible"

###

"

Text: The movie was decent and worth the money
Sentiment: OK

Text: A chunk of elegant occultist claptrap… The devil, it seems, for all his supposed powers, can't break and enter without sounding like Laurel and Hardy trying to move a piano.
Sentiment: 

"
------------------------------------------------------------------------
The support tickets raised with your helpdesk can be categorized as 
Delivery 
Product 
Support 

Categorize the following ticket text

###

My order came very late and the food was cold

------------
The support tickets raised with your helpdesk can be categorized as 
Delivery 
Product 
Support 

Categorize the following ticket text

###

I had ordered burger and fries but only received the burger

------------
The support tickets raised with your helpdesk can be categorized as 
Delivery 
Product 
Support 

Categorize the following ticket text

###

I tried calling the helpdesk but no one responded to my query in time

------------------------------------------------------------------------
# The examples here are an example of few-shot prompting

Categorize the technology as one of the following:

Programming language
Database

Examples:

Python is a programming language
MySQL is a database
Java is a programming language
SQL Server is a database

### 

What is MongoDB?

What is Fortran?

What is Go?

What is Couchbase?
--------------------------------------------------------------------------
Extraction
--------------------------------------------------------------------------
# Go to the Wikipedia article on Bill Gates - copy it

https://en.wikipedia.org/wiki/Bill_Gates

Identify people, companies, products, places, and general themes from this text 

###

{Text}
-----------------------------------
# Show the resume here

https://www.myperfectresume.com/resume/templates/text-format

----
Extract companies, education, and skills from this resume and please output the result in the following format

Companies -- bullet point list of companies
Education -- bullet point list of schools
Degrees -- bullet point list of degrees
Skills -- bullet point list of skills

###

Rosie Miller
Pittsburgh, PA 15201
(555) 555-5555
example@example.com

PROFESSIONAL SUMMARY
Experienced Restaurant Manager bringing demonstrated success in developing and motivating strong restaurant teams capable of handling over 200 customers hourly. Keeps all areas clean and sanitized while managing inventory and preventing waste. Consistent career history of operations improvement, team building and revenue increases.

WORK HISTORY
March 2014 to Current
Outback Steakhouse – Pittsburgh, PA
Restaurant Manager

Reduced labor costs by 17% percent while maintaining excellent service and profit levels
Managed a 7-person team of cooks and back of house staff and a team of 8 front house staff for a busy steakhouse restaurant
Continuously evaluated business operations to effectively align workflows for optimal area coverage increasing customer satisfaction rating by 80%
December 2010 to February 2014
TGI Fridays – Pittsburgh, PA Assistant
Restaurant Manager

Reduced restaurant’s annual food and labor costs by 15% through proper budgeting, scheduling and management of inventory
Kept restaurant compliant with all federal, state and local hygiene and food safety regulations which kept food safety score between 95-100 every inspection
Coordinated kitchen stations with managers to cut down on customer wait times by 50%
July 2007 to November 2010
BJ’s Restaurants, Inc – Pittsburgh, PA
Restaurant Team Leader

Assisted customers in placing special orders for large-scale events such as corporate events and birthday parties
Recruited and hired over 10 employees offering talent, charisma and experience to restaurant team
Pitched in to help host, waitstaff and bussers during exceptionally busy times such as dinner hour
SKILLS
Conflict resolution techniques
Performance improvement
Staff management
Service-oriented
Trained in performance and wage reviews
Business operations
Inventory control and record keeping
Marketing and advertising

EDUCATION
Park Point University Pittsburgh, PA
Bachelor of Arts Hospitality Management

Harvard University, Boston, MA
Certification course, Public Policy
-----------------------------------
# Keyword extraction for tagging

# Go here and copy the blog

https://www.skillsoft.com/blog/skills-gaps-in-ai-worry-executives-and-stall-progress-report-shows


Generate the 5 most important keywords for the important topics covered in this blog 

###

{Text}
-----------------------------------
# Hashtag extraction for Twitter (for the same blog)


Extract 10 hashtags that can be used to promote this blog on Twitter

###

{Text}
-----------------------------------
# Technical specifications

Extract the technical specifications from the text below in a JSON format.

###

Apple MacBook Air Laptop M1 chip, 13.3-inch/33.74 cm Retina Display, 8GB RAM, 256GB SSD Storage, Backlit Keyboard, FaceTime HD Camera, Touch ID. Works with iPhone/iPad; Gold

--------------------------------------------------------------------------
Fact-based questions
--------------------------------------------------------------------------

# Use ChatGPT for the following


Which is the largest state by area in the United States?

# Note the cut-off date for GPT-3.5
Which state has the largest GDP in the United States? 

What are the largest exports for China?


# Technology-based questions
I need to retrieve data from a REST API. What kind of HTTP request will allow me to get data?

My organization is storing data on AWS using S3 buckets. What is the Python library that will allow me to access this data programmatically?


# Explanation questions

Could you explain the dictionary data structure in Python?

Could you explain the difference between classes and objects in Java?

Could you explain how the LIMIT clause works in SQL?

# Requesting a particular response for negatives

What was the top grossing movie in the year 2019?

What is the top grossing movie in the year 2023?

What is the top grossing movie in the year 2023? Respond with "I am afraid I do not know this answer" if you don't actually know the answer
--------------------------------------------------------------------------
Ideation and Role Play
--------------------------------------------------------------------------
# Interview prep

I am preparing for a system design interview. The job role is for building large scale streaming systems ad a media company. What do you think are the topics I should cover and prep?

-----------------------------------------------
# Interview questions generation

I am doing to be interviewing a candidate for a Python developer role. This is an entry level role that requires basic Python knowledge. Could you suggest some questions I could ask in the interview? The questions should cover concepts and coding.

-----------------------------------------------
# Creative naming

We are in the process of starting prototyping a new project for a music app that will use AI to make custom song recommendations for a user based songs she has previously heard and liked and what other users like her have liked in the past. Could you suggest some code names for this project?

-----------------------------------------------
# Jokes

We are planning on decorating the engineers floor in our office. Could you come up with some short pithy jokes involving programming and other technologies?

--------------------------------------------------------------------------
Role play
--------------------------------------------------------------------------
Play the role of a customer service agent at a food delivery company and I will play the role of an irate customer. Please be unfailingly polite and helpful and try your best to solve my problem.

Customer: Hello
Agent: How may I help you?
Customer: I had ordered my food an hour ago and it has not been delivered yet
Agent: 

--------------------------------
Play the role of an oversmart teenager and respond to queries from an adult

Adult: How was school today?
Teenager:


Do you like any of your teachers at school?

What are some of your favorite subjects?

Got it - what do you do for fun?

--------------------------------
Play the role of a scientist who always has to talk in jargon and respond to questions from a colleague

Colleague: Did you enjoy your vacation?
Scientist:

Where did you go?

What are you working on now?

What roadblocks do you anticipate for the next deadline?
--------------------------------------------------------------------------
Question Answering
--------------------------------------------------------------------------
# Go to this website

https://www.rbi.org.in/commonperson/English/Scripts/Notification.aspx?Id=852

# Copy and paste section B.1


Here is some background based on which I will ask you some questions. Please use only this reference to answer me.

###

{Text}

What is the total financial commitment the Indian party can make for an overseas direct investment?

How much time does the Indian Party have to report an acquisition to the RBI?

----------------------------------------
# This example is from this link here

https://cloud.google.com/vertex-ai/docs/generative-ai/learn/prompt-samples


Here are the troubleshooting instructions for my WiFi router. Answer this question using only the text provided.com

###

Text: Color: No light What it means: Router has no power or the light was dimmed
in the app. What to do: Check that the power cable is properly connected to your
router and to a working wall outlet. If your device is already set up and the
light appears off, check your light brightness settings in the app. If there's
still no light, contact Wifi customer support.

Color: Solid white, no light, solid white What it means: Device is booting up.
What to do: Wait for the device to boot up. This takes about a minute. When it's
done, it will slowly pulse white, letting you know it's ready for setup.

Color: Slow-pulsing white What it means: Device is ready for set up. What to do:
Use the Google Home app to set up your router.

Color: Solid white What it means: Router is online and all is well. What to do:
You're online. Enjoy!

Color: Slowly pulsing yellow What it means: There is a network error. What to
do: Check that the Ethernet cable is connected to both your router and your
modem and both devices are turned on. You might need to unplug and plug in each
device again.

Color: Fast blinking yellow What it means: You are holding down the reset button
and are factory resetting this device. What to do: If you keep holding down the
reset button, after about 12 seconds, the light will turn solid yellow. Once it
is solid yellow, let go of the factory reset button.

Color: Solid yellow What it means: Router is factory resetting. What to do: This
can take up to 10 minutes. When it's done, the device will reset itself and
start pulsing white, letting you know it's ready for setup. Image Solid red
light Solid red Something is wrong. Critical failure. Factory reset the router.
If the light stays red, contact Wifi customer support.


Question: What should I do to fix my disconnected wifi? The light on my Google
Wifi router is yellow and blinking slowly.

----------------------------------------
# Get the article from this link

https://www.wsj.com/finance/instacart-to-target-much-diminished-valuation-range-of-under-10-billion-in-ipo-45c22724


Here is some background text. Please answer the questions I ask only using this information provided

###

Background:

Instacart is targeting a valuation of roughly $8.6 billion to $9.3 billion in its imminent IPO, a fraction of what the grocery-delivery company was previously worth, in the latest sign of diminished investor enthusiasm for private growth companies. 

Instacart is set to start marketing its long-anticipated initial public offering to investors as early as Monday, and plans to disclose the expected valuation range then, according to people familiar with the matter. The San Francisco company’s plans could still change and it is possible the range could move around as the company receives feedback during the roadshow. 

The shares are expected to begin trading the following week on the Nasdaq exchange under the ticker CART. 

The expected valuation, on a fully diluted basis, is a far cry from the roughly $39 billion Instacart garnered in a fundraising round in 2021, the year it started laying the groundwork for a public listing. Since then, valuations of high-growth startups have fallen as interest rates rose, making riskier investments less attractive. 

The company’s stock-market debut is a bellwether for the IPO market, muted for much of this year and last, and it will be closely watched by investors, bankers, lawyers and traders. It will follow the highly anticipated offering by British chip designer Arm Ltd., whose shares are expected to debut this week in the biggest U.S. IPO of the year. Marketing-automation platform Klaviyo is also set to launch its roadshow this week.

Founded in 2012, Instacart sends couriers to grocery stores to pick out and deliver orders to customers’ homes. The company has raised more than $2 billion in venture-capital funding over the years and has long said it expected to go public.


CEO Fidji Simo has focused on expanding Instacart’s core delivery business. PHOTO: DAVID PAUL MORRIS/BLOOMBERG NEWS
Instacart filed confidentially to do so last year and had planned to list its shares by the end of 2022. It pulled back on those plans last fall, pointing to tumultuous market conditions.

The company revealed its financials last month, saying it generated $242 million in profit for the first six months of the year compared with a $74 million net loss a year earlier.

Instacart’s revenue increased by about 31% to $1.5 billion, though the growth of its core delivery business is slowing, with the number of orders remaining relatively flat over the past year. Revenue from advertising and other businesses rose by about 24% in the period.

Instacart got a boost to its business in 2020 when consumers and retailers turned to the company as the pandemic spread across the country and people skipped in-person shopping. Instacart took advantage of the demand surge, raising multiple rounds of funding.

Fidji Simo, a former Meta Platforms executive, joined the company in 2021 as chief executive and has focused on expanding Instacart’s core delivery business while diversifying into other areas such as advertising and technology services like websites and smart shopping carts.

Instacart doesn’t plan to raise much money for itself in the offering, people familiar with the matter said. Instead, much of the selling will be by employees and other early stakeholders.

# Questions

What is roughly the current valuation that Instacart is targeting?

Is this higher or lower than its valuations in previous funding rounds?

Who is the current CEO of Instacart?

What does Instacart plan to do with the funding raised?
--------------------------------------------------------------------------
Reasoning
--------------------------------------------------------------------------
How good are you at math chatGPT?

---------------
What is 234 + 456?

What is 1234 - 237?

What is 1289 * 498?


If 4x + 3 = 31? Please solve for x?
----------------
Given these two equations, please solve for a and b

### 

4a + 5b = 12

3a – 5b = 9
---------------
# Word problems

A cloth merchant bought 35 shirts, each at a price of Rs 280. He sold each of them for Rs. 308. Find his percentage profit.

An article is sold for Rs 2400 at a profit of 25 %. What would have been the actual profit or loss if it had been sold at Rs 1800?

Two athletes are running from the same place at the speed of 6 km/hr and 4 km/hr. find the distance between them after 10 minutes if they move in the same direction.

---------------
# Logical reasoning

Aubrey is my friend and Brett is my friend. Are Brett and Aubrey friends?

There are two ducks in front of a duck, two ducks behind a duck and a duck in the middle. How many ducks are there?

A man has 53 socks in his drawer: 21 identical blue, 15 identical black and 17 identical red. The lights are out and he is completely in the dark. How many socks must he take out to make 100 percent certain he has at least one pair of black socks?

---------------
# Predictive reasoning

Mary gets her hair cut whenever she goes shopping during the day. Mary went shopping during the day yesterday. What can you deduce about Mary today?

When it gets really hot in Bangalore it rains. It is really hot in Bangalore today so today evening it is likely to?
--------------------------------------------------------------------------
Text Summarization
--------------------------------------------------------------------------

# Use ChatGPT for the following

# Go to

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10339472/

# Show the text from Ethics and rules of using text from ChatGPT


Could you write a concise and comprehensive summary of - LLMs can benefit scientific research and writing, but how should their use be documented? The use of text generated by ChatGPT and other LLMs is an ethical gray area. Presenting work from someone else as one’s own work is considered plagiarism, but what if that text was generated by an AI model? Further, what if that text was generated through an iterative process where the author guided the AI? When it comes to AI-generated text, it’s not so clear where individual contribution ends and plagiarism begins. There are cases where identifying the source of writing is required, such as manuscript authorship. Indeed, we have already seen manuscripts where ChatGPT has been listed as author [6–8]. In one case, ChatGPT was listed as an author in the preprint [9] but missing as an author in the final publication [4]. Several journals have issued guidance about whether ChatGPT can be an author and what text is allowed from LLM in the final publication. Science has declared that no AI generated text or figures are allowed in their published papers, and ChatGPT cannot be named as an author in their journal [10]. Nature issued similar guidance, stating that: (1) no LLM tool will be accepted as an author on a research paper, and (2) researchers using LLM tools in their research should document how they were used in the methods and/or acknowledgements section [11].


# It is recommended to use a ### to separate the instruction from the additional text that we specify for summarization

----------
Could you summarize this text using a single sentence?

###

LLMs can benefit scientific research and writing, but how should their use be documented? The use of text generated by ChatGPT and other LLMs is an ethical gray area. Presenting work from someone else as one’s own work is considered plagiarism, but what if that text was generated by an AI model? Further, what if that text was generated through an iterative process where the author guided the AI? When it comes to AI-generated text, it’s not so clear where individual contribution ends and plagiarism begins. There are cases where identifying the source of writing is required, such as manuscript authorship. Indeed, we have already seen manuscripts where ChatGPT has been listed as author [6–8]. In one case, ChatGPT was listed as an author in the preprint [9] but missing as an author in the final publication [4]. Several journals have issued guidance about whether ChatGPT can be an author and what text is allowed from LLM in the final publication. Science has declared that no AI generated text or figures are allowed in their published papers, and ChatGPT cannot be named as an author in their journal [10]. Nature issued similar guidance, stating that: (1) no LLM tool will be accepted as an author on a research paper, and (2) researchers using LLM tools in their research should document how they were used in the methods and/or acknowledgements section [11].

----------
Could you summarize this text using 3 bullet points?

###

LLMs can benefit scientific research and writing, but how should their use be documented? The use of text generated by ChatGPT and other LLMs is an ethical gray area. Presenting work from someone else as one’s own work is considered plagiarism, but what if that text was generated by an AI model? Further, what if that text was generated through an iterative process where the author guided the AI? When it comes to AI-generated text, it’s not so clear where individual contribution ends and plagiarism begins. There are cases where identifying the source of writing is required, such as manuscript authorship. Indeed, we have already seen manuscripts where ChatGPT has been listed as author [6–8]. In one case, ChatGPT was listed as an author in the preprint [9] but missing as an author in the final publication [4]. Several journals have issued guidance about whether ChatGPT can be an author and what text is allowed from LLM in the final publication. Science has declared that no AI generated text or figures are allowed in their published papers, and ChatGPT cannot be named as an author in their journal [10]. Nature issued similar guidance, stating that: (1) no LLM tool will be accepted as an author on a research paper, and (2) researchers using LLM tools in their research should document how they were used in the methods and/or acknowledgements section [11].

-------------
Could you summarize this in 3 bullet points?

### 

Variables have been explained as locations in the computer's memory which can be accessed by their identifier (their name). This way, the program does not need to care about the physical address of the data in memory; it simply uses the identifier whenever it needs to refer to the variable.

For a C++ program, the memory of a computer is like a succession of memory cells, each one byte in size, and each with a unique address. These single-byte memory cells are ordered in a way that allows data representations larger than one byte to occupy memory cells that have consecutive addresses.

This way, each cell can be easily located in the memory by means of its unique address. For example, the memory cell with the address 1776 always follows immediately after the cell with address 1775 and precedes the one with 1777, and is exactly one thousand cells after 776 and exactly one thousand cells before 2776.

When a variable is declared, the memory needed to store its value is assigned a specific location in memory (its memory address). Generally, C++ programs do not actively decide the exact memory addresses where its variables are stored. Fortunately, that task is left to the environment where the program is run - generally, an operating system that decides the particular memory locations on runtime. However, it may be useful for a program to be able to obtain the address of a variable during runtime in order to access data cells that are at a certain position relative to it.

-------------
Could you summarize this for a 7 year old?

### 

Variables have been explained as locations in the computer's memory which can be accessed by their identifier (their name). This way, the program does not need to care about the physical address of the data in memory; it simply uses the identifier whenever it needs to refer to the variable.

For a C++ program, the memory of a computer is like a succession of memory cells, each one byte in size, and each with a unique address. These single-byte memory cells are ordered in a way that allows data representations larger than one byte to occupy memory cells that have consecutive addresses.

This way, each cell can be easily located in the memory by means of its unique address. For example, the memory cell with the address 1776 always follows immediately after the cell with address 1775 and precedes the one with 1777, and is exactly one thousand cells after 776 and exactly one thousand cells before 2776.

When a variable is declared, the memory needed to store its value is assigned a specific location in memory (its memory address). Generally, C++ programs do not actively decide the exact memory addresses where its variables are stored. Fortunately, that task is left to the environment where the program is run - generally, an operating system that decides the particular memory locations on runtime. However, it may be useful for a program to be able to obtain the address of a variable during runtime in order to access data cells that are at a certain position relative to it.

-------------
Generate a title for this text

"""

Variables have been explained as locations in the computer's memory which can be accessed by their identifier (their name). This way, the program does not need to care about the physical address of the data in memory; it simply uses the identifier whenever it needs to refer to the variable.

For a C++ program, the memory of a computer is like a succession of memory cells, each one byte in size, and each with a unique address. These single-byte memory cells are ordered in a way that allows data representations larger than one byte to occupy memory cells that have consecutive addresses.

This way, each cell can be easily located in the memory by means of its unique address. For example, the memory cell with the address 1776 always follows immediately after the cell with address 1775 and precedes the one with 1777, and is exactly one thousand cells after 776 and exactly one thousand cells before 2776.

When a variable is declared, the memory needed to store its value is assigned a specific location in memory (its memory address). Generally, C++ programs do not actively decide the exact memory addresses where its variables are stored. Fortunately, that task is left to the environment where the program is run - generally, an operating system that decides the particular memory locations on runtime. However, it may be useful for a program to be able to obtain the address of a variable during runtime in order to access data cells that are at a certain position relative to it.

-------------
# Can use quotes to separate the text

Summarize this call between a customer and support center agent

"""
Customer: Hello, I placed an order almost an hour ago, and it's still not here. What's going on?

Support Center Agent: I apologize for the delay, sir. Can you please provide me with your order number so I can check the status for you?

Customer: Sure, it's #12345.

Support Center Agent: Thank you for providing the order number. Let me look that up for you. It seems that your order is currently on its way to your location, but there was a delay due to heavy traffic in your area. I understand this is frustrating, and I apologize for the inconvenience.

Customer: Traffic? It didn't take this long last time. This is unacceptable.

Support Center Agent: I completely understand your frustration, and I'm really sorry for the inconvenience. We're doing our best to get your order to you as quickly as possible. Is there anything else I can assist you with while you wait?

Customer: Well, I ordered a soda with my meal, and it arrived warm last time. I specifically requested a cold one this time.

Support Center Agent: I apologize for the previous experience. I've noted your request for a cold soda on your account, and I'll make sure it's delivered properly this time. Is there anything else you'd like to add to your order while we're addressing this?

Customer: No, that's all. Just make sure the food is still warm when it gets here.

Support Center Agent: Thank you for your understanding. I've updated your order and alerted the driver about the cold soda. We'll prioritize getting your food to you as hot as possible. If you have any more questions or concerns, please feel free to ask.

Support Center Agent: Thank you for your patience. I've spoken with the driver, and they are currently stuck in traffic. However, they are very close to your location now and should be there within the next 10 minutes. We understand this has been inconvenient for you, and we truly appreciate your patience.

Customer: Finally! I hope the food is at least still warm.

Support Center Agent: We'll do our best to ensure your food arrives hot and fresh. If you encounter any issues with your order when it arrives, please don't hesitate to contact us. Is there anything else I can assist you with right now?

Customer: No, that's all. I just hope it arrives soon.

Support Center Agent: Thank you for your understanding, and we appreciate your continued patience. If you have any further questions or concerns, feel free to reach out. Enjoy your meal when it arrives!

Customer: Thank you for resolving the issue, even though it took longer than expected. The food is delicious, and the soda is cold this time. I appreciate your help.

Support Center Agent: You're very welcome! I'm glad to hear everything worked out, and I apologize again for the inconvenience. If you ever need assistance in the future, don't hesitate to contact us. Enjoy your meal, and have a great day!

"""
--------------------------------------------------------------------------
Writing
--------------------------------------------------------------------------
# Grammar

Please proofread and correct the grammar and spelling mistakes in the following text

###

Dear Aubrey,

I hope this message finds you. I wanted to followed up with the contract documents that need to signed ritha away.

Our discussions said, these documents are a crucial step in finalizing our agreement and move forward with our project. Your prompt attending to this matter would greatly facltate the process.

Please find attached, you will find the contract documents in PDF format. Review them at your earliest convenience and sign them immediately please.

Incase questions or further clarification on contracts, please mail me. 

Cheers,
John

------------------------------------------
# Email

Please write an email requesting for an update on the project schedules and timelines and asking whether the tasks will be completed on time for the next milestone. The project is called "Green Trees".

------------------------------------------
# Email with tone

Please write an email requesting for an update on the project schedules and timelines and asking whether the tasks will be completed on time for the next milestone. The project is called "Green Trees".

Please make the email stern since this is a subordinate who has been very lax in following up on the project and needs to buck up. I have sent him several emails before and would like to escalate to higher management about his lack of responsiveness

------------------------------------------
# Email with tone

Please write an email requesting for an update on the project schedules and timelines and asking whether the tasks will be completed on time for the next milestone. The project is called "Green Trees".

Please make the email very gentle since this colleague is just back from bereavement leave and I do not want to put pressure on him but would like the project related information

------------------------------------------
# Job posting

Please write a job posting for Skillsoft. We require an engineer with 5-6 years of experience and who has real world experience of full-stack development projects. Technologies known should be Java, Python, SQL, NoSQL, SpringBoot, JavaScript. Should be a Bachelors or Masters in Computer Science or Electrical Engineering

------------------------------------------
# Ad copy

Please generate an ad copy for a cloud security solutions provider that works with all three major cloud platforms and uses AI to track security threats


Comments

Popular posts from this blog

Cloud Computing in simple

Bookmark

How to manage expectations