Skip to content

AI & data

LLMs, OCR, NLP and data pipelines. 42 posts, newest first. All topics

  1. AI & dataImproving search results with a cross-encoder rerankerAdd a cross-encoder reranking step to embedding or BM25 retrieval with sentence-transformers, measure what it gains on real queries, and what it costs in latency.
  2. AI & dataMy esports betting tools: odds scrapers, LLM pickers and a live LoL win modelHow my esports betting repos work: a PlayNow odds scraper, LLM match pickers, and esports-odds-live, which prices live LoL games from op.gg data.
  3. AI & dataWhat Changed in Claude Code in 2026Claude Code's 2026 releases, from Opus 4.6 to Fable 5.2: agent teams, background sessions, workflows, plugins and skills, auto mode and new usage limits.
  4. AI & dataAI in Fall 2026: Gated Frontier Models, Computer Use and a Stateless MCPAnthropic, OpenAI and Google all shipped new model generations from September to November 2026. What changed, what got cheaper, and what it means for builders.
  5. AI & dataBuilding Afterlight, a 2D-HD JRPG, with Claude CodeOne long-running Claude Code session, eleven helper agents and a usage limit or two. How a three.js JRPG went from a one-paragraph prompt to a public repo overnight.
  6. AI & dataProcessing thousands of prompts with the Claude Message Batches APIWhen the Message Batches API fits, and a script that submits a batch with custom IDs, polls it, reads the results and resubmits errored or expired requests.
  7. AI & dataHandling LLM API rate limits: retries, backoff and concurrency capsTell 429s from 529s and 5xx errors, use the Anthropic SDK's built-in retries, add backoff with jitter, and cap concurrency and input tokens with asyncio.
  8. AI & dataSemantic search in Postgres with pgvectorStore embeddings in Postgres with pgvector: vector columns, distance operators, HNSW and IVFFlat indexes, and filtered queries that still return enough rows.
  9. AI & dataStreaming LLM responses to the browser with server-sent eventsRelay a streamed Claude response through a FastAPI endpoint as server-sent events, read it in the browser with fetch, and handle proxy buffering and cancellation.
  10. AI & dataRunning local LLMs with Ollama and calling them from PythonInstall Ollama, pull and run open models, call them over the REST API, the ollama Python package and the OpenAI-compatible endpoint, and size context and memory.
  11. AI & dataChunking documents for retrieval: fixed size, recursive splits and headingsFour ways to chunk documents for RAG, from fixed windows to heading-aware splits, plus a small recall test that shows which one works for your embedding model.
  12. AI & dataValidating DataFrames with Pandera schemasDeclare pandas DataFrame schemas as Pandera DataFrameModel classes: Field checks, custom checks, dtype coercion, lazy error reports and validation at pipeline boundaries.
  13. AI & dataCutting LLM costs with prompt caching in the Claude APIHow prefix caching works, where to put cache_control breakpoints, minimum lengths and TTLs, and how to read the cache usage fields to confirm you are getting hits.
  14. AI & dataBuilding an MCP server in Python with FastMCPWrite a Model Context Protocol server with the official Python SDK: tools, resources and prompts over stdio, tested with the Inspector and added to Claude Code.
  15. AI & dataA small eval runner for LLM features in PythonBuild a 160-line eval runner for an LLM feature: JSONL test cases, exact, regex and LLM-as-judge graders, concurrent runs and scores tracked per prompt version.
  16. AI & dataPolars for pandas users: expressions, lazy frames and group_byThe same DataFrame transformations in pandas and Polars side by side: pl.col expressions, with_columns, group_by().agg, window functions, lazy scan_csv and no index.
  17. AI & dataWriting a tool-use loop for the Claude API by handBuild the tool-calling loop for Claude yourself in Python: JSON Schema tools, the stop_reason loop, tool_result blocks, errors with is_error and a turn limit.
  18. AI & dataRevolutionizing Web Performance: Using Gemini 3.1-Pro-Preview for AI-Generated SVGsDiscover how to replace heavy JavaScript web animations with AI-generated SVGs using Gemini 3.1-Pro-Preview. A deep dive into the devcraft repository, Vite tooling, and best prompting techniques for scalable vector graphics.
  19. AI & dataRetrieval-augmented generation from scratch with SQLiteBuild RAG in about 130 lines of Python: chunk Markdown, embed it locally, store vectors in SQLite, search by cosine similarity and get cited answers from Claude.
  20. AI & dataQuerying CSV and Parquet files with DuckDBUse DuckDB's CLI and Python API to query CSV and Parquet files in place, read many files with globs, write partitioned Parquet, and run SQL on pandas DataFrames.
  21. AI & dataGetting reliable JSON from an LLM: schemas, structured outputs and validationThree ways to get JSON out of Claude in Python: prompting, a forced tool call and the structured outputs beta, with Pydantic validation, retries and stop reasons.
  22. AI & dataOutlier vs. Appen vs. Alignerr: why the newcomer wins for AI training work in 2025Pros and cons of three AI training gig platforms, how Meta's stake in Scale AI hit Outlier's workload, and why I rate Alignerr the best option in 2025.
  23. AI & dataHow I generate logos with AI: GPT-4 for descriptions, Bing Image Creator for imagesMy two-step process for logo ideas. I ask GPT-4 (on Poe) for written logo descriptions, then paste them into Bing Image Creator or DALL-E.
  24. AI & dataSeaborn basics: statistical plots from pandas DataFramesHow to make scatter, distribution, categorical and correlation plots with Seaborn 0.13, plus the figure-level vs axes-level split that trips people up.
  25. AI & dataPandas basics: create, select, filter, sort and group DataFramesPandas basics in Python: build DataFrames and Series, load a CSV, then select, filter, sort and group rows, with a note on Copy-on-Write and .loc.
  26. AI & dataSix ChatGPT prompts I use for code review, commit messages and blog draftsCopy-paste ChatGPT prompts for rewriting code to a style guide, writing tests, explaining code, writing commit messages and test notes, and drafting blog posts.
  27. AI & dataOn-device chat in the browser with Chrome's Prompt API and nluxWhy running an LLM on the user's device helps privacy, and how to build a React chat UI with nlux that streams replies from Gemini Nano in Chrome.
  28. AI & dataBuilding an Excel add-in that calls OpenAI and Alpha VantageScaffold an Excel task pane add-in with yo office, then make it ask OpenAI for a stock ticker and show the company overview from Alpha Vantage.
  29. AI & dataRunning OCRmyPDF in a containerized Azure FunctionPackage OCRmyPDF, Tesseract and Ghostscript into a custom Azure Functions container and expose an HTTP endpoint that OCRs an uploaded PDF and returns its text.
  30. AI & dataRunning machine learning models in the browser with WebAssemblyHow WebAssembly is used to run ML inference in the browser, with an ONNX Runtime Web example, the TensorFlow.js Wasm backend, and when WebGPU is the better fit.
  31. AI & dataBuilding a custom GPT for everyday coding choresHow I used OpenAI's custom GPTs to build one ChatGPT bot for small coding chores like type conversions, string tricks, Base64 and Mermaid diagrams.
  32. AI & dataLessons from scraping construction permits and bid sitesWhat I learned scraping permit reports, open data and bid-opportunity sites for YellowSheet, plus a small C# scraper at CSPS.
  33. AI & dataGenerating email templates with Claude CodeHow the YellowSheet free-demo email campaign was rebuilt as email-safe HTML with an AI coding agent, and what it took to ship it on a legacy PHP stack.
  34. AI & dataHow AI could change software development, and where it falls shortA May 2023 view of where AI could help across the software lifecycle (coding, requirements, testing, deployment) and why human engineers remain essential.
  35. AI & dataUpdating list of entries in reactRecently I had to update entries based on user input, will go over what I did
  36. AI & dataUpdating videos using the youtube apiHow to upload videos using the youtube api
  37. AI & dataHow to generate remotion videos using the whispers transcriptGenerating mp4 videos for youtube using transcription from whispers
  38. AI & dataHow to transcribe youtube videos using whispersHow to insert transcripts into videos using whispers
  39. AI & dataEvaluating whispers vs current alternativesEvaluating the new whispers asr text extraction vs current options like wit.ai
  40. AI & dataHow I applied nlp to various youtube videosApplying nlp
  41. AI & dataThoughts after trying to sell dall-e images on the internetAfterthoughts after to sell dall-e images on the internet.
  42. AI & dataThoughts after using dall-eMy thoughts after early testing dall-e

© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)