🗂️ Size a vector store for a RAG chatbot
Data & AIA company wants an AI assistant over its documents. Every chunk becomes a vector in memory. Choose chunk size, embedding size and precision so the index fits the server.
⭐ Level 1: Trainee0 XP · next level at 300
Chunks (vectors)19,53,125
Index memory33.5 GB
One-time embedding cost (illustrative)₹850
Smaller chunks find precise passages but make more vectors; quantisation cuts memory about 4× with little loss.
📘 How it works
Retrieval-augmented generation finds the most similar chunks by comparing vectors, so all of them usually sit in memory. Memory = vectors × dimensions × bytes. Quantising to int8 and choosing sensible chunk sizes are the main levers.
chunks = docs × pages × 500 ÷ chunk tokens · GB = chunks × dims × bytes × 1.5 ÷ 1024³A simplified textbook model for learning. Real designs follow the full codes and standards.