85. Embeddings and Vector Search: Memory for Language Models
Language models lack memory and can only use knowledge from their pretraining, limiting their ability to answer questions about new or specific information. Vector search addresses this by retrieving relevant documents through semantic similarity using embeddings. By integrating retrieved documents as context, models can respond accurately to queries about up-to-date or private data.
- ▪Language models cannot access information outside their pretraining data.
- ▪Embeddings convert text into dense vectors where semantic similarity is reflected as vector proximity.
- ▪Vector databases enable fast retrieval of relevant documents by similarity search at query time.
- ▪The retrieved documents are used as context to ground the language model’s responses in specific, current knowledge.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 1358056) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Akhilesh Posted on May 16 85. Embeddings and Vector Search: Memory for Language Models #ai #python #beginners #productivity A language model has no memory. You ask it a question. It generates an answer from its pretrained weights. Those weights encode general knowledge learned from training data that was frozen months ago. Your company's internal documentation? Not in there. Yesterday's news? Not in there. The specific customer complaint from last Tuesday? Definitely not in there.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).