Pass prompts through templates. Provide a library of common snippets (eg: common instructions for telling models to user certain output formats, prefer certain thinking styles, or ignore types of information). Allow plugin and user defined additional parameters, for instance, project "You are a..." prompts.
Load template view object by shallow merging, in order (later overrides earlier):
a. Default global view with documented formatting control snippets
b. Additional Engine view with documented model-specific snippets
c. Additional Plugin view for project plugins to provide snippets
d. --template repeated command line flag to provide additional snippets in JSON (YAML?) format
e. template: key in .aillyrc grey matter
Suppress template expansion with template: false in greymatter (inherited through .aillyrc) or --no-template command line flag
Example:
.aillyrc
{{project.user}}
{{project.overview}}
In this task, we are brainstorming for a corporate branding.
The brand is a new line of seltzer.
10_overview.md
{{output.format.ad_json}}
Create an an ad spot for this product.
with the view:
{
project: {
user: "You are a corporate marketing consultant.",
project: "The group works as an embedded team and views the clients' success as their own."
},
output: {
prose: "Your output should be prose, with no additional formatting.",
markdown: "Your output should use full markdown syntax.",
python: "Your output should only contain Python code, within a markdown code fence:\n\n```py\n#<your code>\n```"
ad_json: "Your output will be a JSON document with fields 'campaign_id' and 'ad_copy'."
}
}
Would fill out:
System:
You are a...
The group works as…
In this task…
The brand...
Human:
Your output will be...
Create an an ad spot for this product.
Pass prompts through templates. Provide a library of common snippets (eg: common instructions for telling models to user certain output formats, prefer certain thinking styles, or ignore types of information). Allow plugin and user defined additional parameters, for instance, project "You are a..." prompts.
Example:
.aillyrc
10_overview.md
with the view:
Would fill out: