llm-text-analysis

Convert social-science text into structured coded variables with validation.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Yuuqq/claude-social-science-skills --skill llm-text-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-text-analysis
Source: https://github.com/Yuuqq/claude-social-science-skills/tree/main/social-science-skills/llm-text-analysis
Command: npx skills add https://github.com/Yuuqq/claude-social-science-skills --skill llm-text-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scipy, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill solves the problem of turning unstructured social-science text into reliable, structured annotations without silently propagating model errors, instability, or bias.

Core Features & Use Cases

  • Prompt and codebook design: Produce structured, category-aligned prompts for social-science coding tasks.
  • Validation and nondeterminism management: Run multiple LLM passes, aggregate results, and assess agreement using metrics like Cohen’s κ and F1.
  • Robust output handling: Parse and recover from format drift (e.g., invalid JSON) with defensive strategies and failure-rate reporting.
  • Model selection guidance: Choose models based on reproducibility, cost, task complexity, and stability requirements.
  • Ethical and reporting standards: Document model/version, prompts, parameters, validation protocol, bias checks, and limitations.

Quick Start

Use the llm-text-analysis skill to annotate a set of social-science texts by specifying a codebook, running multiple annotation passes, and validating LLM labels against a human-coded subset.

Frequently Asked Questions about llm-text-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate LLM annotations for social-science text coding?

You can handle invalid JSON from LLM outputs during text annotation by applying robust parsing and defensive recovery strategies, while tracking failure rates to maintain transparent reporting of your structured coding results.

How do I design a codebook for zero-shot text annotation with LLMs?

Designing a codebook for zero-shot text annotation involves creating structured, category-aligned prompts within a YAML-defined workflow, ensuring the LLM produces structured coded variables that match your social-science research schema.

Can I use pandas and numpy to manage social-science text coding variables?

Yes, you can use pandas and numpy to manage social-science text coding variables by structuring the parsed LLM outputs into dataframes, aggregating multiple annotation runs, and computing statistical agreement metrics for validation.

What is the best way to select an LLM model for reproducible text annotation?

The best way to select an LLM model for reproducible text annotation is to evaluate models based on reproducibility, cost, task complexity, and stability requirements, documenting the model version and validation protocol transparently.

Why do my LLM text annotations produce different results across multiple runs?

LLM text annotations produce different results across multiple runs due to nondeterminism; you must run multiple annotation passes, aggregate the outputs, and calculate agreement metrics like Cohen’s κ to ensure reliability.

What are the limitations of using prompt engineering for social-science bias checking?

Limitations of using prompt engineering for social-science bias checking include format drift, model instability, and silent error propagation, which require defensive parsing, bias checks, and transparent reporting of limitations to mitigate.