NexaRAG
A RAG question-answering system for 3C digital product support, built around an evidence chain from ingestion and hybrid retrieval to context assembly, answer verification, and evaluation.
NexaRAG: Bringing the RAG Evidence Chain into 3C Digital Product Support
NexaRAG is a RAG-based intelligent question-answering system I built around customer support for 3C digital products. The point of the project is not simply to connect a vector database and ask a large model. It is about turning the common ideas behind RAG into an actual engineering workflow: how knowledge enters the system, how evidence is recalled, how candidate passages become usable context, and how the system checks whether the model’s answer stays inside the evidence boundary.
I chose 3C digital product support because the scenario is concrete and exposes problems quickly. Users ask about product specifications, troubleshooting, purchase advice, and competitor comparisons. They also omit product names in multi-turn conversations. Questions such as “Why won’t these earbuds connect?”, “Which is better for video, Xiaomi 15 Pro or iPhone 16 Pro?”, and “How large is its battery?” require both accurate matching of models and parameters and an understanding of references and context in natural language.
Problem
A regular FAQ can answer standard questions, but it struggles with multi-turn follow-ups, product comparisons, and vague wording. Large models are fluent, but without reliable knowledge support they can invent parameters, confuse models, or force conflicting materials into one confident answer.
NexaRAG therefore has a clear goal: find evidence first, then organize the answer. When the evidence is insufficient, the system should not answer forcefully; it should clarify or refuse when needed. The focus is stability, traceability, and evaluability in customer-support Q&A.
Approach
The project is designed around a RAG evidence chain.
The first step is knowledge ingestion. The system supports importing 3C product materials into a knowledge base and performs structured chunking, metadata construction, document deduplication, version management, and index rebuilding during ingestion. Instead of splitting text only by fixed length, it preserves information such as headings, paragraphs, products, brands, and document types, so every chunk has an identity. Later, when filtering, ranking, and organizing evidence, the system knows which product a passage belongs to and what kind of question it can support.
The second step is hybrid retrieval. In 3C scenarios, model numbers, numeric values, brand names, and domain terms are everywhere, so pure vector search is not stable enough. The system combines BM25 keyword retrieval with pgvector semantic retrieval. BM25 handles exact matches for model numbers, specifications, and troubleshooting keywords, while vector retrieval handles semantically similar questions phrased in different ways. The two result sets are fused with RRF and then passed through reranking so the most relevant candidate passages move to the top.
The third step is evidence organization. Retrieval results should not be dumped directly into the prompt. The system organizes candidate passages by product, question type, relevance, and source, turning them into cleaner context. The model then sees material closer to quotable evidence rather than scattered text.
The fourth step is answer boundaries. RAG does not end when materials are handed to the model. NexaRAG checks whether key facts in the answer are supported by evidence, with special attention to high-risk information such as numbers, model names, prices, capacities, and warranty rules. When evidence is insufficient, product references are ambiguous, or sources conflict, the system triggers clarification, refusal, or conflict warnings so the model does not answer incorrectly with confidence.
The fifth step is evaluation. The project includes a Golden Set and Smoke Tests covering product specifications, comparisons, purchase suggestions, and troubleshooting. Evaluation looks beyond whether the answer sounds plausible. It checks whether retrieval hits the target evidence, whether citations are reasonable, whether the system refuses when it should, and whether the answer remains faithful to the evidence.
LangGraph / Agent Orchestration
For workflow organization, I referenced LangGraph and Agent node design and split a single Q&A request into modules such as intent recognition, query rewriting, tool-based retrieval, answer generation, and result verification.
This structure makes the system observable, replaceable, and iterative. When retrieval fails, I can inspect whether query rewriting completed the user’s question. When answers are unstable, I can check whether the issue comes from evidence organization or from an answer-verification strategy that is not strict enough. Compared with putting all logic into one long prompt, this decomposition is much easier to improve over time.
Highlights
- Uses structured chunking and metadata so knowledge passages carry product, source, and version information instead of being isolated blocks of text.
- Combines BM25, pgvector, RRF, and reranking to balance exact model matching with semantic recall.
- Organizes candidate passages into evidence context to reduce irrelevant material entering the prompt.
- Adds answer verification, refusal on insufficient evidence, and conflict warnings to reduce hallucination risk in product-parameter answers.
- Uses Golden Set and Smoke Tests for continuous evaluation, giving RAG improvements comparable metrics.
What I Learned
After building NexaRAG, my understanding of RAG shifted from a technology stack to evidence-chain engineering. A usable RAG system is not only embeddings, a vector database, and a large model. It also includes knowledge governance, retrieval strategy, context engineering, answer constraints, and evaluation.
For AI application development, the hard part is often not calling the model. It is getting the model into a reliable business workflow: when to retrieve, which evidence to trust, what to do when evidence is insufficient, and how to verify the answer after generation. NexaRAG is my complete practice around those questions.
Technical Keywords
Python, FastAPI, LangChain, LangGraph, DashScope Qwen, pgvector, BM25, RRF, rerank, RAG Evaluation, Golden Set, Smoke Test, answer verification, refusal strategy.