Embeddings & vector databases
AI-Native Systemsconcept · 6 मिनट · अपडेट 19 जुल॰ 2026

Embeddings & vector databases

लेखक Rajendra Sharma, RN, CPC, CPBसमीक्षक Rajendra Sharma, RN, CPC, CPB · 29 जून 2026

Turn text into coordinates in meaning-space, then search by closeness — the index that makes semantic search and RAG work.

In one line

An embedding model maps text (or images, audio) to a long vector of numbers such that similar meaning lands nearby — so "heart attack" and "myocardial infarction" become neighbours even though they share no words.

text embed vector[0.12, -0.4, …] vector DBnearest-neighbour
An embedding turns meaning into a vector; a vector database finds the nearest vectors — semantic search by similarity.

The idea: meaning as geometry

Keyword search fails the moment two phrases mean the same thing in different words — "heart attack" vs "myocardial infarction", "shortness of breath" vs "dyspnoea". An embedding model solves this by placing each piece of text at a point in a high-dimensional space (hundreds to thousands of numbers) arranged so that closeness = similar meaning. Synonyms cluster; unrelated concepts sit far apart. Search becomes geometry: find the nearest points.

How a vector database works

  • Index once — each chunk of content is embedded and stored as a vector.
  • Query — the question is embedded the same way; the database returns the nearest vectors by cosine or dot-product distance.
  • Approximate nearest neighbour (ANN) — exact comparison against millions of vectors is too slow, so indexes like HNSW (a navigable graph) find the closest matches in milliseconds, trading a sliver of accuracy for huge speed.

Storage is either a dedicated engine (Qdrant, Pinecone, Milvus, Weaviate) or an extension in the database you already runpgvector in Postgres, which is exactly what this platform uses: every Kosha entry carries an embedding column from day one, so semantic search and RAG need no separate system.

Things that trip people up

  • Embeddings aren't interchangeable — vectors from one model can't be compared with another's; re-embed everything if you switch models.
  • Chunk size shapes results — the unit you embed is the unit you retrieve.
  • Distance ≠ correctness — "nearest" can still be wrong; that's why RAG adds re-ranking and citations.
  • Domain matters — a general embedder may miss clinical nuance; biomedical models (and concept annotation) often do better on notes.

Where it shows up in digital health

  • Semantic search over clinical guidelines — "post-op fever workup" finds the right document even if it never uses those words.
  • Patient-similarity research — find comparable cases by vector proximity.
  • Terminology candidate matching in NLP pipelines (surface→concept).
  • The retrieval half of every RAG assistant, Vaidya included.

Key takeaways

  • Embeddings turn meaning into vectors; near means similar, regardless of wording.
  • A vector DB does fast approximate nearest-neighbour search (HNSW) — dedicated engine or pgvector in Postgres.
  • Embeddings are model-specific; chunking and domain fit drive quality.
  • They are the foundation under semantic search and RAG.

अपना स्मरण जाँचें

2 में से 0 याद

दोबारा पढ़ने से बेहतर है सक्रिय स्मरण — पहले उत्तर सोचें, फिर देखें।

  1. What does an embedding model do?

  2. Why use approximate nearest-neighbour (e.g. HNSW) in a vector database?

संदर्भ

  1. pgvector — vector similarity for Postgres

संबंधित entries