Draw a Person Using Alphabet

用字母绘制一个人

背景

以下提示测试了一个LLM处理视觉概念的能力,尽管它仅在文本上进行训练。这对LLM来说是一个具有挑战性的任务,因此它涉及多次迭代。在下面的示例中,用户首先请求一个期望的视觉图像,然后提供反馈以及修正和补充。后续的指示将取决于LLM在任务上的进展。请注意,此任务要求生成TikZ代码,然后需要用户手动编译。

提示

提示迭代 1:

Produce TikZ code that draws a person composed from letters in the alphabet. The arms and torso can be the letter Y, the face can be the letter O (add some facial features) and the legs can be the legs of the letter H. Feel free to add other features.

提示迭代 2:

The torso is a bit too long, the arms are too short and it looks like the right arm is carrying the face instead of the face being right above the torso. Could you correct this please?

提示迭代 3:

Please add a shirt and pants.

代码 / API

from openai import OpenAI
client = OpenAI()
 
response = client.chat.completions.create(
model="gpt-4",
messages=[
    {
    "role": "user",
    "content": "Produce TikZ code that draws a person composed from letters in the alphabet. The arms and torso can be the letter Y, the face can be the letter O (add some facial features) and the legs can be the legs of the letter H. Feel free to add other features.."
    }
],
temperature=1,
max_tokens=1000,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)

参考