Yams are LLM chat histories declared as yaml (with markdown strings).
BSD-3-CLAUSE License
YAMs are chat histories with LLMs declared as YAML, containing markdown strings used primarily to communicate with an Ollama API and aid in ideation or in agentic workflows.
Advantages:
Example YAM
Generally a VCS Git repo might hav a docs
or documentation
folder, we can then create docs/yams/000-template.yaml
and use that to jumpstart any new YAMs before commiting them.
This allows YAMs to be further refined with peers in pull reqiests.
Here we might have a folder of recipies
and the following YAM might be recipies/001-penut-butter-and-jelly.yaml
# YAMs context doc
# - everything in this file gets converted to JSON and sent to an Ollama LLM endpoint
# - single prompt with a context block provided as a markdown yaml codeblock
# - returns either the context block back a yaml, markdown or plain text
model: mistral
messages:
- role: user
content: >-
Using the following context:
```yaml
type: recipe
slug: ""
title: "Peanut butter and jelly"
ingredients:
- name: Crunchy Peanut Butter
quantity: 2
unit: Tbsp
steps:
- Spread Peanut Butter on bread.
```
Complete the document in the YAML code block.
```yaml
```
# After we run bin/yams ./pbj.yaml
# The following object will be added from the LLM's response
- role: assistant
content: |2-
```yaml
type: recipe
slug: "peanut-butter-and-jelly"
title: "Peanut Butter and Jelly Sandwich"
ingredients:
- name: Crunchy Peanut Butter
quantity: 2
unit: Tbsp
- name: Smooth Jelly or Jam (Strawberry, Grape, etc.)
quantity: 3
unit: Tbsp
steps:
- Spread a layer of Peanut Butter on one slice of bread.
- Spread a layer of Jelly or Jam on another slice of bread.
- Place the two slices together with their respective layers facing each other.
```
Whats in this Repo?
bin/yams
if required (or re-implment and link to that here)bin/yams
script.x
as yaml (do note less is more on templates)
Process:
Implementation Notes:
bin/yams
.This is a basic implementation of YAMs to complete a document generating a peanut butter and jelly recipe. We can complete
it by running bin/yams examples/recipes/peanut-butter-and-jelly.yaml
which will send this request to the specified Ollama API endpoint for completion.
Inside of examples/screenplays/cyberpunk-spirited-away.yaml
is a starter YAMs I generated from this prompt to declare a screenplay as yaml. On