metaprompt
1.0.0
MetaPromptは、LLMプロンプトエンジニアリングのドメイン固有の言語です。これは、テキストプロンプトのテンプレートエンジンであり、表現拡張がLLM出力に依存する可能性があります。
目標は、プログラマ性、再利用可能性、メタ促進能力を備えたパラメータ化されたプロンプトの通常の手法を拡張することです。
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]
]
詳細についてはexamples/をご覧ください。
これは進行中の早期作業です。アップデートについては、Twitterでフォローしてください
[:variable]および[:variable=some value] [:if ... :then ... :else ...]trueまたはfalse場合は、短絡します[$ meta-prompt]$ outputを無視するための構文 - 今のところ[:_=...] works( _変数への割り当て) [:use module :param1=value1][# comments][:STUATUS=some-status] - 迅速な評価中に表示する[@foreign_function arg1 :with arg2 :param1=foo :param2=bar]MODEL変数を介して - 例) [chat1$ the object is the moon][chat1$ what is the object?] (例) ROLE変数を介したメッセージロールシステム(システム、ユーザー)(例) [:use @ffi-function :param1=foo :param2=bar]を介して[:use ...]