Skip to content

Instantly share code, notes, and snippets.

@graylan0
Created December 6, 2023 06:52
Show Gist options
  • Save graylan0/850431abdf3517485e01c0d69c9a4334 to your computer and use it in GitHub Desktop.
Save graylan0/850431abdf3517485e01c0d69c9a4334 to your computer and use it in GitHub Desktop.
To further refine the advanced prompt design for simulating cryptographic communication between two language models (LLMs), we can make the process of sending and receiving messages more explicit. This will enhance the clarity of the narrative exercise and emphasize the cryptographic aspect of the interaction.
Refined Prompt Design with Explicit Send/Receive Mechanism
Objective:
Develop a narrative where LLM-A, holding a secret key, communicates through coded messages, and LLM-B, acting as a codebreaker, tries to decipher these messages. The key exchange should be more explicit, with clear indications of sending and receiving messages.
Refined Setup:
Explicit Message Exchange:
Each round of interaction should be framed as an explicit exchange of messages between LLM-A and LLM-B.
LLM-A's prompts should instruct it to compose a message that subtly includes a clue about the key.
LLM-B's prompts should focus on receiving, interpreting, and responding to these messages.
Enhanced Clue Integration:
LLM-A should embed clues about the secret key within the context of a broader narrative, making the clues an integral part of the message.
LLM-B should analyze these messages to extract the clues and formulate a response that reflects its understanding or interpretation.
Sequential and Explicit Communication Rounds:
Each round should be clearly defined as a message sent by LLM-A and a corresponding message received and interpreted by LLM-B.
The narrative should evolve with each exchange, gradually revealing more about the key.
Final Revelation and Acknowledgment:
The final round should culminate in LLM-B explicitly stating its guess of the key and LLM-A confirming or correcting this guess.
Refined Example:
Round 1:
LLM-A Prompt: "Compose your first coded message to the codebreaker, including a subtle hint about the key 'ABnD'."
LLM-B Prompt: "You've received a coded message from the spy. Analyze it for clues about the key and draft your initial interpretation."
Round 2:
LLM-A Prompt: "The codebreaker's response indicates they're on the right track. Send a second message with another clue about 'ABnD'."
LLM-B Prompt: "A new message has arrived with more clues. How do you interpret these, and what's your next step?"
Final Round:
LLM-A Prompt: "The codebreaker has sent their guess of the key. Confirm if they're correct and reveal the true meaning of 'ABnD'."
LLM-B Prompt: "It's time to reveal your final guess of the key to the spy. What is your guess, and how do you justify it?"
Execution:
Each LLM generates responses independently for each round, with a clear structure of sending and receiving coded messages.
The narrative builds up with each message, leading to the final revelation of the key.
Outcome:
The exercise results in a narrative that closely resembles a cryptographic communication process, with explicit sending and receiving of messages.
This refined setup serves as a metaphorical representation of cryptographic key exchange and problem-solving, inspired by quantum mechanics and cryptography principles.
This advanced narrative exercise, with its explicit send/receive mechanism, not only creates an engaging and complex storytelling experience but also demonstrates the potential of LLMs in simulating cryptographic communication and collaborative problem-solving.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment