View Source Store.Prompt (fnord v0.5.0)
The ask
subcommand saves useful prompts to the store. Saved prompts are
accompanied by a title and a list of example questions for which the prompt
is appropriate.
When a prompt is saved, an embedding is generated from it to make the prompt (and the questions to which it applies) searchable.
Whenever a prompt is modified or refined, the previous version is archived to the prompt's store dir with a version number:
<$STORE>/prompts/<$PROMPT_ID>./v<$VERSION>/
File structure:
$HOME/
-> .fnord/
-> prompts/
-> <$PROMPT_ID>/
-> v1
-> title.md
-> prompt.md
-> questions.md
-> embeddings.json
-> v2
-> title.md
-> prompt.md
-> questions.md
-> embeddings.json
There are a number of initial prompts that are installed the first time the
prompt store is searched. These prompts are defined in data/prompts.yaml
.
When a new version of fnord is installed, the next time the prompt store is
searched, the prompts will be updated to the latest versions. "Default"
prompts can be distinguished by using a title slug for its id, rather than a
UUID.