Optimizing the RAG Pipeline: From Chunking and Recall to Reranking and Generation Accuracy
The most common predicament after a RAG system launches: the knowledge base contains a perfectly correct answer, yet the bot still answers wrongly. Should you change chunking? Swap the embedding model? Tune the prompt? Blame the LLM? If you cannot say which link failed, optimization is just gambling.
This post is part of an experience-sharing series for AI customer service product managers and developers, drawn from hands-on practice as an intelligent service product manager at a large general e-commerce platform. In this post I want to share how to design the RAG system — optimizing chunking, recall, reranking, and answer generation — when the bot must simultaneously use the product knowledge base, platform rule base, and real-time order data, and how to solve the two classic failure modes of "retrieval is right but the answer is wrong" and "knowledge is right but business state is stale".
The value of this design is that it decomposes RAG from "we plugged in a vector database" into an attributable, stage-by-stage optimizable engineering pipeline.
