{"slug": "how-to-add-ui-for-your-rag", "title": "How to add UI for your RAG?!?", "summary": "A developer built a FastAPI SSE backend that streams LLM responses token-by-token and encountered two production-only issues: nginx's default buffering broke streaming on Railway, fixed by disabling proxy_buffering, and an unhandled empty_retrieval event from the LLM API left the frontend stuck on a loading spinner, resolved by adding a handler.", "body_md": "Just built some FastAPI SSE backend streaming LLM responses token-by-token,\n\nafter i got some free time.\n\nTwo things broke in production that worked fine locally 🙃:\n\nnginx buffers SSE by default. The stream was delivering locally, dead\n\nsilent on Railway.`proxy_buffering`\n\noff, two hours later, fixed.The LLM API returns an\n\n`empty_retrieval`\n\nevent when no docs match. I wasn't\n\nhandling it, so the frontend sat on a loading spinner indefinitely. Added\n\nthe handler, resolved.", "url": "https://wpnews.pro/news/how-to-add-ui-for-your-rag", "canonical_source": "https://dev.to/coji831/how-to-add-ui-for-your-rag-51bl", "published_at": "2026-08-03 14:53:12+00:00", "updated_at": "2026-08-03 15:12:01.784817+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["FastAPI", "SSE", "nginx", "Railway", "LLM"], "alternates": {"html": "https://wpnews.pro/news/how-to-add-ui-for-your-rag", "markdown": "https://wpnews.pro/news/how-to-add-ui-for-your-rag.md", "text": "https://wpnews.pro/news/how-to-add-ui-for-your-rag.txt", "jsonld": "https://wpnews.pro/news/how-to-add-ui-for-your-rag.jsonld"}}