Day 29 - Prompting Techniques - Step Back Prompting
Step-back prompting
Step-back prompting is a technique for improving the performance by prompting the LLM to first consider a general question related to the specific task at hand, and then feeding the answer to that general question into a subsequent prompt for the specific task. This ‘step back’ allows the LLM to activate relevant background knowledge and reasoning processes before attempting to solve the specific problem. Step-back prompting encourages LLMs to think critically and apply their knowledge in new and creative ways.
Before using step-back prompt
Configuration:
- Temperature = 1
- Top-K = 40
- Top-P = 0.8
- Token Limit = 1024
Prompt:
Write a one paragraph storyline for a new level of a first-person shooter
video game that is challenging and engaging.Output:
The level begins with the player’s squad being ambushed in a
dense urban area by a relentless enemy faction.
Players must fight their way through a maze of back alleys and dilapidated buildings,
utilizing stealth and precision to eliminate enemy forces and avoid detection.
The player must use their environment to their advantage, setting traps, utilizing cover,
and making calculated moves to survive.
Along the way, they uncover intel suggesting the enemy is planning a devastating attack,
and the player must race against time to gather evidence and relay it back to their
headquarters before the enemy can carry out their plans.When you set the temperature to 1, you might end up with all kinds of creative writings for a storyline, but it’s also quite random and generic.
Take a step-back prompt
Configuration: Same
Prompt:
Based on popular first-person shooter action games,
what are 5 fictional key settings that contribute to
a challenging and engaging level storyline in a first-person shooter video game?Output:
1. Abandoned Military Base: A sprawling, post-apocalyptic military complex
crawling with mutated soldiers and rogue robots, ideal for challenging
firearm combat.
2. Cyberpunk City: A neon-lit, futuristic urban environment with towering
skyscrapers and dense alleyways, featuring cybernetically enhanced enemies
and hacking mechanics.
3. Alien Spaceship: A vast alien vessel stranded on Earth, with eerie
corridors, zero-gravity sections, and extraterrestrial creatures to encounter.
4. Zombie-Infested Town: A desolate town overrun by hordes of aggressive
zombies, featuring intense close-quarters combat and puzzle-solving to find
safe passage.
5. Underwater Research Facility: A deep-sea laboratory flooded with water,
filled with mutated aquatic creatures, and requiring stealth and underwater
exploration skills to survive.Yeah those topics seem like a good fit for a first-person video game. Let’s go back to the original prompt, but this time we include the answer of the step back as context and see what it will return.
Final result
Prompt:
Context: 5 engaging themes for a first person shooter video game:
1. Abandoned Military Base: A sprawling, post-apocalyptic
military complex crawling with mutated soldiers and rogue
robots, ideal for challenging firearm combat.
2. Cyberpunk City: A neon-lit, futuristic urban environment
with towering skyscrapers and dense alleyways, featuring
cybernetically enhanced enemies and hacking mechanics.
3. Alien Spaceship: A vast alien vessel stranded on
Earth, with eerie corridors, zero-gravity sections, and
extraterrestrial creatures to encounter.
4. Zombie-Infested Town: A desolate town overrun by hordes of
aggressive zombies, featuring intense close-quarters combat and
puzzle-solving to find safe passage.
5. Underwater Research Facility: A deep-sea laboratory flooded
with water, filled with mutated aquatic creatures, and requiring
stealth and underwater exploration skills to survive.
Take one of the themes and write a one paragraph storyline
for a new level of a first-person shooter video game that is
challenging and engaging.Output:
In the heart of a murky abyss, lies a dilapidated underwater research facility,
standing as a testament to human ambition and its disastrous consequences.
Shrouded in darkness, pulsating with the hum of malfunctioning machinery, and
haunted by the echoes of drowned souls, the facility is now a breeding ground for
a nightmare borne from the deep sea. The player, an elite marine equipped with
advanced diving gear and experimental weaponry, is tasked with venturing into
this aquatic realm of terror. Armed with resilience and resourcefulness, they must
navigate treacherous corridors, solve cryptic puzzles, and confront gruesome sea
monstrosities that lurk in the depths. From grappling with the crushing pressure
of the deep sea to outsmarting cunning aquatic predators, every moment in this
uncharted underworld tests the limits of human endurance and courage.That looks like an interesting video game! By using step back prompting techniques you can increase the accuracy of your prompts.