<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ValeryKot</title>
    <description>The latest articles on DEV Community by ValeryKot (@valerykot).</description>
    <link>https://dev.to/valerykot</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1041183%2Fba74d7ae-ff6d-458e-bf4d-7584d319211c.jpeg</url>
      <title>DEV Community: ValeryKot</title>
      <link>https://dev.to/valerykot</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/valerykot"/>
    <language>en</language>
    <item>
      <title>We Back Up Files. We Rarely Back Up Why They Exist.</title>
      <dc:creator>ValeryKot</dc:creator>
      <pubDate>Tue, 28 Jul 2026 16:32:33 +0000</pubDate>
      <link>https://dev.to/valerykot/we-back-up-files-we-rarely-back-up-why-they-exist-20cg</link>
      <guid>https://dev.to/valerykot/we-back-up-files-we-rarely-back-up-why-they-exist-20cg</guid>
      <description>&lt;p&gt;&lt;em&gt;Everything survived. Except the explanation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;A while ago I was trying to understand why one of our services used Redis.&lt;/p&gt;

&lt;p&gt;Finding the artifacts wasn't difficult.&lt;/p&gt;

&lt;p&gt;There was a Jira ticket.&lt;/p&gt;

&lt;p&gt;A pull request.&lt;/p&gt;

&lt;p&gt;An architecture document.&lt;/p&gt;

&lt;p&gt;A Slack discussion.&lt;/p&gt;

&lt;p&gt;A commit.&lt;/p&gt;

&lt;p&gt;Nothing had been deleted.&lt;/p&gt;

&lt;p&gt;Everything was searchable.&lt;/p&gt;

&lt;p&gt;And yet I still couldn't answer a simple question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Redis?&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Every file answered a different question
&lt;/h2&gt;

&lt;p&gt;The Jira ticket answered:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What changed?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The pull request answered:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How was it implemented?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The architecture document answered:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where does it fit?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Slack thread answered:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who was involved?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The commit answered:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When did it happen?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But none of them answered the question I actually had.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The answer wasn't missing
&lt;/h2&gt;

&lt;p&gt;It just wasn't stored in one place.&lt;/p&gt;

&lt;p&gt;Part of it lived in a security review.&lt;/p&gt;

&lt;p&gt;Part in a design discussion.&lt;/p&gt;

&lt;p&gt;Part in a Slack thread.&lt;/p&gt;

&lt;p&gt;Part in the implementation.&lt;/p&gt;

&lt;p&gt;Individually, every document made sense.&lt;/p&gt;

&lt;p&gt;Collectively, they explained the decision.&lt;/p&gt;

&lt;p&gt;The answer wasn't inside any single document.&lt;/p&gt;

&lt;p&gt;It emerged from the relationships between documents.&lt;/p&gt;




&lt;h2&gt;
  
  
  That's when something started bothering me
&lt;/h2&gt;

&lt;p&gt;We spend enormous effort preserving documents.&lt;/p&gt;

&lt;p&gt;Git preserves commits.&lt;/p&gt;

&lt;p&gt;Confluence preserves pages.&lt;/p&gt;

&lt;p&gt;Jira preserves tickets.&lt;/p&gt;

&lt;p&gt;Slack preserves messages.&lt;/p&gt;

&lt;p&gt;Backups preserve all of them.&lt;/p&gt;

&lt;p&gt;But none of these systems preserve the fact that one artifact exists because of another.&lt;/p&gt;

&lt;p&gt;That relationship usually lives only in people's heads.&lt;/p&gt;

&lt;p&gt;Once those people leave, every document survives.&lt;/p&gt;

&lt;p&gt;The explanation doesn't.&lt;/p&gt;




&lt;h2&gt;
  
  
  I realized I had been asking the wrong question
&lt;/h2&gt;

&lt;p&gt;I used to ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Did we document this?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now I ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If someone finds this document a year from now, will they know what other documents they need to understand it?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Those are different questions.&lt;/p&gt;

&lt;p&gt;The first is about documentation.&lt;/p&gt;

&lt;p&gt;The second is about memory.&lt;/p&gt;




&lt;h2&gt;
  
  
  Documents aren't the whole memory
&lt;/h2&gt;

&lt;p&gt;A document can survive forever.&lt;/p&gt;

&lt;p&gt;That doesn't mean its meaning survives.&lt;/p&gt;

&lt;p&gt;Meaning is often distributed across decisions, conversations, reviews, commits, and documentation.&lt;/p&gt;

&lt;p&gt;I know how to preserve each of those individually.&lt;/p&gt;

&lt;p&gt;I'm no longer convinced that's enough.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Documents preserve what happened.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relationships preserve why it happened.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Next time: why I eventually stopped thinking of documents as the primary thing to index — and started thinking about decisions instead.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>discuss</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>I Was Optimizing Ranking While the Real Problem Was Selection</title>
      <dc:creator>ValeryKot</dc:creator>
      <pubDate>Fri, 24 Jul 2026 08:00:08 +0000</pubDate>
      <link>https://dev.to/valerykot/i-was-optimizing-ranking-while-the-real-problem-was-selection-3p0k</link>
      <guid>https://dev.to/valerykot/i-was-optimizing-ranking-while-the-real-problem-was-selection-3p0k</guid>
      <description>&lt;p&gt;&lt;em&gt;I mistook movement for improvement.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;For three months, I changed our ranking algorithm every two weeks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;BM25.&lt;/li&gt;
&lt;li&gt;Hybrid BM25 + vector search.&lt;/li&gt;
&lt;li&gt;A cross-encoder reranker.&lt;/li&gt;
&lt;li&gt;A different embedding model.&lt;/li&gt;
&lt;li&gt;Yet another embedding model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every change moved a few documents up or down the list.&lt;/p&gt;

&lt;p&gt;None of them made the answers better.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Same Wrong Answer, Wearing a Different Tie
&lt;/h2&gt;

&lt;p&gt;The user asked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Why does the gateway reject service X?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With BM25, the top result was a glossary page defining &lt;em&gt;gateway&lt;/em&gt;. Relevant by keyword. Useless by intent.&lt;/p&gt;

&lt;p&gt;With hybrid retrieval, the glossary page dropped to third. A Jira ticket mentioning service X moved to second. It described the symptom, not the cause.&lt;/p&gt;

&lt;p&gt;With a cross-encoder reranker, the Jira ticket became the top result. The glossary page fell to fourth. The architecture document that actually explained the exception remained at seventh.&lt;/p&gt;

&lt;p&gt;With a different embedding model, that architecture document finally moved to fifth.&lt;/p&gt;

&lt;p&gt;I remember thinking we'd finally made progress.&lt;/p&gt;

&lt;p&gt;We hadn't.&lt;/p&gt;

&lt;p&gt;Every new algorithm felt like progress because &lt;strong&gt;something moved&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The problem was that &lt;strong&gt;nothing important moved&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Document That Mattered Never Became a Candidate
&lt;/h2&gt;

&lt;p&gt;The architecture document existed.&lt;/p&gt;

&lt;p&gt;I knew it existed.&lt;/p&gt;

&lt;p&gt;I had even written part of it.&lt;/p&gt;

&lt;p&gt;It never appeared in the top results.&lt;/p&gt;

&lt;p&gt;Not because it was ranked poorly.&lt;/p&gt;

&lt;p&gt;Because it was never selected.&lt;/p&gt;

&lt;p&gt;The ranking algorithm could only sort the candidates it received.&lt;/p&gt;

&lt;p&gt;The document that actually explained the answer never entered that candidate set.&lt;/p&gt;

&lt;p&gt;No ranking algorithm can promote a document that was excluded before ranking even began.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Moment It Clicked
&lt;/h2&gt;

&lt;p&gt;I had five search results on my screen.&lt;/p&gt;

&lt;p&gt;BM25 returned them in one order.&lt;/p&gt;

&lt;p&gt;The cross-encoder returned them in another.&lt;/p&gt;

&lt;p&gt;A different embedding model shuffled them again.&lt;/p&gt;

&lt;p&gt;They were still the same documents.&lt;/p&gt;

&lt;p&gt;Not one of them answered the question.&lt;/p&gt;

&lt;p&gt;Only then did I ask myself:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why am I ranking these documents at all?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Question That Changed Everything
&lt;/h2&gt;

&lt;p&gt;I stopped asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;How do I rank these documents better?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I started asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why are these documents candidates in the first place?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That question led me backward.&lt;/p&gt;

&lt;p&gt;Not to another ranking algorithm.&lt;/p&gt;

&lt;p&gt;But to every previous question I had been trying to answer.&lt;/p&gt;

&lt;p&gt;Why didn't a larger context window help?&lt;/p&gt;

&lt;p&gt;Why did chunking make retrieval worse?&lt;/p&gt;

&lt;p&gt;Why did search keep finding documents but miss the explanation?&lt;/p&gt;

&lt;p&gt;I realized those weren't separate problems.&lt;/p&gt;

&lt;p&gt;They were different symptoms of the same one.&lt;/p&gt;

&lt;p&gt;I had been optimizing the last step of retrieval while the earlier ones were quietly determining the outcome.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Hierarchy of Retrieval
&lt;/h2&gt;

&lt;p&gt;I now think about retrieval as three different layers.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Selection&lt;/strong&gt; — What becomes a candidate at all?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Assembly&lt;/strong&gt; — How is information preserved, structured, and connected?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ranking&lt;/strong&gt; — In what order should the candidates appear?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For months, I focused almost entirely on the third layer.&lt;/p&gt;

&lt;p&gt;The first layer was already deciding whether the answer had any chance of being found.&lt;/p&gt;

&lt;p&gt;Perfect ranking can only reorder what has already been selected.&lt;/p&gt;

&lt;p&gt;It cannot retrieve what never became a candidate.&lt;/p&gt;




&lt;p&gt;I kept polishing the order of documents that should never have been candidates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I had mistaken ranking for retrieval.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;In the next post, I'll look at a different question: why organizations rarely lose information—they lose the connections that once made that information meaningful.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>machinelearning</category>
      <category>software</category>
    </item>
    <item>
      <title>Why Organizations Forget Even When Nothing Is Deleted</title>
      <dc:creator>ValeryKot</dc:creator>
      <pubDate>Tue, 21 Jul 2026 22:34:58 +0000</pubDate>
      <link>https://dev.to/valerykot/why-organizations-forget-even-when-nothing-is-deleted-3jk3</link>
      <guid>https://dev.to/valerykot/why-organizations-forget-even-when-nothing-is-deleted-3jk3</guid>
      <description>&lt;p&gt;&lt;em&gt;The file survived. The explanation didn't.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;A few months ago I needed to understand why one of our services was using Redis.&lt;/p&gt;

&lt;p&gt;The engineer who made that decision had already left the company.&lt;/p&gt;

&lt;p&gt;Finding the implementation wasn't difficult.&lt;/p&gt;

&lt;p&gt;I found the Jira ticket.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Implement Redis cache.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I found the pull request.&lt;/p&gt;

&lt;p&gt;The code was there.&lt;/p&gt;

&lt;p&gt;I found the architecture document.&lt;/p&gt;

&lt;p&gt;It mentioned caching.&lt;/p&gt;

&lt;p&gt;I even found the Slack discussion where someone asked:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Why not Memcached?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The reply was one sentence.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Redis should be fine.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That was all.&lt;/p&gt;

&lt;p&gt;The implementation survived.&lt;/p&gt;

&lt;p&gt;The explanation didn't.&lt;/p&gt;




&lt;h2&gt;
  
  
  Nothing was missing
&lt;/h2&gt;

&lt;p&gt;At first that felt strange.&lt;/p&gt;

&lt;p&gt;Every artifact still existed.&lt;/p&gt;

&lt;p&gt;Nothing had been deleted.&lt;/p&gt;

&lt;p&gt;Git history was intact.&lt;/p&gt;

&lt;p&gt;Slack history was searchable.&lt;/p&gt;

&lt;p&gt;The documentation hadn't disappeared.&lt;/p&gt;

&lt;p&gt;And yet the organization had clearly forgotten something.&lt;/p&gt;

&lt;p&gt;Not &lt;strong&gt;what&lt;/strong&gt; had been built.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt; it had been built that way.&lt;/p&gt;




&lt;h2&gt;
  
  
  We preserve artifacts better than reasoning
&lt;/h2&gt;

&lt;p&gt;Most engineering organizations are very good at keeping records.&lt;/p&gt;

&lt;p&gt;We keep tickets.&lt;/p&gt;

&lt;p&gt;We keep code.&lt;/p&gt;

&lt;p&gt;We keep documents.&lt;/p&gt;

&lt;p&gt;We keep backups.&lt;/p&gt;

&lt;p&gt;What we rarely preserve is the reasoning that connected them.&lt;/p&gt;

&lt;p&gt;The ticket tells you &lt;em&gt;what&lt;/em&gt; changed.&lt;/p&gt;

&lt;p&gt;The pull request shows &lt;em&gt;how&lt;/em&gt; it changed.&lt;/p&gt;

&lt;p&gt;The architecture document describes &lt;em&gt;what the system looks like.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;None of them necessarily explains why one option was chosen over another.&lt;/p&gt;

&lt;p&gt;That explanation often existed only during a conversation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Context has a half-life
&lt;/h2&gt;

&lt;p&gt;I've started thinking of context as something that slowly decays.&lt;/p&gt;

&lt;p&gt;When a decision is made, everyone involved shares the same mental model.&lt;/p&gt;

&lt;p&gt;The constraints are obvious.&lt;/p&gt;

&lt;p&gt;The trade-offs are fresh.&lt;/p&gt;

&lt;p&gt;Rejected alternatives are still remembered.&lt;/p&gt;

&lt;p&gt;Six months later the code remains exactly the same.&lt;/p&gt;

&lt;p&gt;The shared understanding doesn't.&lt;/p&gt;

&lt;p&gt;A year later someone asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Why didn't we use Memcached?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Nobody knows anymore.&lt;/p&gt;

&lt;p&gt;Not because the answer was lost.&lt;/p&gt;

&lt;p&gt;Because it was never stored anywhere in a form that could survive the people who understood it.&lt;/p&gt;




&lt;h2&gt;
  
  
  This is how organizational memory disappears
&lt;/h2&gt;

&lt;p&gt;It rarely happens all at once.&lt;/p&gt;

&lt;p&gt;Nobody deletes a document.&lt;/p&gt;

&lt;p&gt;Nobody wipes a database.&lt;/p&gt;

&lt;p&gt;Instead, every small decision loses a little of its surrounding context.&lt;/p&gt;

&lt;p&gt;A meeting ends.&lt;/p&gt;

&lt;p&gt;A Slack thread sinks into history.&lt;/p&gt;

&lt;p&gt;Someone changes teams.&lt;/p&gt;

&lt;p&gt;Someone leaves.&lt;/p&gt;

&lt;p&gt;Months later all the pieces still exist.&lt;/p&gt;

&lt;p&gt;The explanation doesn't.&lt;/p&gt;




&lt;h2&gt;
  
  
  I stopped asking a different question
&lt;/h2&gt;

&lt;p&gt;I used to ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Did we document this?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now I ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Could someone explain this decision after everyone involved has left?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Those aren't the same question.&lt;/p&gt;

&lt;p&gt;Documentation preserves artifacts.&lt;/p&gt;

&lt;p&gt;Organizational memory preserves reasoning.&lt;/p&gt;

&lt;p&gt;One can exist without the other.&lt;/p&gt;




&lt;h2&gt;
  
  
  Forgetting is usually invisible
&lt;/h2&gt;

&lt;p&gt;Organizations don't usually notice they're forgetting.&lt;/p&gt;

&lt;p&gt;Everything still looks healthy.&lt;/p&gt;

&lt;p&gt;Repositories are there.&lt;/p&gt;

&lt;p&gt;Documentation is there.&lt;/p&gt;

&lt;p&gt;Search still works.&lt;/p&gt;

&lt;p&gt;The problem only appears when someone asks a simple question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And nobody can answer with confidence.&lt;/p&gt;




&lt;p&gt;I've become less convinced that organizations lose knowledge because they delete information.&lt;/p&gt;

&lt;p&gt;More often, they lose the relationships, assumptions, and reasoning that gave that information meaning.&lt;/p&gt;

&lt;p&gt;The files survive.&lt;/p&gt;

&lt;p&gt;The memory quietly fades.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Next time I'd like to explore something that surprised me while building retrieval systems: why the LLM often turned out to be the least interesting part of the pipeline.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>discuss</category>
      <category>rag</category>
    </item>
    <item>
      <title>The Difference Between Search and Discovery</title>
      <dc:creator>ValeryKot</dc:creator>
      <pubDate>Thu, 16 Jul 2026 08:30:54 +0000</pubDate>
      <link>https://dev.to/valerykot/the-difference-between-search-and-discovery-30of</link>
      <guid>https://dev.to/valerykot/the-difference-between-search-and-discovery-30of</guid>
      <description>&lt;p&gt;&lt;em&gt;Sometimes the answer isn't missing. It's just scattered.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;A few weeks ago I caught myself doing something I suspect every engineer has done.&lt;/p&gt;

&lt;p&gt;I had five browser tabs open.&lt;/p&gt;

&lt;p&gt;An ADR.&lt;/p&gt;

&lt;p&gt;A Jira ticket.&lt;/p&gt;

&lt;p&gt;A Slack thread.&lt;/p&gt;

&lt;p&gt;A runbook.&lt;/p&gt;

&lt;p&gt;A configuration file.&lt;/p&gt;

&lt;p&gt;All of them were about the same problem.&lt;/p&gt;

&lt;p&gt;None of them answered my question.&lt;/p&gt;

&lt;p&gt;Only after reading all five did the picture become clear.&lt;/p&gt;

&lt;p&gt;That was the moment I realized I wasn't searching anymore.&lt;/p&gt;

&lt;p&gt;I was reconstructing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Search wasn't failing
&lt;/h2&gt;

&lt;p&gt;The question itself was simple.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why does service X bypass the API gateway checks?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Search behaved exactly as it should.&lt;/p&gt;

&lt;p&gt;It found the ADR describing the gateway.&lt;/p&gt;

&lt;p&gt;It found the runbook explaining how to restart it.&lt;/p&gt;

&lt;p&gt;It found a Jira issue mentioning service X.&lt;/p&gt;

&lt;p&gt;It found a Slack discussion where someone wrote:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"We'll keep the old behavior for now."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every result was relevant.&lt;/p&gt;

&lt;p&gt;None of them explained &lt;em&gt;why&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The explanation wasn't inside a document
&lt;/h2&gt;

&lt;p&gt;Eventually the story emerged.&lt;/p&gt;

&lt;p&gt;Months earlier, a security review introduced a new authentication header for internal services.&lt;/p&gt;

&lt;p&gt;Most services were updated.&lt;/p&gt;

&lt;p&gt;One legacy service wasn't.&lt;/p&gt;

&lt;p&gt;A temporary exception was added so production wouldn't break.&lt;/p&gt;

&lt;p&gt;Nobody ever documented that exception as a decision.&lt;/p&gt;

&lt;p&gt;It survived as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a commit message,&lt;/li&gt;
&lt;li&gt;a Slack discussion,&lt;/li&gt;
&lt;li&gt;one line of gateway configuration,&lt;/li&gt;
&lt;li&gt;and a Jira ticket that treated the symptom instead of the reason.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nothing was hidden.&lt;/p&gt;

&lt;p&gt;Nothing was lost.&lt;/p&gt;

&lt;p&gt;The explanation simply never existed in one place.&lt;/p&gt;




&lt;h2&gt;
  
  
  That's the difference
&lt;/h2&gt;

&lt;p&gt;I've started thinking about search and discovery as two different activities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Search retrieves artifacts.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Discovery reconstructs explanations.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Search answers questions like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Where is the API documentation?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Discovery answers questions like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Why does the system behave this way?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Those look similar.&lt;/p&gt;

&lt;p&gt;In practice they're completely different.&lt;/p&gt;




&lt;h2&gt;
  
  
  Documents aren't the unit of knowledge
&lt;/h2&gt;

&lt;p&gt;One assumption quietly sits underneath most retrieval systems.&lt;/p&gt;

&lt;p&gt;The answer is expected to exist inside one document.&lt;/p&gt;

&lt;p&gt;Similarity is computed.&lt;/p&gt;

&lt;p&gt;Documents are ranked.&lt;/p&gt;

&lt;p&gt;Top-&lt;em&gt;k&lt;/em&gt; is returned.&lt;/p&gt;

&lt;p&gt;This works remarkably well for factual lookup.&lt;/p&gt;

&lt;p&gt;It works much less well for organizational memory.&lt;/p&gt;

&lt;p&gt;Because organizations rarely write important decisions in one place.&lt;/p&gt;

&lt;p&gt;A design review produces one document.&lt;/p&gt;

&lt;p&gt;The implementation produces another.&lt;/p&gt;

&lt;p&gt;Operations write a runbook.&lt;/p&gt;

&lt;p&gt;Someone explains an exception in Slack.&lt;/p&gt;

&lt;p&gt;Months later, all four are technically correct.&lt;/p&gt;

&lt;p&gt;None tells the whole story.&lt;/p&gt;




&lt;h2&gt;
  
  
  Relationships carry meaning
&lt;/h2&gt;

&lt;p&gt;What connects those documents is often more important than the documents themselves.&lt;/p&gt;

&lt;p&gt;The Slack thread explains the motivation.&lt;/p&gt;

&lt;p&gt;The ADR explains the architecture.&lt;/p&gt;

&lt;p&gt;The commit explains the implementation.&lt;/p&gt;

&lt;p&gt;The runbook explains the consequence.&lt;/p&gt;

&lt;p&gt;Individually they're incomplete.&lt;/p&gt;

&lt;p&gt;Together they form an explanation.&lt;/p&gt;

&lt;p&gt;That's why I've become increasingly skeptical of measuring retrieval quality only by whether it returned the "right document."&lt;/p&gt;

&lt;p&gt;Sometimes there isn't one.&lt;/p&gt;

&lt;p&gt;Sometimes the answer is the relationship between several documents.&lt;/p&gt;




&lt;h2&gt;
  
  
  What changed for me
&lt;/h2&gt;

&lt;p&gt;I stopped asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which document contains the answer?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I started asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which documents explain the answer together?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That small shift changed how I think about retrieval.&lt;/p&gt;

&lt;p&gt;Not because search became less useful.&lt;/p&gt;

&lt;p&gt;But because I realized search is often only the first step.&lt;/p&gt;

&lt;p&gt;Discovery begins after the search results appear.&lt;/p&gt;




&lt;p&gt;Organizations rarely lose documents.&lt;/p&gt;

&lt;p&gt;More often, they lose the connections between them.&lt;/p&gt;

&lt;p&gt;And once those connections disappear, every document can still be found—while the explanation quietly becomes impossible to retrieve.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Next time I'd like to explore another pattern I've seen repeatedly: why organizations can forget something even when nothing has been deleted.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>rag</category>
      <category>engineering</category>
    </item>
    <item>
      <title>Documents Aren't Bags of Chunks</title>
      <dc:creator>ValeryKot</dc:creator>
      <pubDate>Sun, 12 Jul 2026 20:30:41 +0000</pubDate>
      <link>https://dev.to/valerykot/documents-arent-bags-of-chunks-3cha</link>
      <guid>https://dev.to/valerykot/documents-arent-bags-of-chunks-3cha</guid>
      <description>&lt;h2&gt;
  
  
  &lt;em&gt;One thing kept bothering me about retrieval systems: they often destroy the document before trying to understand it.&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Imagine taking a technical specification and cutting it with scissors every five hundred words.&lt;/p&gt;

&lt;p&gt;No attention to headings.&lt;/p&gt;

&lt;p&gt;No respect for sections.&lt;/p&gt;

&lt;p&gt;No care for where a thought begins and ends.&lt;/p&gt;

&lt;p&gt;Just cut.&lt;/p&gt;

&lt;p&gt;Stack.&lt;/p&gt;

&lt;p&gt;Index.&lt;/p&gt;

&lt;p&gt;That sounds absurd.&lt;/p&gt;

&lt;p&gt;Yet this is remarkably close to what many retrieval pipelines do before a document ever reaches a vector database.&lt;/p&gt;




&lt;h2&gt;
  
  
  We're asking the wrong question
&lt;/h2&gt;

&lt;p&gt;One of the most common discussions around RAG sounds like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What's the optimal chunk size?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;256 tokens?&lt;/p&gt;

&lt;p&gt;512?&lt;/p&gt;

&lt;p&gt;Should chunks overlap?&lt;/p&gt;

&lt;p&gt;After watching enough retrieval failures, I started thinking this isn't the right question.&lt;/p&gt;

&lt;p&gt;The real question isn't &lt;strong&gt;where&lt;/strong&gt; to split a document.&lt;/p&gt;

&lt;p&gt;It's &lt;strong&gt;whether every document should be split the same way at all.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Imagine this document
&lt;/h2&gt;

&lt;p&gt;Suppose you have a technical specification called &lt;strong&gt;"Rate Limiting Strategy."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It contains four sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why rate limiting exists&lt;/li&gt;
&lt;li&gt;How the algorithm works&lt;/li&gt;
&lt;li&gt;A code example&lt;/li&gt;
&lt;li&gt;Exceptions and edge cases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now index it using fixed-size chunks.&lt;/p&gt;

&lt;p&gt;The heading lands in one chunk.&lt;/p&gt;

&lt;p&gt;The code example ends up in another.&lt;/p&gt;

&lt;p&gt;The explanation of edge cases becomes a third.&lt;/p&gt;

&lt;p&gt;Each chunk receives its own embedding.&lt;/p&gt;

&lt;p&gt;Each becomes an independent point in vector space.&lt;/p&gt;

&lt;p&gt;The text survives.&lt;/p&gt;

&lt;p&gt;The document, as a coherent unit of meaning, does not.&lt;/p&gt;




&lt;h2&gt;
  
  
  Retrieval works perfectly
&lt;/h2&gt;

&lt;p&gt;Now someone asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"What happens when a user hits the rate limit?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The retriever returns the chunk containing the code.&lt;/p&gt;

&lt;p&gt;From its perspective, everything worked.&lt;/p&gt;

&lt;p&gt;The identifiers match.&lt;/p&gt;

&lt;p&gt;The embeddings are close.&lt;/p&gt;

&lt;p&gt;The similarity score is high.&lt;/p&gt;

&lt;p&gt;But something important has disappeared.&lt;/p&gt;

&lt;p&gt;The heading explaining &lt;em&gt;what&lt;/em&gt; this code belongs to is somewhere else.&lt;/p&gt;

&lt;p&gt;The paragraph explaining &lt;em&gt;why&lt;/em&gt; the algorithm behaves this way is somewhere else.&lt;/p&gt;

&lt;p&gt;The exceptions are somewhere else.&lt;/p&gt;

&lt;p&gt;The model receives valid code—but stripped of the reasoning that made the code meaningful.&lt;/p&gt;

&lt;p&gt;It can explain &lt;strong&gt;what&lt;/strong&gt; the function does.&lt;/p&gt;

&lt;p&gt;It cannot explain &lt;strong&gt;why&lt;/strong&gt; the system behaves that way.&lt;/p&gt;




&lt;h2&gt;
  
  
  Structure is semantics
&lt;/h2&gt;

&lt;p&gt;It's easy to think of document structure as presentation.&lt;/p&gt;

&lt;p&gt;I don't.&lt;/p&gt;

&lt;p&gt;A heading tells the reader:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Everything below belongs to the same idea.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A section boundary says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This thought ends here.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A list says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;These items should be understood together.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Those aren't visual decorations.&lt;/p&gt;

&lt;p&gt;They're part of the information itself.&lt;/p&gt;

&lt;p&gt;When those signals disappear during indexing, retrieval loses something that humans almost never notice consciously—but rely on constantly while reading.&lt;/p&gt;




&lt;h2&gt;
  
  
  Meaning doesn't have a fixed size
&lt;/h2&gt;

&lt;p&gt;Eventually I stopped asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;How should I split this document?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead I started asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the smallest unit that still makes sense on its own?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sometimes that's a paragraph.&lt;/p&gt;

&lt;p&gt;Sometimes it's an entire section.&lt;/p&gt;

&lt;p&gt;Sometimes it's a code block together with the explanation above it.&lt;/p&gt;

&lt;p&gt;Sometimes it's a diagram and its caption.&lt;/p&gt;

&lt;p&gt;An architecture decision record often makes sense only when the decision, its rationale, and its consequences stay together.&lt;/p&gt;

&lt;p&gt;An API reference is easier to understand when an endpoint remains connected to its parameters and examples.&lt;/p&gt;

&lt;p&gt;Meeting notes become much more useful when decisions stay attached to owners and action items.&lt;/p&gt;

&lt;p&gt;The right boundary isn't a character count.&lt;/p&gt;

&lt;p&gt;It's a logical boundary.&lt;/p&gt;




&lt;h2&gt;
  
  
  Retrieval found something. Understanding failed.
&lt;/h2&gt;

&lt;p&gt;One pattern kept repeating itself.&lt;/p&gt;

&lt;p&gt;The retrieval engine successfully found text related to the question.&lt;/p&gt;

&lt;p&gt;The model confidently explained that text.&lt;/p&gt;

&lt;p&gt;And yet the actual answer was still missing.&lt;/p&gt;

&lt;p&gt;Not because retrieval failed.&lt;/p&gt;

&lt;p&gt;Because the document had already been dismantled before retrieval even began.&lt;/p&gt;




&lt;h2&gt;
  
  
  A document is an argument
&lt;/h2&gt;

&lt;p&gt;I've gradually stopped thinking of documents as long strings of text.&lt;/p&gt;

&lt;p&gt;They're closer to arguments.&lt;/p&gt;

&lt;p&gt;Someone deliberately grouped ideas together.&lt;/p&gt;

&lt;p&gt;Separated topics.&lt;/p&gt;

&lt;p&gt;Added headings.&lt;/p&gt;

&lt;p&gt;Built a flow of reasoning.&lt;/p&gt;

&lt;p&gt;That structure carries meaning every bit as much as the words themselves.&lt;/p&gt;

&lt;p&gt;If I break that structure into arbitrary pieces before indexing it, I shouldn't expect a retrieval engine—or an LLM—to reconstruct it perfectly later.&lt;/p&gt;




&lt;p&gt;A document isn't a sequence of tokens.&lt;/p&gt;

&lt;p&gt;It's an argument made visible.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Next time I want to explore a different question: why finding a document isn't the same thing as discovering knowledge.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>programming</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Bigger Context Windows Didn't Make Our RAG Smarter</title>
      <dc:creator>ValeryKot</dc:creator>
      <pubDate>Wed, 08 Jul 2026 10:23:41 +0000</pubDate>
      <link>https://dev.to/valerykot/bigger-context-windows-didnt-make-our-rag-smarter-4d0l</link>
      <guid>https://dev.to/valerykot/bigger-context-windows-didnt-make-our-rag-smarter-4d0l</guid>
      <description>&lt;p&gt;&lt;em&gt;We stopped measuring retrieval quality by how many tokens we could fit into the prompt.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When long-context models became available, many of us made the same assumption.&lt;/p&gt;

&lt;p&gt;If an LLM can read 128K tokens, retrieval suddenly feels less important. Why spend time carefully selecting documents if the model can simply read everything?&lt;/p&gt;

&lt;p&gt;It sounds reasonable.&lt;/p&gt;

&lt;p&gt;In practice, it wasn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  More context, worse answers
&lt;/h2&gt;

&lt;p&gt;Imagine asking your internal assistant:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why did we abandon microservices?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Retrieval returns thirty documents.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an architecture decision record&lt;/li&gt;
&lt;li&gt;a few Jira tickets&lt;/li&gt;
&lt;li&gt;Slack discussions&lt;/li&gt;
&lt;li&gt;meeting notes&lt;/li&gt;
&lt;li&gt;a glossary page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything is related.&lt;/p&gt;

&lt;p&gt;Almost nothing answers the question.&lt;/p&gt;

&lt;p&gt;The actual decision lives in a single ADR written months earlier. It explains the trade-offs: team size, latency, deployment complexity, operational cost.&lt;/p&gt;

&lt;p&gt;But that document isn't especially similar to the query. It doesn't repeat the same vocabulary. It doesn't even mention "microservices" very often.&lt;/p&gt;

&lt;p&gt;So it gets buried.&lt;/p&gt;

&lt;p&gt;The model now receives thirty relevant documents and does what language models are very good at: it produces a coherent explanation.&lt;/p&gt;

&lt;p&gt;The problem is that coherence is not the same thing as faithfulness.&lt;/p&gt;

&lt;p&gt;Instead of recovering the original decision, it often synthesizes one from recurring themes across the retrieved documents.&lt;/p&gt;

&lt;p&gt;The answer sounds plausible.&lt;/p&gt;

&lt;p&gt;It just isn't the answer that was originally made.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger windows don't fix retrieval
&lt;/h2&gt;

&lt;p&gt;Research has already shown that models struggle with information buried inside very long contexts. The &lt;em&gt;Lost in the Middle&lt;/em&gt; paper is probably the best-known example.&lt;/p&gt;

&lt;p&gt;Our experience suggested something slightly different.&lt;/p&gt;

&lt;p&gt;Sometimes the answer isn't lost because the context is long.&lt;/p&gt;

&lt;p&gt;It's lost because the retrieval stage couldn't distinguish &lt;em&gt;the document that contains the decision&lt;/em&gt; from &lt;em&gt;documents that merely discuss the same topic&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Adding more context doesn't necessarily solve that problem.&lt;/p&gt;

&lt;p&gt;Sometimes it simply gives the model more material to average together.&lt;/p&gt;

&lt;h2&gt;
  
  
  We were optimizing the wrong thing
&lt;/h2&gt;

&lt;p&gt;For a while we treated retrieval as a packing exercise.&lt;/p&gt;

&lt;p&gt;How many useful chunks can we fit into the prompt?&lt;/p&gt;

&lt;p&gt;Over time the question changed.&lt;/p&gt;

&lt;p&gt;Why is this document here?&lt;/p&gt;

&lt;p&gt;Should it be here at all?&lt;/p&gt;

&lt;p&gt;Does it explain the decision, or does it merely mention the same technology?&lt;/p&gt;

&lt;p&gt;Those questions turned out to matter much more than the size of the context window.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retrieval is a selection problem
&lt;/h2&gt;

&lt;p&gt;The biggest shift wasn't moving from 8K to 128K tokens.&lt;/p&gt;

&lt;p&gt;It was realizing that retrieval isn't about fitting more information into a prompt.&lt;/p&gt;

&lt;p&gt;It's about selecting the few pieces of information that actually explain the answer.&lt;/p&gt;

&lt;p&gt;Large context windows are incredibly useful.&lt;/p&gt;

&lt;p&gt;They just don't compensate for weak retrieval.&lt;/p&gt;

&lt;p&gt;If anything, they make weak retrieval look convincing.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Next time I'll look at another assumption I no longer believe: that documents should be treated as bags of chunks.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>rag</category>
    </item>
    <item>
      <title>Why RAG Finds Documents but Still Misses the Answer</title>
      <dc:creator>ValeryKot</dc:creator>
      <pubDate>Mon, 06 Jul 2026 10:22:20 +0000</pubDate>
      <link>https://dev.to/valerykot/why-rag-finds-documents-but-still-misses-the-answer-4jjl</link>
      <guid>https://dev.to/valerykot/why-rag-finds-documents-but-still-misses-the-answer-4jjl</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F29jch57m9kjd0w6mwmq0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F29jch57m9kjd0w6mwmq0.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;After building and evaluating dozens of retrieval systems, I stopped thinking retrieval was the real problem.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Over the last couple of years I've spent a lot of time building and evaluating RAG systems.&lt;/p&gt;

&lt;p&gt;Some were quick prototypes.&lt;/p&gt;

&lt;p&gt;Some powered internal knowledge bases.&lt;/p&gt;

&lt;p&gt;Some eventually became parts of products.&lt;/p&gt;

&lt;p&gt;And I kept seeing the same pattern.&lt;/p&gt;

&lt;p&gt;A user would ask a perfectly reasonable question.&lt;/p&gt;

&lt;p&gt;The search would work.&lt;/p&gt;

&lt;p&gt;The LLM would answer confidently.&lt;/p&gt;

&lt;p&gt;And the answer would still be wrong.&lt;/p&gt;

&lt;p&gt;Not because the model hallucinated.&lt;/p&gt;

&lt;p&gt;Not because embeddings were bad.&lt;/p&gt;

&lt;p&gt;Not because vector search failed.&lt;/p&gt;

&lt;p&gt;The system had simply retrieved the wrong kind of information.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question every RAG system should answer
&lt;/h2&gt;

&lt;p&gt;Imagine a company with a thousand engineering documents.&lt;/p&gt;

&lt;p&gt;Architecture decisions.&lt;/p&gt;

&lt;p&gt;Meeting notes.&lt;/p&gt;

&lt;p&gt;RFCs.&lt;/p&gt;

&lt;p&gt;Runbooks.&lt;/p&gt;

&lt;p&gt;ADRs.&lt;/p&gt;

&lt;p&gt;Internal documentation.&lt;/p&gt;

&lt;p&gt;Now someone asks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why did we choose Kafka over RabbitMQ?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A typical RAG pipeline looks like this:&lt;/p&gt;

&lt;p&gt;Documents&lt;br&gt;
    ↓&lt;br&gt;
Chunking&lt;br&gt;
    ↓&lt;br&gt;
Embeddings&lt;br&gt;
    ↓&lt;br&gt;
Vector Database&lt;br&gt;
    ↓&lt;br&gt;
Top-K Retrieval&lt;br&gt;
    ↓&lt;br&gt;
LLM&lt;/p&gt;

&lt;p&gt;Everything seems reasonable.&lt;/p&gt;

&lt;p&gt;The question becomes an embedding.&lt;/p&gt;

&lt;p&gt;The nearest chunks are retrieved.&lt;/p&gt;

&lt;p&gt;The chunks are added to the prompt.&lt;/p&gt;

&lt;p&gt;The LLM generates an answer.&lt;/p&gt;

&lt;p&gt;Simple.&lt;/p&gt;

&lt;p&gt;Except this is often where things start going wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Semantic similarity isn't the same as relevance
&lt;/h2&gt;

&lt;p&gt;Suppose your knowledge base contains fifteen documents about Kafka.&lt;/p&gt;

&lt;p&gt;Architecture guides.&lt;/p&gt;

&lt;p&gt;Broker configuration.&lt;/p&gt;

&lt;p&gt;Monitoring.&lt;/p&gt;

&lt;p&gt;Deployment.&lt;/p&gt;

&lt;p&gt;Developer documentation.&lt;/p&gt;

&lt;p&gt;Vector search will happily retrieve them.&lt;/p&gt;

&lt;p&gt;And technically, it's correct.&lt;/p&gt;

&lt;p&gt;They are semantically close to the question.&lt;/p&gt;

&lt;p&gt;But none of them explain why Kafka was chosen.&lt;/p&gt;

&lt;p&gt;The actual answer might live inside a two-page Architecture Decision Record written eighteen months earlier.&lt;/p&gt;

&lt;p&gt;That document mostly discusses RabbitMQ, latency, throughput, operational complexity, and load testing.&lt;/p&gt;

&lt;p&gt;The word Kafka barely appears.&lt;/p&gt;

&lt;p&gt;From the perspective of embeddings, it isn't particularly similar.&lt;/p&gt;

&lt;p&gt;From the perspective of an engineer, it's exactly the document you needed.&lt;/p&gt;

&lt;p&gt;That's the disconnect.&lt;/p&gt;

&lt;p&gt;Search found similar documents.&lt;/p&gt;

&lt;p&gt;It didn't find the decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then we start optimizing
&lt;/h2&gt;

&lt;p&gt;Once teams notice retrieval isn't great, the usual optimization cycle begins.&lt;/p&gt;

&lt;p&gt;First we reduce Top-K.&lt;/p&gt;

&lt;p&gt;Instead of retrieving 100 chunks, we retrieve 10.&lt;/p&gt;

&lt;p&gt;Then we shrink chunk sizes.&lt;/p&gt;

&lt;p&gt;500 tokens become 250.&lt;/p&gt;

&lt;p&gt;250 become 150.&lt;/p&gt;

&lt;p&gt;Then we add rerankers.&lt;/p&gt;

&lt;p&gt;Cross-encoders.&lt;/p&gt;

&lt;p&gt;Hybrid retrieval.&lt;/p&gt;

&lt;p&gt;Bigger context windows.&lt;/p&gt;

&lt;p&gt;I tried all of these.&lt;/p&gt;

&lt;p&gt;Most of them help.&lt;/p&gt;

&lt;p&gt;None of them completely solve the problem.&lt;/p&gt;

&lt;p&gt;Because they're still optimizing retrieval inside the same mental model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The document slowly disappears
&lt;/h2&gt;

&lt;p&gt;One thing surprised me more than anything else.&lt;/p&gt;

&lt;p&gt;The smaller our chunks became, the less context survived.&lt;/p&gt;

&lt;p&gt;Eventually the system remembered paragraphs.&lt;/p&gt;

&lt;p&gt;But forgot the document.&lt;/p&gt;

&lt;p&gt;Headings disappeared.&lt;/p&gt;

&lt;p&gt;Structure disappeared.&lt;/p&gt;

&lt;p&gt;Arguments disappeared.&lt;/p&gt;

&lt;p&gt;What remained was a collection of isolated text fragments.&lt;/p&gt;

&lt;p&gt;I started calling this chunk amnesia.&lt;/p&gt;

&lt;p&gt;It's not a scientific term.&lt;/p&gt;

&lt;p&gt;Just a name for something I kept observing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Humans don't search that way
&lt;/h2&gt;

&lt;p&gt;This is where my thinking changed.&lt;/p&gt;

&lt;p&gt;When I need information, I don't start by looking for a paragraph.&lt;/p&gt;

&lt;p&gt;I usually ask myself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which document was this?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What decision did we make?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only after that do I look for implementation details.&lt;/p&gt;

&lt;p&gt;It's almost hierarchical.&lt;/p&gt;

&lt;p&gt;Document&lt;br&gt;
    ↓&lt;br&gt;
Decision&lt;br&gt;
    ↓&lt;br&gt;
Evidence&lt;br&gt;
    ↓&lt;br&gt;
Implementation&lt;/p&gt;

&lt;p&gt;Most RAG systems reverse that process.&lt;/p&gt;

&lt;p&gt;They search for paragraphs first and hope context reconstructs itself.&lt;/p&gt;

&lt;p&gt;Sometimes it does.&lt;/p&gt;

&lt;p&gt;Often it doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger context windows don't fix this
&lt;/h2&gt;

&lt;p&gt;A common reaction is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Let's just send more context."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I don't think that's the answer either.&lt;/p&gt;

&lt;p&gt;A 64K context window can hold far more text.&lt;/p&gt;

&lt;p&gt;It doesn't magically restore structure.&lt;/p&gt;

&lt;p&gt;The model still receives disconnected fragments.&lt;/p&gt;

&lt;p&gt;More fragments don't automatically become a coherent narrative.&lt;/p&gt;

&lt;p&gt;Large prompts reduce one bottleneck.&lt;/p&gt;

&lt;p&gt;They don't eliminate the retrieval problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed my thinking
&lt;/h2&gt;

&lt;p&gt;Eventually I stopped thinking of retrieval as a single search problem.&lt;/p&gt;

&lt;p&gt;Instead, I started thinking about navigation across multiple levels of abstraction.&lt;/p&gt;

&lt;p&gt;Before asking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which paragraph matters?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I first wanted to answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which document matters?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which decisions inside that document matter?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only then should retrieval dive into individual chunks.&lt;/p&gt;

&lt;p&gt;That's also how people naturally explore documentation.&lt;/p&gt;

&lt;p&gt;We rarely jump directly into paragraph number seventeen.&lt;/p&gt;

&lt;p&gt;We skim.&lt;/p&gt;

&lt;p&gt;We orient ourselves.&lt;/p&gt;

&lt;p&gt;Then we zoom in.&lt;/p&gt;

&lt;h2&gt;
  
  
  This isn't just an LLM problem
&lt;/h2&gt;

&lt;p&gt;After a while I realized this discussion isn't really about language models.&lt;/p&gt;

&lt;p&gt;It's about organizational memory.&lt;/p&gt;

&lt;p&gt;Companies rarely lose information because documents disappear.&lt;/p&gt;

&lt;p&gt;They lose the relationships between documents.&lt;/p&gt;

&lt;p&gt;The ADR exists.&lt;/p&gt;

&lt;p&gt;The meeting notes exist.&lt;/p&gt;

&lt;p&gt;The design proposal exists.&lt;/p&gt;

&lt;p&gt;The Slack discussion exists.&lt;/p&gt;

&lt;p&gt;But the connections slowly fade.&lt;/p&gt;

&lt;p&gt;Search retrieves text.&lt;/p&gt;

&lt;p&gt;People are trying to recover context.&lt;/p&gt;

&lt;p&gt;Those aren't always the same problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm still exploring this
&lt;/h2&gt;

&lt;p&gt;I don't have a universal solution.&lt;/p&gt;

&lt;p&gt;In fact, this realization is one of the reasons I started building Retineo.&lt;/p&gt;

&lt;p&gt;Not because I thought I had the answer.&lt;/p&gt;

&lt;p&gt;Because I couldn't find a system that treated organizational knowledge as something richer than independent chunks inside a vector database.&lt;/p&gt;

&lt;p&gt;Maybe the answer isn't hierarchical retrieval.&lt;/p&gt;

&lt;p&gt;Maybe it's something else entirely.&lt;/p&gt;

&lt;p&gt;I'm still experimenting.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'd love to hear your experience
&lt;/h2&gt;

&lt;p&gt;If you've built RAG systems at scale, what's the failure mode you've seen most often?&lt;/p&gt;

&lt;p&gt;For me, it isn't hallucination.&lt;/p&gt;

&lt;p&gt;It's this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The documents aren't missing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The relationships between them are.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Discussion
&lt;/h2&gt;

&lt;p&gt;Have you encountered similar problems?&lt;/p&gt;

&lt;p&gt;Did hierarchical retrieval, knowledge graphs, rerankers, or another approach help?&lt;/p&gt;

&lt;p&gt;I'm genuinely interested in how others are tackling this.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>machinelearning</category>
      <category>knowledgemanagement</category>
    </item>
  </channel>
</rss>
