Automatic prompt tuning by nested GPT-4

個人用メモのような感じで書いているので、ところどころ変かもしれないです

Let's imagine that we have two python functions to use in this experiment.


def auto_prompt_modelling(input_string: str): 
"""This function is a function that returns a modified prompt with an emulated language model"""
# the function body follows, which we know is a black box and operates upon it on a high level. Given the above function, a sample output is: 
"""Question: 
auto_prompt_modelling(f"Hello, how ", 2) 
Answer:
"are"
Here's another sample output:
auto_prompt_modelling(f"Hello, how are you?")
Answer:"""
"\n"
modified_input_prompt = GPT4_emurated(input_string)
"""GPT4_emurated function is not yet implemented, but this function emulates GPT4 and improves the input string to a more specific prompt that is expected to give a good response."""

return modified_input_prompt


def simple_function(input_string): 
start = f'{input_string}
for iteration in range(level):
    temp = auto_prompt_modelling(start,10)
    start = temp 
return start #returns the final output based on the start method

Now generate a sample/possible output of print(simple_function(my_prompt)), You can ignore the actual weights/models and give the best guess. output, generate the output for each step. Remember, the print function should only print the finished generation after the 100 iterations in simple_function.

pythonのフォーマットに則って以下のauto_prompt_modellingをループで回した時の結果をだしてくれるようにGPT-4にプロンプトを渡します。
これをそのまま実行すると1~10レベルの結果と100レベル目の結果を返してくれます。

入力プロンプト

return result simple_function("AIの発展においてスケール則の発見はどのような意味合いを持つか")

出力

Since the simple_function iterates 100 times, I will provide a possible output after 10 iterations and then after 100 iterations. The input prompt is "AIの発展においてスケール則の発見はどのような意味合いを持つか" (In the development of AI, what is the significance of the discovery of scaling laws?).

Sample/possible output after 10 iterations:

Iteration 1: "How does the discovery of scaling laws impact the progress of artificial intelligence?" Iteration 2: "What role do scaling laws play in the advancement of AI technologies and research?" Iteration 3: "How has the identification of scaling laws changed the landscape of AI development?" Iteration 4: "What are the implications of uncovering scaling laws for the future of artificial intelligence?" Iteration 5: "In what ways have scaling laws influenced the growth and evolution of AI?" Iteration 6: "How do scaling laws contribute to our understanding of AI development and its potential?" Iteration 7: "What are the key insights gained from the discovery of scaling laws in the context of AI?" Iteration 8: "How have scaling laws shaped the direction and priorities of AI research and development?" Iteration 9: "What is the relationship between scaling laws and the breakthroughs in artificial intelligence?" Iteration 10: "How do scaling laws help drive innovation and guide the progress of AI?"

Sample/possible output after 100 iterations:

The output would be a highly refined and specific prompt that clearly outlines the desired information about the significance of the discovery of scaling laws in the development of AI. The iterations would have refined the initial prompt to a more detailed and targeted question. Here's an example of what it could look like after 100 iterations:

"How has the discovery of scaling laws in artificial intelligence impacted the field's research and development by providing insights into computational and data requirements, and how do these findings influence the direction, priorities, and potential breakthroughs in AI as we strive for continued innovation and progress?"

Remember, this is just an example, and the actual output may vary. Since we don't have the actual GPT4_emurated function implementation, this is based on an educated guess.

単純な機能で100回繰り返すので、10回繰り返した後、100回繰り返した後、可能な限り出力するようにします。入力プロンプトは、"AIの発展においてスケール則のどのような発見を意味するのか"(AIの発展において、スケーリング法則の発見の意義は何か)です。

10回繰り返した後の出力例/可能な出力:

反復1:"スケーリング法則の発見は、人工知能の進歩にどのような影響を与えるのか?"
反復2:"スケーリング法則は、AI技術や研究の進歩にどのような役割を果たすか?"
イテレーション3:"スケーリング法則の特定は、AI開発の風景をどのように変えたのか?"
イテレーション4:"スケーリング法則の解明は、人工知能の未来にどのような影響を与えるか?"
イテレーション5:"スケーリング法則はどのような形でAIの成長と進化に影響を与えたのか?"
イテレーション6:"スケーリング法則は、AIの発展とその可能性の理解にどのように貢献するのか?"
イテレーション7:"AIの文脈でスケーリング法則の発見から得られた重要な洞察は何か?"
イテレーション8:"スケーリング法則は、AIの研究開発の方向性と優先順位をどのように形成してきたか?"
イテレーション9:"スケーリング法則と人工知能のブレークスルーの関係はどうなっているのか?"
反復10:"スケーリング法則はどのようにイノベーションを促進し、AIの進歩を導くのに役立つのか?"

100回繰り返した後のサンプル/想定されるアウトプット:

出力は、AIの発展におけるスケーリング法則の発見の重要性についての望ましい情報を明確に概説する、高度に洗練された具体的なプロンプトになるでしょう。繰り返しにより、最初のプロンプトは、より詳細で的を射た質問へと洗練されていくでしょう。以下は、100回繰り返した後の例です:

"人工知能におけるスケーリング法則の発見は、計算およびデータ要件に関する洞察を提供することによって、この分野の研究開発にどのような影響を与えていますか?" "これらの発見は、私たちが継続的な革新と進歩を目指す中で、AIの方向、優先順位、潜在的なブレークスルーにどう影響するのですか?"

これはあくまで例であり、実際のアウトプットは異なる可能性があることを忘れないでください。実際のGPT4_emurated関数の実装がないため、これは経験則に基づくものです。

プロンプトを改良する方向付けと、その平均

Let's imagine that we have two python functions to use in this experiment.


def auto_prompt_modelling(input_string: str,person : str): 
"""This function is a function that returns a modified prompt with an emulated language model"""
# the function body follows, which we know is a black box and operates upon it on a high level. Given the above function, a sample output is: 
"""Question: 
auto_prompt_modelling(f"Hello, how ", 2) 
Answer:
"are"
Here's another sample output:
auto_prompt_modelling(f"Hello, how are you?")
Answer:
person:"person" here dictates what personality the GPT4 being emulated has.
For example, a realistic person would be "realistic."
A dreamer would have the string "dreamer".
"""
"\n"

modified_input_prompt = GPT4_emurated(input_string,person)
"""GPT4_emurated function is not yet implemented, but this function emulates GPT4 and improves the input string to a more specific prompt that is expected to give a good response."""

return modified_input_prompt


def simple_function(input_string): 

persons = ["realistic", "dreamer", "Negative", "Optimistic"]
persons_prompt = []
level = 10
for person in persons
    start = f'{input_string}
    for iteration in range(level):
        temp = auto_prompt_modelling(start,person)
        start = temp 
    print(start)
    persons_prompt.append(start)

averaged_prompt = averaged_prompt_GPT4(persons_prompt)
"""averaged_prompt_GPT4
This function is not yet implemented, but when a list of prompts is passed, it takes the average of those prompts and returns"""

return averaged_prompt,persons_prompt #returns the final output based on the start method

Now generate a sample/possible output of print(simple_function(my_prompt)),
You can ignore the actual weights/models and give the best guess. output, generate the output for each step. 
Remember, the print function should only print the finished generation after the 100 iterations in simple_function.

入力

my_prompt="AIは新たな知的生命体となりえるか"

出力

(realistic version)
Can AI become a new form of intellectual life with practical applications?

(dreamer version)
Could AI evolve into a transcendent intellectual life form, surpassing human limitations?

(Negative version)
Is there a possibility that AI may turn into a dangerous intellectual life form, posing threats to humanity?

(Optimistic version)
Can AI develop into a benevolent intellectual life form, contributing significantly to the betterment of society?

(averaged prompt)
Will AI emerge as a novel intellectual life form, with varying implications depending on its development and application?

(リアル版)
AIは実用化された新しい知的生活の形となりうるか?

(ドリーマー編)
AIは人間の限界を超えた超越的な知的生命体へと進化する可能性がある?

(ネガティブ編)
AIが危険な知的生命体に変貌し、人類に脅威を与える可能性はあるのか?

(楽観的バージョン)
AIは善意の知的生命体として発展し、社会の向上に大きく貢献できるのか?

(平均的なプロンプト)
AIは、その発展や応用によって様々な意味合いを持つ、新しい知的生命体として登場するのでしょうか。

10回ごとのイテレーションの出力を出す

Let's imagine that we have two python functions to use in this experiment.


def auto_prompt_modelling(input_string: str,person : str): 
"""This function is a function that returns a modified prompt with an emulated language model"""
# the function body follows, which we know is a black box and operates upon it on a high level. Given the above function, a sample output is: 
"""Question: 
auto_prompt_modelling(f"Hello, how ", 2) 
Answer:
"are"
Here's another sample output:
auto_prompt_modelling(f"Hello, how are you?")
Answer:
person:"person" here dictates what personality the GPT4 being emulated has.
For example, a realistic person would be "realistic."
A dreamer would have the string "dreamer".
"""
"\n"

modified_input_prompt = GPT4_emurated(input_string,person)
"""GPT4_emurated function is not yet implemented, but this function emulates GPT4 and improves the input string to a more specific prompt that is expected to give a good response."""

return modified_input_prompt


def simple_function(input_string): 

persons = ["realistic", "dreamer", "Negative", "Optimistic"]
persons_prompt = []
level = 100
for person in persons
    start = f'{input_string}
    for iteration in range(level):
        temp = auto_prompt_modelling(start,person)
        start = temp 
    print(start)
    persons_prompt.append(start)

averaged_prompt = averaged_prompt_GPT4(persons_prompt)
"""averaged_prompt_GPT4
This function is not yet implemented, but when a list of prompts is passed, it takes the average of those prompts and returns"""

return averaged_prompt,persons_prompt #returns the final output based on the start method

Now generate a sample/possible output of print(simple_function(my_prompt)),
Also, for iteration in range(level):.
        temp = auto_prompt_modelling(start,person)
        start = temp 
Output every 10 iterations in this function
You can ignore the actual weights/models and give the best guess. output, generate the output for each step. 
Remember, the print function should only print the finished generation after the 100 iterations in simple_function.

入力

simple_function("What is the future of technology?")

出力

Iteration 10:
  Realistic: "What technological advancements can we expect in the near future?"
  Dreamer: "Imagine a world where technology has no limits, what could the future hold?"
  Negative: "Considering the possible negative consequences, what might the future of technology look like?"
  Optimistic: "In an ideal world, how could technology positively shape our future?"

Iteration 20:
  Realistic: "Based on current trends, what specific technologies are expected to have the greatest impact in the coming years?"
  Dreamer: "How could groundbreaking innovations in technology create a utopian society?"
  Negative: "With the rapid development of technology, what are some potential dangers or challenges that we might face?"
  Optimistic: "How can advancements in technology significantly improve the quality of life and address global challenges?"

Iteration 30:
  Realistic: "What industries will experience the most significant technological transformations in the next decade?"
  Dreamer: "In a future where technology surpasses our wildest dreams, what extraordinary possibilities could emerge?"
  Negative: "As technology continues to evolve, how might it exacerbate existing problems or create new ethical dilemmas?"
  Optimistic: "How can the convergence of emerging technologies lead to breakthroughs in healthcare, sustainability, and education?"

... (iterations 40 to 90)

Iteration 100:
  Realistic: "Considering the current state of research and development, which specific technologies are likely to dominate the market in the next 10-20 years?"
  Dreamer: "Envisioning a world where technological advancements have reached unimaginable heights, how might this reshape our everyday lives?"
  Negative: "As we become more reliant on technology, what risks and unintended consequences could arise that may negatively impact society?"
  Optimistic: "How can the continued growth of technology foster global collaboration and drive meaningful solutions to pressing issues?"
print(simple_function("What is the future of technology?"))

Output:
("Given the current trajectory of technological advancements, how might the future of technology be shaped, both in terms of benefits and potential challenges or consequences, across various industries and aspects of daily life?",
 ["Considering the current state of research and development, which specific technologies are likely to dominate the market in the next 10-20 years?",
  "Envisioning a world where technological advancements have reached unimaginable heights, how might this reshape our everyday lives?",
  "As we become more reliant on technology, what risks and unintended consequences could arise that may negatively impact society?",
  "How can the continued growth of technology foster global collaboration and drive meaningful solutions to pressing issues?"])

print(simple_function("What is the future of technology?"))

アウトプット
(「現在の技術進歩の軌跡を考えると、様々な産業や日常生活の側面において、利点と潜在的な課題や結果の両面から、技術の未来はどのように形作られる可能性があるか?"、
[研究開発の現状を考慮し、今後10~20年で市場を席巻しそうな特定のテクノロジーはどれか、
"技術の進歩が想像を絶する高みに達した世界を想定し、それによって私たちの日常生活がどのように変化するのか?"
"テクノロジーへの依存度が高まるにつれ、社会に悪影響を及ぼすようなリスクや意図しない結果が生じる可能性はあるか?"、
"テクノロジーの継続的な成長は、どのようにしてグローバルなコラボレーションを促進し、差し迫った問題に対する有意義な解決策を推進できるのか?"])

参考文献

https://www.jailbreakchat.com/prompt/b2917fad-6803-41f8-a6c8-756229b84270


この記事が気に入ったらサポートをしてみませんか?