adjudication-sheets
Build human adjudication / hand-labeling sheets from LLM-pipeline data without evidence truncation. Use when: (1) preparing a…
Raise real concurrency in asyncio LLM batch scorers built on the OpenAI SDK (AsyncOpenAI, including OpenAI-compatible providers like DeepSeek). Use when: (1) raising an asyncio.Semaphore above ~100 produces no throughput gain, (2) a batch pipeline saturates near 100 in-flight
Claude Code
$ npx -y skills add kennethkhoocy/applied-micro-skills --skill asyncopenai-concurrency-httpx-pool --agent claude-code
Codex
$ npx skills add kennethkhoocy/applied-micro-skills --skill asyncopenai-concurrency-httpx-pool -a codex -y
Cursor
$ npx skills add kennethkhoocy/applied-micro-skills --skill asyncopenai-concurrency-httpx-pool -a cursor -y
Gemini CLI
$ npx skills add kennethkhoocy/applied-micro-skills --skill asyncopenai-concurrency-httpx-pool -a gemini-cli -y
GitHub Copilot
$ npx skills add kennethkhoocy/applied-micro-skills --skill asyncopenai-concurrency-httpx-pool -a github-copilot -y
OpenCode
$ npx skills add kennethkhoocy/applied-micro-skills --skill asyncopenai-concurrency-httpx-pool -a opencode -y
Windsurf
$ npx skills add kennethkhoocy/applied-micro-skills --skill asyncopenai-concurrency-httpx-pool -a windsurf -y
name: asyncopenai-concurrency-httpx-pool description: | Raise real concurrency in asyncio LLM batch scorers built on the OpenAI SDK (AsyncOpenAI, including OpenAI-compatible providers like DeepSeek). Use when: (1) raising an asyncio.Semaphore above ~100 produces no throughput gain, (2) a batch pipeline saturates near 100 in-flight requests despite a larger semaphore, (3) planning a high-concurrency campaign against a provider with no hard rate limit (DeepSeek v4-flash tolerates 2000+ in flight). Root cause: AsyncOpenAI's default httpx pool caps max_connections at 100, silently bottlenecking any larger semaphore — you must pass a custom http_client with httpx.Limits sized to the semaphore. author: Claude Code version: 1.0.0 date: 2026-07-17
Async batch scorers typically gate concurrency with `asyncio.Semaphore(N)`. Raising N above ~100 silently does nothing: the OpenAI SDK's default httpx transport caps the connection pool at `max_connections=100`, so excess tasks queue inside httpx instead of reaching the provider. The semaphore looks like the throttle but is not the binding constraint — there is no error, just a throughput ceiling.
shows the same throughput as N = 100
`http_client` argument (the default transport)
Size the httpx pool to the semaphore when constructing the client:
import httpx
from openai import AsyncOpenAI
CONCURRENCY = 2000
client = AsyncOpenAI(
api_key=..., base_url="https://api.deepseek.com",
http_client=httpx.AsyncClient(limits=httpx.Limits(
max_connections=CONCURRENCY,
max_keepalive_connections=CONCURRENCY)))
sem = asyncio.Semaphore(CONCURRENCY)Both edits are required; either alone caps the other. Keep the per-request retry loop — at high concurrency transient failures are more likely, and the retry envelope is what turns them into non-events.
Throughput scales with N. Verified 2026-07-17 on DeepSeek v4-flash (deepseek-chat, JSON-mode unit scoring, ~1.5k-token prompts): at semaphore 50 a cold 13.8k-request chunk took ~70 min; at semaphore 2000 + matched pool, a 14.4k-request chunk took ~11 min (~40 req/s sustained, ~250/s burst on a 1.7k-request tail chunk), 0 failed requests, 0 schema-invalid responses. Effective speedup ~7x rather than 40x — server-side queuing absorbs the rest — but with zero reliability cost.
Specialist Directors US T1 campaign: final 8 chunks (100,243 calls) completed in ~55 minutes for $8.08 after the fix, versus a projected ~9 hours at the old setting. The edit is two lines in the scorer; the semaphore constant alone would have been a silent no-op.
the practical ceiling reported is ~2500. Other providers enforce RPM/TPM caps — check before sizing.
tuning; no ulimit-style adjustment needed.
scale (two-night legs -> one-shot), re-audit the launch glue's hardcoded limits — a wrapper `MAX-HOURS=10` safety cap sized for the old plan hard-killed a healthy runner at 97/108 chunks. Caps and budgets in supervisor scripts must be revisited whenever expected duration changes.
(temperature 0, independent requests), so raising it mid-campaign does not create a scoring seam — unlike model/prompt changes, which do (see [llm-campaign-drift-gate]).
Claude Code and Codex skills for empirical applied-microeconomics research: reproducibility auditing, LLM-assisted classification methods, event studies, data infrastructure (WRDS, Stata, pyfixest), and publication-grade tables, figures, and documents.
Build human adjudication / hand-labeling sheets from LLM-pipeline data without evidence truncation. Use when: (1) preparing a…
N-round adversarial review pipeline for empirical research output — the chain from data to LaTeX tables to a manuscript that…
Before designing, training, or auditing ANY model that replicates human-annotated labels, audit the annotation protocol's INPUT —…
Place pre-screened literature citations into a LaTeX or Word manuscript, or restyle the citations already in one. Three modes:…
Download the actual PDF binary from bot-gated sites (taxpolicycenter.org, urban.org, SSRN-hosted mirrors, think-tank/publisher…
Complete methodology for computing publication-quality cumulative abnormal returns with proper event-study test statistics,…
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…