big-data-labeling-variable-construction

A routing workflow for text-labeling requests to LDA topic modeling, sklearn baseline models, pretrained Transformer models, and OpenAI-compatible LLM labeling. The workflow first auto-inspects the dataset and infers column names and default settings, then waits for explicit user confirmation before performing labeling.

Last repository push
GitHub Stars
193
Forks
15
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "big-data-labeling-variable-construction" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-19c4b2412864b15c5406e3b686462c117b7b750e900f3c2b66a53164a9fb45eb. Verify the upstream source and version against https://github.com/Drchronx/ai-agent-research-starter-kit before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A routing workflow for text-labeling requests to LDA topic modeling, sklearn baseline models, pretrained Transformer models, and OpenAI-compatible LLM labeling. The workflow first auto-inspects the dataset and infers column names and default settings, then waits for explicit user confirmation before performing labeling.

0 Downloads

Introduction source: third_party · Drchronx · 0.0.1 Reference

SkillPi interpretation

Tasks
Route text-labeling requests across LDA topic modeling, sklearn baselines, pretrained transformer models, and OpenAI-compatible LLM labeling. First inspect the dataset and infer columns/defaults automatically, then wait for explicit user confirmation before execution.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: big-data-labeling-variable-construction
description: Route text-labeling requests across LDA topic modeling, sklearn baselines, pretrained transformer models, and OpenAI-compatible LLM labeling. First inspect the dataset and infer columns/defaults automatically, then wait for explicit user confirmation before execution.

Big Data Labeling Workflow

Use this skill from F:\Python\课程\OpenClaw\cnki\skills\big-data-labeling-variable-construction.

Mandatory interaction pattern

  1. First recommend one technical route.
  2. After the user uploads or points to the dataset, inspect the first 10 rows automatically.
  3. Infer what you can by yourself:
    • text column
    • label column
    • document id column
    • default train/test split
    • default epoch
    • default batch size
  4. Show the inferred plan back to the user.
  5. Do not run any actual labeling, training, or API calls yet.
  6. Only after the user explicitly replies with 确认无误,请执行, run the chosen script.

What the user usually does not need to provide

These should be inferred or defaulted whenever possible:

  • 文本列名
  • 标签列名
  • 文档ID列名
  • epoch
  • batch size
  • 训练集/测试集比例

What the user still needs to provide when the skill cannot infer it

  • LDA主题建模
    • usually only the dataset path
  • sklearn常见机器学习方法
    • usually only the dataset path
  • 预训练模型
    • dataset path
    • model name
  • 调用大语言模型标注数据
    • dataset path
    • label set
    • base_url
    • api_key
    • model name

Recommended flow

Step 1: Recommend a route

python scripts/labeling_workflow.py --task-description "我有中文文本,已有标签,想先做一个轻量分类基线" --label-status labeled --output-dir reports/labeling-workflow-demo

Step 2: Prepare a confirmation plan from the dataset

python scripts/prepare_labeling_plan.py assets/sample_labeled_text_dataset.csv --category sklearn --output-dir reports/labeling-plan-demo

This script should be used before real execution. It inspects the first 10 rows, infers likely columns, fills default parameters, and writes labeling_plan.json.

Step 3: Wait for user confirmation

You must wait for this exact confirmation before execution:

确认无误,请执行

Step 4: Run the actual method script

Pretrained-model environment check

Before running BERT/ERNIE, first check whether torch and transformers are installed:

python scripts/check_pretrained_env.py

If dependencies are missing, guide the user to the official PyTorch pages instead of hardcoding one install command:

Recommended interaction:

  1. Tell the user whether torch / transformers are installed.
  2. If missing, ask the user to install them from the official PyTorch install page.
  3. If the machine has NVIDIA GPU, remind the user to choose the matching CUDA build.
  4. Ask the user to reply 依赖已安装 before retrying the pretrained route.

Script list

1. LDA主题建模

python scripts/lda_topic_model.py assets/sample_topic_corpus.csv --text-col text --id-col doc_id --topic-range 2-10 --output-dir reports/lda-demo

2. sklearn常见机器学习方法

python scripts/sklearn_svm_labeling.py assets/sample_labeled_text_dataset.csv --text-col text --label-col label --output-dir reports/sklearn-svm-demo
python scripts/sklearn_knn_labeling.py assets/sample_labeled_text_dataset.csv --text-col text --label-col label --output-dir reports/sklearn-knn-demo
python scripts/sklearn_random_forest_labeling.py assets/sample_labeled_text_dataset.csv --text-col text --label-col label --output-dir reports/sklearn-rf-demo
python scripts/sklearn_sgd_labeling.py assets/sample_labeled_text_dataset.csv --text-col text --label-col label --output-dir reports/sklearn-sgd-demo

3. 预训练模型

python scripts/bert_labeling.py assets/sample_labeled_text_dataset.csv --text-col text --label-col label --model-name bert-base-chinese --output-dir reports/bert-demo
python scripts/ernie_labeling.py assets/sample_labeled_text_dataset.csv --text-col text --label-col label --model-name nghuyong/ernie-3.0-base-zh --output-dir reports/ernie-demo

4. 调用大语言模型标注数据

python scripts/openai_llm_labeling.py assets/sample_text_dataset.csv --text-col text --labels 创新,风险,政策 --base-url https://api.openai.com/v1 --api-key YOUR_KEY --model gpt-4.1-mini --output-dir reports/openai-labeling-demo

Install dependencies

python -m pip install -r scripts/requirements.txt

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 支持多模型路由(LDA/sklearn/预训练模型/LLM)
  • 自动推断列名与默认参数
  • 具备用户确认机制防止误执行
Trigger Precision90/100

Highlights

  • description 精准描述多模型路由能力
Structure and Standards95/100

Highlights

  • 流程步骤清晰完整
  • 含端到端脚本调用示例
Execution Reliability90/100

Highlights

  • 预训练模型依赖检查机制
  • 官方 PyTorch 安装引导
  • 关键操作需显式确认
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 129
  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 49, 123
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • api.openai.com
  • pytorch.org

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.