Structured-output enforcer: extract and validate JSON from messy LLM text.
Token-aware message truncation: fit a chat history into your model's context budget.
Network-egress firewall for agent tools: check URLs against a declarative policy.
Snapshot tests for AI tool-call traces: diff, validate, and catch silent regressions.
Validate tool-call args before execution. Returns LLM-friendly retry hints.
Inject, parse, and strip [N] citation markers in RAG outputs.
Reliable CSV parsing + generation. Handles quotes, embedded commas, BOMs, CRLF.
Character-precise unified diff + patch application + patch parsing.
Convert HTML to Markdown or strip to plain text. For web-scraping agents.
Run JMESPath queries against JSON. Pure JS, no native binary needed.
Parse JSON5 (comments, trailing commas, unquoted keys) and emit strict JSON.
Token-budget-aware text handling: count, truncate, and chunk for LLM prompts.
Diagnose RAG drift: interpret scores, recommend thresholds, explain dimensions.
RAG retrieval IR metrics: recall@k, hit@k, MRR, NDCG@k, evaluate_batch.
Trustworthy JS regex testing. Real offsets, named groups, safe against zero-width loops.
Safe shell argument escaping for bash, cmd.exe, and PowerShell.
Deterministic SQL formatting across 19 dialects (postgres, mysql, snowflake, bigquery, etc.).
Parse partial / truncated / messy JSON for LLM tool calls and structured outputs.
IANA timezone conversions with real DST rules.
Parse, format, and convert configs across TOML, YAML, and JSON.