Extract Concepts
# User-invoked prompt · extract-concepts (v1.8.2 · Obsidian-style) > Replaces deleted `tools/extract.py` and `tools/lib/cortex/extraction.py` > helpers. ROUTER reads this when user manually wants to run concept candidate > extraction outside of archiver Phase 2. > > **v1.8.2 HARD RULE #11**: Concept candidates + extraction report render > in Obsidian. Apply `references/obsidian-style.md` — concept entries use > wiki frontmatter (kind: knowledge), report uses callouts + `[[wikilinks]]`. ## Trigger keywords - `抽取概念候选` / `extract concept candidates` - `跑 concept extraction` / `concept extraction` ## Goal Tokenize a corpus of session text, count noun-phrase candidates, filter stopwords + low-frequency, generate canonical slugs. This is the deterministic first pass — the human or archiver subagent does LLM judgment on top. ## Steps 1. **Input**: ask user for source — typically: - "current session transcript" - "session file at meta/sessions/{sid}.md" - "all sessions in meta/sessions/{YYYY-MM}-*.md" 2. **Read + concatenate** all source text 3. **Tokenize**: split into 1-3 word noun-phrase candidates (alphanumeric + Chinese chars) 4. **Filter stopwords** (中英日 common words): - 中文: 是 / 的 / 了 / 在 / 有 / 我 / 你 / 他 / 这 / 那 / 都 / 也 / 就 / 还 / 但 / 等 - English: the / a / an / and / or / but / is / are / was / were / be / been / has / have / had / for / of / with / this / that / it / on / in / to / from - 日本語: です / ます / これ / それ / あれ / という / こと / もの / ため 5. **Count occurrences** per candidate 6. **Filter `count >= 2`** (single-mention items are too transient) 7. **Generate slug** per candidate (deterministic, must be reproducible): - Lowercase - Replace spaces / non-alphanumeric with `-` - Chinese: pinyin transliteration if reliable; **fallback to SHA-1 hash of canonical name (first 10 chars)** to guarantee same name → same slug across runs 8. Sort by count desc, take top 20 ## Output (no file write — print to user)
fill the variables
This prompt has 2 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{sid}{YYYY-MM}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo jasonhnd/life_OS (NOASSERTION). A "Extract Concepts" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
jasonhnd/life_OS · NOASSERTION