Blank cards passing through a wooden ranking staircase toward a reader

LLM Recommendation Systems: Retrieval, Ranking, RAG, and Evaluation

Recommendation systems create a tempting illusion: the newer the model, the more advanced the system. Anyone who has operated one knows that the model is only the part above water. Below it sit exposure bias, latency budgets, feature freshness, inventory constraints, exploration risk, and counterfactual evaluation. Large language models add a useful semantic layer, but they do not make those older problems disappear. They also introduce new ones: higher cost, variable output, and explanations that can sound persuasive without reflecting the reasons an item was ranked. ...

April 23, 2025 · 18 min · 3653 words · Xinwei Xiong, Me
A research notebook connecting source pages, citations, and synthesized outputs

Gemini Notebook (Formerly NotebookLM): A Source-Grounded Research Workflow

On July 16, 2026, Google renamed NotebookLM to Gemini Notebook. The old name will remain in search results, screenshots, and habits for a while, but the product did not disappear. Google describes it as the same standalone research tool, now connected more closely to the Gemini app and, eventually, Google Search. The rename also marks a larger change: notebooks are becoming places where software can not only read sources, but also run analysis against them. ...

April 21, 2025 · 18 min · 3787 words · Xinwei Xiong, Me
A red, green, and blue testing loop surrounding an AI system

Test-Driven Development for AI and LLM Applications: A Practical 2026 Guide

Test-driven development is easy to explain when the function under test adds two numbers. Write a failing test, make it pass, then improve the implementation without changing its behavior. The difficulty begins when the function calls a language model and five different answers may all be acceptable. That does not make TDD obsolete. It means the word test has to become more precise. For an AI application, I use TDD as a discipline for discovering contracts. Some contracts are exact: a parser must reject malformed JSON, an authorization check must not leak another tenant’s data, and a tool call must match its schema. Other contracts are statistical: a support assistant should resolve most routine cases, cite the supplied policy, and rarely invent a refund rule. The first group belongs in ordinary tests. The second belongs in evaluations and monitoring. ...

April 21, 2025 · 16 min · 3402 words · Xinwei Xiong, Me
Documents flowing through a measured conversion pipeline into structured Markdown

Microsoft MarkItDown 0.1.6: A Practical Document-to-Markdown Guide

A document converter is a bridge, not a source of truth. The important question is not whether the output looks clean at first glance, but whether the bridge preserves the evidence your next system needs. MarkItDown is easy to demonstrate: install a package, pass it a file, receive Markdown. The difficult work begins one minute later. A PDF may contain selectable text, scanned pages, diagrams, tables, or all four. A slide deck may hide essential numbers inside screenshots. A spreadsheet may be understandable only through formulas, merged cells, and spatial relationships. No single conversion mode handles every case equally well. ...

April 21, 2025 · 15 min · 3073 words · Xinwei Xiong, Me
A checkpointed LangGraph StateGraph with recovery paths

LangGraph Architecture in 2026: StateGraph, Persistence, and Recovery

This project is an ongoing journey — learning AI open source projects with steady, daily progress. Through hands-on work with real projects and AI tooling, the goal is to develop the ability to solve complex problems and document the process. Notion List Basic Information: Project Name: LangGraph GitHub URL: langchain-ai/langgraph Main Tech Stack: Python, JavaScript/TypeScript, LangChain, LangSmith, checkpoint stores, LLM providers 1. What LangGraph Actually Solves LangGraph is the low-level orchestration framework and runtime in the LangChain ecosystem. It is useful when an agent must retain typed state, branch or loop, pause for a person, survive a process failure, or expose each transition to tracing and tests. You can use LangGraph without using LangChain’s model abstractions. ...

April 19, 2025 · 7 min · 1348 words · Xinwei Xiong, Me
A restrained editorial illustration of connected paths representing models, agents, and graph workflows

LangChain 1.x in Production: Choosing Models, Agents, and LangGraph

LangChain used to be introduced as a box of chains, memory classes, prompt templates, loaders, and integrations. That description is historically accurate and operationally unhelpful. As of July 2026, the useful way to understand LangChain 1.x is much narrower: Call a model directly when the task is one inference with a clear input and output. Use create_agent when a model must choose among tools in a conventional model–tool loop. Use LangGraph when your application has durable state, explicit branches, retries, parallel work, long-running steps, or human decisions that are part of the workflow. This is not merely a taxonomy. It is an engineering rule about where complexity should live. Every framework abstraction creates a second system beside your product: another execution model, another vocabulary, and another place for failure to hide. The abstraction earns its place only when it makes the real system easier to operate. ...

April 16, 2025 · 15 min · 3178 words · Xinwei Xiong, Me
Several model pipelines converge at an AI Gateway where cost and governance are weighed

AI Gateway Guide: LiteLLM, Kong, APISIX, Cloudflare, or Portkey?

An AI Gateway is not merely a reverse proxy placed in front of a language model. Once an application reaches production, every model call carries several kinds of uncertainty at once: long-lived streaming connections, token-based billing, provider quotas, sensitive inputs, changing model behavior, and outputs that cannot be trusted by default. A conventional API gateway can handle part of this traffic. It may authenticate clients, terminate TLS, enforce request limits, and route HTTP requests. It does not automatically answer the questions that matter most to an AI product: ...

April 16, 2025 · 16 min · 3223 words · Xinwei Xiong, Me
LangChain 1.x architecture connecting models, agents, memory, retrieval, and observability

LangChain 1.x in Practice: A Developer Guide to Reliable Agents

A framework is most dangerous not when it lacks features, but when its old tutorials still look plausible. Familiar code can cross a version boundary long before it produces an obvious error. This guide follows the current LangChain Python 1.x path: model calls, agents, tools, structured output, middleware, memory, RAG, SQL, Ollama, and LangSmith. It is deliberately different from a framework overview. The aim is to leave you with a compact application architecture, runnable examples, and a way to recognize code that belongs to the 0.x era. ...

May 22, 2024 · 11 min · 2221 words · Xinwei Xiong, Me
From Language Models to RAG: Capabilities, Limits, and Engineering

From Language Models to RAG: Capabilities, Limits, and Engineering

Introduction: Do Not Learn the Model from the Chat Window The first encounter with a large language model creates a powerful illusion. Something on the other side of the screen appears to have read widely, reasoned carefully, and chosen to explain itself. It can write code, summarize papers, preserve a tone across a conversation, and offer a polished rationale for an answer that is completely wrong. The chat window shows behavior, not mechanism. Fluency hides missing evidence. Completeness hides uncertainty. A human voice invites us to overestimate how firmly the model is connected to the world. ...

May 15, 2024 · 20 min · 4118 words · Xinwei Xiong, Me
From 2024 AI field notes to a reliable production RAG system

2024 AI Field Notes, Reassessed: From Emergence to Production RAG

This article began as notes from a large-language-model meetup in January 2024. Back then, the question was what a model could do. Two years later, the harder question is why anyone should trust the system around it. I have not polished the old notes into a story in which every early judgment was right. Mistakes are useful sediment. They remind us that a technical opinion is not a prophecy; it is a bet with an expiry date. Each section therefore keeps the 2024 observation and adds a 2026 reassessment: still true, changed, or wrong at the time. ...

January 14, 2024 · 11 min · 2234 words · Xinwei Xiong, Me
A clockwork cart passing through controlled gates, representing the evolution from AutoGPT Classic to a governed agent platform

AutoGPT in 2026: From the Classic Experiment to the Platform

Status note, verified July 31, 2026: this article originally explained how to install the 2023 stand-alone Auto-GPT agent. Those commands are obsolete. The official project now says that AutoGPT Classic is unsupported, its dependencies will not be updated, and it has known security issues. Treat Classic as a historical laboratory, not a production tool. For new work, use the maintained AutoGPT Platform or another actively maintained workflow system. In the spring of 2023, Auto-GPT made a compelling promise: describe an objective, give a model some tools, and watch it plan its own way forward. I installed it because the idea felt less like a chatbot feature and more like a change in the shape of software. ...

March 18, 2023 · 10 min · 2100 words · Xinwei Xiong, Me