Load your writing. Guide Ailly to your voice. Write your outline. Prompt Ailly to continue to keep writing. Edit its output, and get even more text like that.
Rhymes with daily.
Ailly's best feature is rapid prompt engineering iteration. By keeping your prompts in snippets on the file system, you can make very fine-grained changes to your prompt and immediately see the difference in the output. You can also use all of your normal source control tooling to track changes over time: both your changes, and those from the LLM.
The VSCode extension provides several commands.
Ailly: Run
runs Ailly on a file. You can activate it with either the right-click context menu or the command palette.
Ailly: Run All
runs Ailly on a folder and all files below it in the file system.
Ailly: Continue
sends the response as an Assistant
message, to have the LLM continue generating.
This is especially useful when a request ends before the LLM is 'finished', for instance, asking it to repeat and edit a long document.
Ailly: Clean
and Ailly: Clean All
on a file or folder clean Ailly details from the file. This includes removing debug data from the metadata of each prompt file and removing the response contents.
Ailly: Edit
runs from the command palette on the current active file (or does nothing if there's no active file).
Ailly: Edit
uses the current file and its root, in the folder
context, and includes the current highlighted selection as the edit range..vsix
file from the latest release..vsix
file downloaded in step 1.When using the Bedrock engine, the Ailly extension uses your current AWS configuration.
Ailly also exposes two settings, Ailly: AWS Profile
and Ailly: AWS Region
, to choose which profile and (optionally) which Region to use for Bedrock requests.
Use aws configure
or the equivalent command to configure ~/.aws/config
and ~/.aws/credentials
.
If Ailly shows a credentials error, check this configuration first.
10_chickens.md
that contains the following text: "Tell me a joke about chickens!"10_chickens.md
and choose Ailly: Run
.10_chickens.md.ailly.md
!.aillyrc
that contains the following text: "You are a farmer writing jokes for your other barnyard animals."20_knock_knock.md
that contains the following text: "Turn the chicken joke into a knock knock joke."Ailly: Run All
.To get started on the command line, follow these steps:
npx @ailly/cli --prompt 'Tell me a joke'
jokes
and change directory into it.10_chickens.md
with "Tell me a joke about chickens" as the content.npx @ailly/cli
10_chickens.md.ailly.md
.aillyrc
with "You are a farmer writing jokes for your other barnyard animals."
20_knock_knock.md
that contains teh following text: "Turn the chicken joke into a knock-knock joke."npx @ailly/cli 20_knock_knock.md
20_knock_knock.md.ailly.md
now contains the new knock knock joke based on the updated chicken joke it wrote!To use Ailly more easily, install the latest version with npm install @ailly/cli
, after which the command ailly
will run Ailly.
System prompts provide grounding and background information for LLMs.
There are a number of techniques and "best practices" for developing LLM system prompts.
In Ailly, these are in files with the name .aillyrc
, and apply to all files in the current folder when using Ailly.
These files can also specify properties that control how the LLM prompts are constructed, again for every file.
Ailly generates LLM responses for one file at a time. It prepares the conversational history and context by using the file system and folders the file is in. There are variations in how Ailly composes the prompt, which can be controlled with several properties.
You can set these properties in a combination of locations, including the command line, .aillyrc
files, and greymatter in each file.
Later settings override earlier settings.
combined
: boolean
If true
, the file's body is the response and the prompt is in the greymatter key prompt
. If false
, the file's body is the prompt and the response is written to {file_name}.ailly.md
. The default is false
.skip
: boolean
If true
, the prompt is not sent through the LLM (but is part of the context).isolated
: boolean
If true
, the LLM inference only includes the system prompt, and not the prior context in this folder.context
conversation
| folder
| none
conversation
(default, unless editing) loads files from the root folder and includes them alphabetically, chatbot history style, before the current file.folder
includes all files in the folder at the same level as the current file. (Default when editing.)none
includes no additional content (including no system context).parent
root
| always
| never
root
(default) start the chain of system prompts from the loaded .aillyrc
file.always
include the .aillyrc file in the parent directory as part of this system prompt.never
don't include any other system prompts.always
goes up one level, and then parent
gets reapplied. To include several ancestors, have parent: always
in each, with root
as the base .aillyrc
of the project.template-view
[path]
loads variables to use with mustache templates in your prompts.PLAN to use Ailly effectively. Iterate often. Provide context. Put words in Ailly's mouth.
openai
)
bedrock
)
./core/src/engine/bedrock
.To choose an engine, export AILLY_ENGINE=[bedrock|openai]
or provide ailly --engine
on the command line.
See DEVELOPING.md for details on how to run and debug various Ailly components.
Ailly can use plugins to provide additional data when calling the LLM models using retrieval augmented generation (RAG).
The default plugin rag
(AILLY_PLUGIN=rag
, --plugin=rag
) uses a [vectra]() database in ./vectors/index.json
.
You can provide custom plugins with --plugin=file:/absolute/path/to/plugin.mjs
.
This plugin must export a default factory function matching the PluginBuilder
interface in core/src/plugin/index.ts
.
In LLM chat interfaces like ChatGPT or chains like Langchain, the history of the conversation remains in the sequence of interactions between the human and the assistant.
This history is typically in a format that is inaccessible to the user. The user can only regenerate sequences, or add their next prompt at the end.
Ailly removes this limitation by using your file system as the conversational history.
You maintain full control over the sequence of prompts, including editing the LLM's response before (re)generating the next prompt so you can decide how the conversation should evolve.
By editing an LLM prompt, you can keep the best of what the LLM produced and modify the rest. Using this filesystem-based conversational history, Ailly stores each piece of the session in source control. With version tracking, you can see how your prompts and responses have changed over time, and unlock long-term process improvements that are difficult or even impossible with chat interfaces.
In one session, a developer was working on a long sequence of prompts to build a software project. While reviewing an LLM-generated draft of the README, the developer wanted the list of API calls to be links to the reference documentation. With a chat conversational history, the developer would have needed to modify the instructions for the entire prompt to encourage creating the list, rerun the generation, and hoped the rest of the README came out similarly.
Instead, with Ailly, the developer created a new file with only the list and an instruction on how to create URLs from the list items, saved it as list.md
(with isolated: true
in the combined head), and ran ailly list.md
.
The LLM followed the instructions, generated just the updated list, and the developer copied that list into the original (generated) README.md. In later prompts, the context window included the entire list of URLs, and the agent model could intelligently request to download their contents.
To the author's knowledge, no other LLM interface provides this level of interaction with LLMs.