nlp-engineer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

NLP Engineer

NLP工程师

Purpose

用途

Provides expertise in Natural Language Processing systems design and implementation. Specializes in text classification, named entity recognition, sentiment analysis, and integrating modern LLMs using frameworks like Hugging Face, spaCy, and LangChain.
提供自然语言处理(NLP)系统设计与实现的专业支持。专注于文本分类、命名实体识别(NER)、情感分析,以及使用Hugging Face、spaCy和LangChain等框架集成现代大语言模型(LLM)。

When to Use

适用场景

  • Building text classification systems
  • Implementing named entity recognition (NER)
  • Creating sentiment analysis pipelines
  • Fine-tuning transformer models
  • Designing LLM-powered features
  • Implementing text preprocessing pipelines
  • Building search and retrieval systems
  • Creating text generation applications
  • 构建文本分类系统
  • 实现命名实体识别(NER)
  • 创建情感分析流水线
  • 微调Transformer模型
  • 设计基于LLM的功能
  • 实现文本预处理流水线
  • 构建搜索与检索系统
  • 创建文本生成应用

Quick Start

快速入门

Invoke this skill when:
  • Building NLP pipelines (classification, NER, sentiment)
  • Fine-tuning transformer models
  • Implementing text preprocessing
  • Integrating LLMs for text tasks
  • Designing semantic search systems
Do NOT invoke when:
  • RAG architecture design → use
    /ai-engineer
  • LLM prompt optimization → use
    /prompt-engineer
  • ML model deployment → use
    /mlops-engineer
  • General data processing → use
    /data-engineer
调用此技能的场景:
  • 构建NLP流水线(分类、NER、情感分析)
  • 微调Transformer模型
  • 实现文本预处理
  • 为文本任务集成LLM
  • 设计语义搜索系统
请勿调用此技能的场景:
  • RAG架构设计 → 使用
    /ai-engineer
  • LLM提示词优化 → 使用
    /prompt-engineer
  • 机器学习模型部署 → 使用
    /mlops-engineer
  • 通用数据处理 → 使用
    /data-engineer

Decision Framework

决策框架

NLP Task Type?
├── Classification
│   ├── Simple → Fine-tuned BERT/DistilBERT
│   └── Zero-shot → LLM with prompting
├── NER
│   ├── Standard entities → spaCy
│   └── Custom entities → Fine-tuned model
├── Generation
│   └── LLM (GPT, Claude, Llama)
└── Semantic Search
    └── Embeddings + Vector store
NLP Task Type?
├── Classification
│   ├── Simple → Fine-tuned BERT/DistilBERT
│   └── Zero-shot → LLM with prompting
├── NER
│   ├── Standard entities → spaCy
│   └── Custom entities → Fine-tuned model
├── Generation
│   └── LLM (GPT, Claude, Llama)
└── Semantic Search
    └── Embeddings + Vector store

Core Workflows

核心工作流

1. Text Classification Pipeline

1. 文本分类流水线

  1. Collect and label training data
  2. Preprocess text (tokenization, cleaning)
  3. Select base model (BERT, RoBERTa)
  4. Fine-tune on labeled dataset
  5. Evaluate with appropriate metrics
  6. Deploy with inference optimization
  1. 收集并标注训练数据
  2. 文本预处理(分词、清洗)
  3. 选择基础模型(BERT、RoBERTa)
  4. 在标注数据集上微调模型
  5. 使用合适的指标进行评估
  6. 结合推理优化进行部署

2. NER System

2. NER系统

  1. Define entity types for domain
  2. Create labeled training data
  3. Choose framework (spaCy, Hugging Face)
  4. Train custom NER model
  5. Evaluate precision, recall, F1
  6. Integrate with post-processing rules
  1. 定义领域专属的实体类型
  2. 创建标注训练数据
  3. 选择框架(spaCy、Hugging Face)
  4. 训练自定义NER模型
  5. 评估精确率、召回率、F1值
  6. 集成后处理规则

3. Embedding-Based Search

3. 基于Embedding的搜索

  1. Select embedding model (sentence-transformers)
  2. Generate embeddings for corpus
  3. Index in vector database
  4. Implement query embedding
  5. Add hybrid search (keyword + semantic)
  6. Tune similarity thresholds
  1. 选择Embedding模型(sentence-transformers)
  2. 为语料库生成Embedding
  3. 在向量数据库中建立索引
  4. 实现查询Embedding
  5. 添加混合搜索(关键词+语义)
  6. 调整相似度阈值

Best Practices

最佳实践

  • Start with pretrained models, fine-tune as needed
  • Use domain-specific preprocessing
  • Evaluate with task-appropriate metrics
  • Consider inference latency for production
  • Implement proper text cleaning pipelines
  • Use batching for efficient inference
  • 从预训练模型开始,按需进行微调
  • 使用领域专属的预处理方法
  • 使用与任务匹配的评估指标
  • 考虑生产环境的推理延迟
  • 实现完善的文本清洗流水线
  • 使用批处理提升推理效率

Anti-Patterns

反模式

Anti-PatternProblemCorrect Approach
Training from scratchWastes data and computeFine-tune pretrained
No preprocessingNoisy inputs hurt performanceClean and normalize text
Wrong metricsMisleading evaluationTask-appropriate metrics
Ignoring class imbalanceBiased predictionsBalance or weight classes
Overfitting to eval setPoor generalizationProper train/val/test splits
反模式问题正确做法
从零开始训练模型浪费数据与计算资源微调预训练模型
不做预处理噪声输入影响性能清洗并标准化文本
使用错误指标评估结果有误导性使用与任务匹配的指标
忽略类别不平衡预测结果有偏差平衡类别或为类别加权
过拟合验证集泛化能力差合理划分训练/验证/测试集