#+title: tag slop #+title_extra: #+pubdate: <2025-07-25> #+rss_title: #+filetags: I hate tagging content. It occurs to me for a series, but never ahead of time, and they are nice to have for browsing. Let's add slop to the web by tagging posts here with [[https://ollama.com/][ollama]]! We can create a model derived from an existing one with a [[https://github.com/ollama/ollama/blob/main/docs/modelfile.md][ModelFile]]: #+begin_src dockerfile :tangle ../extra/modelfile.txt FROM gemma3:12b # setting a seed makes it deterministic PARAMETER seed 1337 # set temperature [higher is more creative, lower is more coherent] # PARAMETER temperature 0.1 PARAMETER temperature 1 # allow looking back further, at the cost of more memory PARAMETER num_ctx 20000 # PARAMETER num_ctx 4096 SYSTEM """You are a content tagger for text. Your will take in an article and return a terse set of tags. A tag is a single word. Tags should not be plural. Tags should be relevant to the article contents. Only respond with a single line comma-separated list of tags, such as: emacs,bspwm,colors,music,hallucination """ # give it an example of expected conversation: MESSAGE user tag this text: Cake is nice. I love cats and lately I've been thinking about the rain MESSAGE assistant cake,cats,rain #+end_src We'll name it "tagger": #+begin_src sh ollama create ns/tagger -f ../extra/modelfile.txt; #+end_src #+RESULTS: And we're off!: #+begin_src sh $ cat On-Emacs.org | ollama run ns/tagger "tag this text: \n" emacs,programming,text-editor,lisp,customization #+end_src I'm not much of a prompt engineer, but it's been fun (and infuriating) to see how little shifts in the system prompt affect the quality of the tagging. ----- Much more interesting has been HOWTO display the tags around the site. Showing generated tags on every header would get noisy fast - I've decided that what makes tags meaningful is there being multiple posts with a tag (it's annoying to click a tag link and find out you are on the only relevant post already). You can see the tag cloud over at [[./tags.org][tag links]], but for now only tags that have multiple posts are shown at the top of post pages.