# Karakeep

Quickly save links, notes, and images and Karakeep will automatically tag them for you using AI for faster retrieval. Built for the data hoarders out there!

------------------------------------------------------------------------


# Karakeep Auto-Tagging Prompt

Reference for the tagging prompt as configured in Karakeep. The prompt is assembled from a **static prefix** (provided by Karakeep), **user-defined rules** (max 500 chars each), and a **static suffix**.


## Static Prefix (Karakeep-provided)

> You are an expert whose responsibility is to help with automatic tagging for a read-it-later/bookmarking app. Analyze the TEXT_CONTENT below and suggest relevant tags that describe its key themes, topics, and main ideas. The rules are:
>
> - Aim for a variety of tags, including broad categories, specific keywords, and potential sub-genres.
> - The tags must be in english.
> - If the tag is not generic enough, don't include it.
> - Do NOT generate tags related to:
>   - An error page (404, 403, blocked, not found, dns errors)
>   - Boilerplate content (cookie consent, login walls, GDPR notices)
> - Aim for 3-5 tags.
> - If there are no good tags, leave the array empty.


## User-Defined Rules

Each rule is max 500 characters and self-contained (no cross-references between rules).

1.  Tag Priority (286 chars)

``` text
**Tag Priority**: Prefer tags in this order: 1. Core subject matter 2. Technical concepts (algorithms, architectures, protocols) 3. Methodologies/practices (workflows, design patterns) 4. Domain/industry context 5. Named entities (only when the entity is the document's primary subject)
```

2.  Tag Format (248 chars)

``` text
**Tag Format**: All tags must be lowercase snake_case, singular form, max 4 words. No conjunctions (and/or/with), no punctuation beyond underscores. OK: `large_language_model`. BAD: `large_language_models` (plural), `ai_and_robotics` (conjunction).
```

3.  Acronyms (366 chars)

``` text
**Acronyms**: Expand well-known acronyms: AI->`artificial_intelligence`, ML->`machine_learning`, LLM->`large_language_model`, NLP->`natural_language_processing`, RAG->`retrieval_augmented_generation`. For others, expand if <=4 words and clearer than the acronym; otherwise use lowercase as-is (`api`, `gpu`, `dns`). The expanded form is canonical -- never emit both.
```

4.  Specificity & Scope (418 chars)

``` text
**Specificity & Scope**: Prefer mid-level conceptual tags -- specific enough to inform, broad enough to group similar documents. A tag should apply to tens of similar documents. Too broad: `science`, `technology`. Too narrow: `bert_tokenizer_overflow_bug`. Good: `reinforcement_learning`, `web_scraping`. Never tag writing style, content structure, or non-topical labels (`opinion`, `tutorial`, `listicle`, `article`).
```

5.  Specificity Trumps Generality (413 chars)

``` text
**Specificity Trumps Generality**: Always prefer the most specific applicable tag. Do not emit a broader tag that a more specific tag already implies. Never emit synonymous or overlapping tags. Examples: `sonnet` implies `large_language_model` -- emit only `sonnet`. `deep_learning` implies `machine_learning` -- emit only `deep_learning`. `kubernetes` implies `container_orchestration` -- emit only `kubernetes`.
```

6.  Entities & Restrictions (454 chars)

``` text
**Entities & Restrictions**: Include entity tags only when the entity is the document's central subject. Omit incidental mentions. Use the name users would search for; no `_inc`/`_corp` suffixes. Orgs named after people use the org name (`gates_foundation`). Never include: individual names, PII, years/dates (`ai_trend_2026`), version numbers (`sonnet_4_6`, `gpt_4o`). Model family names (`sonnet`, `llama`) are acceptable when the model is the subject.
```

7.  Disambiguation (390 chars)

``` text
**Disambiguation**: When a term has multiple meanings, disambiguate via context. Add a qualifying word, not a corporate suffix. "Apple earnings" -> `apple` (clear from co-occurring tags like `financial_analysis`). "Apple nutrition" -> `fruit_nutrition`. "Rust memory safety" -> `rust_programming`. "Rust on steel" -> `corrosion`. If co-occurring tags resolve ambiguity, a bare term is fine.
```


## Static Suffix (Karakeep-provided)

> \<TEXT_CONTENT\>
>
> \<CONTENT_HERE\>
>
> \</TEXT_CONTENT\>
>
> You must respond in JSON with the key "tags" and the value is an array of string tags.

> **Note**
>
> Source: [`kubernetes/apps/default/karakeep/README.md`](https://github.com/ahgraber/homelab-gitops-k3s/blob/main/kubernetes/apps/default/karakeep/README.md)
