Generate Sieve scripts to filter your emails with the helm of LLMs
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-02-15 10:58:36 -07:00
.env.example initial scripts from gemini 2026-01-22 18:13:16 -07:00
.gitignore gitignore the generated sieve file 2026-01-22 19:03:36 -07:00
download_emails.rb save a list of folders for use by the LLM 2026-02-15 10:58:36 -07:00
gems.locked initial scripts from gemini 2026-01-22 18:13:16 -07:00
gems.rb initial scripts from gemini 2026-01-22 18:13:16 -07:00
README.md finish instructions 2026-01-22 19:55:53 -07:00
script.rb save a list of folders for use by the LLM 2026-02-15 10:58:36 -07:00

Sieve-by-LLM: Generating sieve email filtering scripts using an LLM trained on your email

A simple set of scripts that interact with a local Ollama server to generate sieve scripts to filter your email.

Basically, I get a lot of email and I'm lazy and want the computer to build some filter rules for me automatically as a starting point.

Setup

bundle install
ollama serve
ollama pull qwen3-coder:30b
ollama pull qwen3-embedding:4b

Instructions

  1. Download the emails from your IMAP server via bundle exec ruby download_emails.rb.
  2. Then, generate the sieve script (this will take a while): bundle exec ruby script.rb.
  3. Check out ./ollama_httpx_rules.sieve for the results!