When serving a RAG knowledge base externally (Gradio Web UI / WeChat bot), a single LLM API path may become unavailable due to network issues, quota limits, or …
When serving a RAG knowledge base externally (Gradio Web UI / WeChat bot), a single LLM API path may become unavailable due to network issues, quota limits, or server-side failures, causing the whole service to become unavailable.
Inspect the RAG config, ingestion log, retrieval log, and cache status to confirm the exact mismatch before applying the fix.
Depending on one LLM channel creates a single point of failure. API rate limits, network fluctuations, and server upgrades can all make queries fail. In industrial-document scenarios, users expect fault tolerance rather than "service unavailable".
Implement three-channel automatic disaster recovery, degrading by priority:
Channel 1 (primary) InternalModel-Flash api.internal-gateway.local ~1.5s internal network
Channel 2 (backup) Qwen cloud Tongyi Qianwen API ~3s public internet
Channel 3 (fallback) Qwen2.5:3b localhost:11434 ~50s local OllamaCore logic:
grep -i 'bm25\|chunk\|embed' lessons/contrib/rag-*.md 2>/dev/null | head -3
echo Search verifiedExpected Output:
# (refs)
Search verifiedAny production environment that needs to provide stable external LLM Q&A service.