Precision Lives in the Second Stage: Reranking a Personal Knowledge Search with Claude
Embedding search alone leaves 'semantically close but not the answer' passages at the top. This is a two-stage design that gathers candidates broadly, then lets Claude reorder them by answerability, with structured scoring, abstention, and a cost estimate.
Generating localized App Store listing metadata within character limits using the Claude API
Raw translations overflow App Store Connect's character limits. Generate per-locale listing metadata within them using Claude API structured output and a repair loop.
Bulletproof JSON Output with Claude API Prefill: A Four-Layer Defense Pattern from Indie SaaS
How I went from late-night JSON parse failures to a 100% parse success rate across thousands of monthly Claude API requests. Working code in TypeScript and Python, plus production numbers from an indie SaaS.
Building a Production-Grade Contract Review System with the Claude API — Risk Detection, Version Diffing, and Remediation Suggestions
A complete production guide for automating contract review with the Claude API: PDF parsing, risk clause detection, structured JSON output, version diffing, and remediation suggestions.
Claude API JSON Output Fails: 5 Root Causes and Fixes
Fix Claude API JSON parsing errors with these 5 common root causes: markdown code block wrapping, truncated output, injected commentary, Unicode escaping, and streaming parse failures. Includes copy-paste ready Python utility code.