AGENT SKILL

representations-labeling

Fine-tune BERTopic topic representations, labels, and multi-aspect outputs.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
representations-labeling
license
MIT
metadata
{ "package": "BERTopic", "disco-role": "operating", "parent-skill": "bertopic", "package-version": "0.17.4" }
description
Fine-tune BERTopic topic representations, labels, and multi-aspect outputs.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

representations-labeling

Use this sub-skill when the task is about post-hoc topic representations, topic labeling, multi-aspect outputs, or prompt-based label generation.

Route here for

  • KeyBERTInspired, MaximalMarginalRelevance, and other keyword rerankers.
  • PartOfSpeech keyword refinement with spaCy patterns.
  • ZeroShotClassification against a candidate label list.
  • Prompt-based labelers: TextGeneration, OpenAI, LiteLLM, LangChain, Cohere, and LlamaCPP.
  • VisualRepresentation for image-centered or multimodal topic aspects.
  • Custom BaseRepresentation classes, including chained representation lists and multi-aspect dicts.
  • generate_topic_labels, set_topic_labels, topic_aspects_, get_topic(full=True), and get_topics(full=True) when the question is about labels or aspect views.

Route elsewhere

  • Embedding backend selection, model download, or encoder troubleshooting: use the embeddings-backends sub-skill.
  • c-TF-IDF, CountVectorizer, online vocabulary updates, or tokenization choices: use the vectorizers-ctfidf sub-skill.
  • Core fit/transform/partial_fit, clustering, topic mutation, or topic reduction: use the topic-modeling sub-skill.
  • Plotting, dashboarding, and figure interpretation belong in the analysis/visualization sub-skill.
  • Save/load, hub publishing, and serialization format choices belong in the serialization sub-skill.

Operating references

  1. references/api-reference.md
  2. references/workflows.md
  3. references/troubleshooting.md
  4. scripts/smoke_representations.py

Minimal decision flow

  • If you only want to soften or diversify the default keywords, start with KeyBERTInspired or MaximalMarginalRelevance.
  • If you need noun-phrase or POS filtering, use PartOfSpeech and keep a spaCy model available.
  • If you already know the labels, use ZeroShotClassification before falling back to generated labels.
  • If you want generated labels, use TextGeneration, OpenAI, LiteLLM, LangChain, Cohere, or LlamaCPP with a prompt that names the label format clearly.
  • If you need several views of the same topic, use a dict representation_model with a Main pipeline plus aspect names, then inspect topic_aspects_.
  • If you need a chained label flow, pass a list of representation models in order; each tuner sees the previous output.
  • If you need KeyBERTInspired to use the top-level embeddings shortcut, keep it at the top level instead of hiding it inside a list or aspect dict.
  • If you only need to rename topics after fitting, prefer generate_topic_labels or set_topic_labels rather than retraining.

Verification anchors

  • A chained representation model that reranks keywords and then emits a concise topic label.
  • Label-setting edge cases for outlier and non-outlier topic ids.
  • Multi-aspect topic retrieval through topic_aspects_ and aspect-aware generate_topic_labels(aspect=...).

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351