metaprompt
1.0.0
Metaprompt adalah bahasa khusus domain untuk rekayasa cepat LLM. Ini adalah mesin template untuk permintaan tekstual, di mana ekspansi ekspresi dapat bergantung pada output LLM.
Tujuannya adalah untuk memperluas teknik yang biasa dari petunjuk parametrized dengan kemampuan program, reusability, dan meta-prompompting.
The text you are reading right now is a valid metaprompt program.
[# this is a comment that is ignored by the interpreter, that can be
used to add some info for the human-developer]
[# This whole text is a parametrized prompt, one of the parameters
being [:subject]]
[# [:subject] here is a variable reference. Variables can be defined
in-place, or passed from the external environment]
Give me a detailed poetic description of [:subject], using one or more
of the following metaphoric expressions:
[# Now I want to specialize my prompt depending on the value of
[:subject]. The output of the prompt below will be included *instead*
of the [$ ... block]: ]
[$ Write me a bullet list of metaphors for [:subject]. Do not produce
any other output]
[# Conditionals allow for logic branching: ]
[:if [:subject] is a human
:then
Use jokingly exaggerated style
:else
Include some references to [$ List some people who have any
relation to [:subject], comma-separated]
]
Lihat examples/ untuk lebih.
Ini adalah pekerjaan awal yang sedang berlangsung. Ikuti saya di Twitter untuk pembaruan
[:variable] dan [:variable=some value] [:if ... :then ... :else ...]true atau false [$ meta-prompt]$ output - untuk saat ini [:_=...] berfungsi (penugasan ke variabel _ ) [:use module :param1=value1][# comments][:STUATUS=some-status] - untuk ditampilkan selama evaluasi cepat [@foreign_function arg1 :with arg2 :param1=foo :param2=bar]MODEL - contoh) [chat1$ the object is the moon][chat1$ what is the object?] (Contoh) ROLE (Contoh) [:use @ffi-function :param1=foo :param2=bar] [:use ...]