agentleFS
mxslrmxslr/mlcraft/skills/domain-nlp-llm/SKILL.md

domain-nlp-llm

Skill8 starsChanged 4 months agoMITView on GitHub

Use for text / NLP / LLM tasks: text classification, sentiment, NER/token tagging, QA, summarization, translation, semantic search / embeddings, retrieval-augmented generation (RAG), chatbots/agents, and fine-tuning language models. Picks prompt vs fine-tune vs RAG, the right model, and rigorous text evaluation. Triggers on 'classify text', 'sentiment', 'NER', 'summarize', 'chatbot', 'RAG', 'embeddings', 'fine-tune LLM', 'question answering'.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    RAG: when the model lacks *knowledge* (private/updatable facts).

    line 23
  2. Distinctive:

    Fine-tune (LoRA): when you need a *behavior/format/style* the base model won't follow, or a cheap specialized classifier.

    line 24
  3. Distinctive:

    Robustness: check prompt sensitivity, class imbalance, and demographic/topic subgroups.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

NLP / LLM - Method Selection

First decide the cheapest approach that works: prompt, then RAG, then fine-tune, in that order of effort.

Decision table

Sub-taskRecommendedNotes
Text classification / sentimentFine-tune DeBERTa-v3 / RoBERTa (or a strong LLM few-shot if data is tiny)Encoder models are cheap, strong, and fast for fixed label sets.
NER / token taggingDeBERTa/RoBERTa token-classificationSpan-level F1; watch tokenizer alignment.
Semantic search / dedup / clusteringSentence-embeddings (e5 / BGE / GTE) + vector indexCosine similarity; evaluate with retrieval metrics.
Knowledge Q&A over your docsRAG (embed + retrieve + LLM answer)Prefer RAG over fine-tuning for factual/updatable knowledge.
Summarize / rewrite / extract / generateInstruction-tuned LLM (prompted)Start with prompting + few-shot; structured output via schema.
Domain adaptation of an LLMLoRA/QLoRA fine-tuneParameter-efficient; only after prompting/RAG proves insufficient.
Chatbot / tool-use agentLLM + tools/function-calling, RAG for groundingDefine tools crisply; add guardrails.

Choosing prompt vs RAG vs fine-tune

  • Prompt / few-shot: fastest; use when the base model can already do it with instructions.
  • RAG: when the model lacks knowledge (private/updatable facts). Fixes hallucination better than fine-tuning.
  • Fine-tune (LoRA): when you need a behavior/format/style the base model won't follow, or a cheap specialized classifier. Not for injecting facts.

Rigor

  • Split leakage: dedup near-duplicate texts; split by document/author/time, not random sentences. For RAG, keep eval questions out of the indexed corpus if testing generalization.
  • Metrics: classification uses F1/AUC (macro for imbalance); generation uses task metrics plus LLM-as-judge with a rubric plus human spot-checks; retrieval uses recall@k / nDCG; QA uses exact-match/F1 plus faithfulness/groundedness.
  • Robustness: check prompt sensitivity, class imbalance, and demographic/topic subgroups.
  • Improve: use accuracy-improvement-loop (better retriever, hard-negative mining, better chunking, ensemble/judge, fine-tune last).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.