cd /news/artificial-intelligence/day-7-dense-embedding-rag · home topics artificial-intelligence article
[ARTICLE · art-4395] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Day 7 - Dense Embedding - RAG

Dense embeddings represent text as continuous numeric vectors (e.g., [0.3455566, 0.6777779]) plotted in a latent space, while sparse embeddings mostly contain zeros and focus on word frequency rather than semantic meaning. Models for generating dense embeddings include LLMs and transformer encoders like Minilm and Nomic, available on platforms such as Hugging Face and Ollama. To evaluate a RAG system's performance, one compares the documents it returns for a user query against an expected set, similar to writing unit test cases for software.

read1 min views14 publishedMay 21, 2026

Dense embedding have continuous numeric values. i.e after decimal point values will be present. Chunk will be converted to embeddings, each embedding point will have number like [0.3455566 ,0.6777779, ...]. Generated vectors will be plotted in a space called latent space. Discrete values like 0 won't be present. Sparse embedding will mostly have values like 0. Rather than semantic meaning, it considers frequency or importance of words in a text. Ex: one hot encoding Models for Dense embedding

  1. LLM
  2. Transformers (encoder) Ex: Minilm, nomic transformers These models are available in hugging face, ollama.It also hosts other models as well. Generated vectors will How can we evaluate the performance of RAG system ? For a given user query, RAG system will return some set of matching documents. If the returned documents matches with our expectations, we can say it is yielding good results. Say, if our expectation from RAG is to return a, b, c, d, e documents for a user query and in reality it returns a, b, d docs alone. Out of 5, 3 is returned. It is meeting expectation to half right ? Like how we write unit test cases for a software code, we need to write test cases for user query for evaluating the RAG systems.
── more in #artificial-intelligence 4 stories · sorted by recency
── more on @minilm 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/day-7-dense-embeddin…] indexed:0 read:1min 2026-05-21 ·