@akshay_pachaar: A good technical LLM interview question: Your RAG chatbot is working as expected locally. You deploy it behind a load b…
Summary
This tweet poses a technical interview question about deploying RAG chatbots at scale, explaining common pitfalls like state persistence and pointing to Akamai's GitHub repos and Developer Hub for reference implementations.
View Cached Full Text
Cached at: 09/02/26, 02:01 PM
A good technical LLM interview question:
Your RAG chatbot is working as expected locally.
You deploy it behind a load balancer with 3 replicas.
Users report that it forgets what they just asked, and answers get worse with each restart.
Why did this happen?
(answer below)
A local setup has one process that owns everything.
- The vector index is a variable in memory.
- Conversation history is a Python list.
- The documents are on local disk.
You never treat any of them as infrastructure, because restarting rebuilds all three in seconds and there is only ever one copy.
The setup does not carry over to production directly.
The vector index might disappear on restart, so the app re-embeds everything on boot and serves empty results until it finishes.
Conversation history may belong to one replica, so a follow-up routed elsewhere has no memory of the previous turn.
Documents could be on whichever container ingested them, so the three replicas hold three different corpora.
None of this is evident with one user and one process.
So the actual work in shipping RAG is not just the retrieval logic, but also storing the vector index, the conversation history, and the documents outside the app, where every replica reads and writes the same copy.
Which comes down to three requirements:
The vector store needs persistence and has to be reachable from every replica. pgvector inside Postgres keeps embeddings next to the rest of the data instead of adding another system to operate.
Conversation state has to be checkpointed outside the app. LangGraph writes its state to Postgres, so any replica can pick up a thread mid-conversation.
Docs need shared object storage, so ingestion happens once instead of once per replica.
If you get those three right, the retrieval logic you wrote in the notebook works unchanged.
To learn how all of it is wired together, Akamai’s GitHub has a working reference implementation.
-
rag-langgraph-k8s-quickstart is an airline policy Q&A assistant built with FastAPI, LangChain, and LangGraph. Terraform provisions the LKE cluster, a Postgres instance with pgvector for embeddings, a second Postgres for LangGraph checkpointing, and an object storage bucket for the policy documents, in one apply.
-
akamai-workshop-ai-inference covers the next step, running the model yourself instead of calling an API, with prefill and decode, KV cache tradeoffs, and continuous batching under real concurrency.
Both are available on Akamai’s new Developer Hub, alongside their tutorials and code samples.
It also links to Edge Case, their Discord, where four developer advocates architect and deploy a production app live every other Wednesday.
If you create a new Akamai Cloud account, you can also get $300 in credits for joining.
Join here: https://fandf.co/4hPMwFx
That said, this post assumes the retrieval logic was right to begin with, and that is doing a lot of work. Most RAG systems fail earlier, at the point where a chunk gets treated as a self-contained unit of meaning.
I wrote about the two skills that fix that gap, and why the chunk is usually the wrong thing to embed.
Read it below.
Thanks to Akamai Cloud for partnering today!
Similar Articles
Built a production RAG chatbot with custom MCP servers as the action layer, sharing what I learned
A full-stack engineer shares learnings from building a production RAG chatbot with custom MCP servers as an action layer, enabling natural language triggers for live workflows.
@amitiitbhu: AI Engineering Interview Questions and Answers - LLM Fundamentals - Prompt Engineering - Retrieval-Augmented Generation…
Amit Shekhar published a comprehensive open-source repository of AI engineering interview questions and answers, covering LLM fundamentals, prompt engineering, RAG, AI agents, fine-tuning, vector databases, LLMOps, and more.
@_avichawla: A tricky LLM interview question: Your agent runs everything on a frontier LLM, so you add a routing layer that sends se…
Explains why model routing in agent tasks may not save costs due to cache warmup, and describes a production solution with model affinity and the open-source proxy Plano to achieve actual savings.
@akshay_pachaar: https://x.com/akshay_pachaar/status/2070860837448040832
Google's Agents CLI provides a unified tool for scaffolding, evaluating, and deploying AI agents, addressing the fragmented workflow in agentic engineering. The article walks through building a RAG agent using the CLI, showcasing its integration with coding agents and ADK patterns.
@shrav_10: Interviewed another candidate today. I asked him what RAG is. He replied: RAG is a technique that allows an LLM to answ…
A hiring manager shares a candidate's correct definitions of RAG and fine-tuning, then asks followers to explain when to use one over the other.