RAG Is Simpler Than You Think

(lighthousenewsletter.com)

85 points | by j0selit0 2 hours ago

15 comments

  • usernametaken29 44 minutes ago
    I worked on large scale RAG systems before and can say people vastly underestimate full text search and vastly overestimate embeddings. FTS is really easy, portable and scalable and gets you very far, the 80/20 rule applies. Embeddings appear to be nice and magic but when you really get into them you notice: semantic similarity isn’t as good as you think and certainly it won’t make everyone happy. You will inevitably end up having to re-embed more or different chunks of your text to accommodate more and more precise embedding search - at which point you’ll go the last mile and do reranking etc etc all the while having to support the operational burden of vector search. Then you turn around and build a search query with 500 keywords and sure it’s painful but it just works, accommodates all use cases, scales and is overall less annoying to maintain.
    • lacedeconstruct 38 minutes ago
      I thought text search was always the first thing you try, then fuzzy search, then you go for RAG
    • kaon_2 33 minutes ago
      Can you elaborate? We have technicians searching in different languages. Also our knowledge base is often in different languages. I just don't see how full text search can work? Maybe in a problem space like a wiki where people always know what to search for?
      • jon-wood 21 minutes ago
        Instinctively this feels like a two phase problem - start with some machine translation into a single spoken language and index that, then when people are querying do the same thing. When returning search results show them in the original language.
  • gabosarmiento 4 minutes ago
    I would like to see how each recipe performs against its corresponding evals. Some sort of ranking would be useful.

    Everyone keeps posting articles about how to implement RAG, but I also wonder why there isn’t some sort of skill to help people create a simple retrieval plan, starting with the retrieval methods and connecting them with evals. This could show whether they actually improve the result and make retrieval simpler for any agent, instead of making people start from zero.

  • Angostura 1 hour ago
    I have a particular antipathy for articles too lazy to spell out acronyms on first use.

    So: https://en.wikipedia.org/wiki/Retrieval-augmented_generation

    • dotancohen 49 minutes ago
      The audience for this piece is already very familiar with RAG. I don't want articles discussing e.g. OLED screens telling me what the acronym is - that would be a sign that the article is far below the level that I need.
      • vaylian 34 minutes ago
        A hyperlink to Wikipedia would have solved that issue.
        • Lorean1 19 minutes ago
          Maybe if a person can't even google RAG they are not the intended audience of that article.
        • redsocksfan45 30 minutes ago
          [dead]
    • _joel 1 hour ago
      For those times you need to Red Amber Green your BM25
  • refactor_master 1 hour ago
    Here’s an even simpler take: just embed everything the first time, then track what was changed. Use a cheap model to summarize and clean up the documents/chats with summary and keywords. Unless you have entire libraries of books to embed it’s going to be a few hundred dollars of API calls.

    Then, throw it all in BigQuery. Handles all the vector stuff natively.

    Sprinkle an agentic bot UI thing on top to make it appear all-knowing and magical.

    I assume other vendors than Google have a similar batteries-included approach you can just plug in.

    • usernametaken29 40 minutes ago
      > embed everything the first time

      This assumes your text is small. Try embedding pdf reports - though luck. It surely won’t fit into most embeddings. I can think of many more examples: books, news articles, medical reports, insurance claims etc. they’re all too big to “index it all at once”

    • cpursley 57 minutes ago
      Yep, lock into some vendor from day 1. Great idea!
      • orisho 55 minutes ago
        Vendor lock in is 2025. Porting became trivial with LLMs advancing like they have.
  • jrochkind1 14 minutes ago
    More LLM-generated text about LLMs.

    Is anyone else actually finding it harder and harder to read LLM generated text? I find it quite tiring, my brain just does not want to get through it.

    • allexander 12 minutes ago
      In the same boat here.
    • EGreg 11 minutes ago
      It’s largely because LLMs are reaching for many different types of adjectives or verbs in the same sentence, in a jarring way. While embedding it in a confidently declarative sentence. Everything sounds like some profound insight, dialed to an 11, but written as poetry. Especially those headings. With the short sentences.
      • allexander 10 minutes ago
        I have to agree with you. Yet it is tiring, people don't even try anymore.
  • 7734128 1 hour ago
    There have been many blogs like this over the last years.

    Yes, embeddings are computationally heavy, but they are not at all complicated and they provide a lot of benefit.

    90% of "document" based RAG projects should view semantic search with embeddings as their primary method.

    It's very powerful and so easy to implement that you could try it out and discover whether performance would be an issue rather than trying to anticipate it.

    • petesergeant 1 hour ago
      Embeddings are reasonably simple, but it’s a journey to get there, and I am very proud of the dog-heavy explainer I wrote on them: https://sgnt.ai/p/embeddings-explainer/
      • dotancohen 41 minutes ago
        This is terrific, thank you! There's a typo in the following sentence:

          > we don’t especially want to say that books on forestry and similar to books on puppies
        
        ^and^are
      • dizhn 1 hour ago
        This is very good. Thanks.
  • bob1029 1 hour ago
    Agentic query rewrite on top of good old fashioned Lucene is the end game. This is effectively providing a lot of the same magic you get with the semantic approach. Allowing the agent to query the document store iteratively is where the capabilities become unbounded.

    Embeddings and semantic search add non determinism on top of non determinism. This seems fundamentally cursed. Lexical is much easier to control, iterate and debug. The tools are incredibly mature. Your users will probably prefer it as well.

    • jrochkind1 13 minutes ago
      An LLM wrote this comment, no? I'm curious your motivation for having an LLM write such a short comment instead of writing it yourself?
      • pixelbro 5 minutes ago
        I've not seen such a clipped cadence out of an LLM. I would not automatically suspect the GP. Maybe there's better ways to spend your time?
  • jmutex 11 minutes ago
    Chunk size matters way more than the retrieval model in my experience. Get that wrong and nothing else helps.
  • jankovicsandras 1 hour ago
    If someone has a Postgres db and want very simple RAG:

    https://github.com/jankovicsandras/plpgsql_bm25 BM25 search implemented in PL/pgSQL ( Unlicense / Public domain )

    The repo includes also plpgsql_bm25rrf.sql : PL/pgSQL function for hybrid search ( plpgsql_bm25 + pgvector ) with Reciprocal Rank Fusion; and Jupyter notebook examples.

  • nilirl 1 hour ago
    Maybe I'm old but where exactly are the "dragons"?

    How is RAG any different from the search systems we've been building before LLMs? Is it the sudden need for everyone to design a search API and engine that's driven this trend?

    If so, I'd like to see more design patterns around existing search problems:

    - Correcting or backtracking based on feedback.

    - Measuring relevance.

    - Comparison with task-based pre-written queries. Does every LLM task need a full blown search engine? Why not a tightly scoped domain API for data retrieval?

    • brabel 1 hour ago
      The whole embedding thing which converts “tokens” to vectors, which you then store in a vector database so that you can later query by vector distance, seems to be LLM specific technology, no? As far as I know the vectors look a lot like the weights in a LLM itself which is why the vector search also works with some level of intelligence.
      • triangle 1 hour ago
        Vector embeddings predate LLMs. They have been used as far back as the early 2000s. They are a general machine learning technique, rather than LLM specific
      • nilirl 57 minutes ago
        Sure and that's a new technique for indexing and querying.

        Where's the new design tension? Indexes always had to be monitored for freshness and queries have always needed cleaning or parsing.

      • KaseyKim 13 minutes ago
        right, it is the foundation of machine learning.
      • ewidar 51 minutes ago
        not really, vectorising text/books is old school ML by this point.

        at least to me that seems the same as https://en.wikipedia.org/wiki/Word2vec for e.g.

    • TudorAndrei 1 hour ago
      It's just information retrieval packaged as something new.
      • kachnuv_ocasek 1 hour ago
        And you can't fundraise on some old "information retrieval".
    • MacketSWE 1 hour ago
      [flagged]
  • KaseyKim 10 minutes ago
    i want to ask that, if a user want to search sth, but he doesnt know the exact name(keywords), just some description. at this moment, whether the text serach fail?
  • khalic 1 hour ago
    > Why this is more flexible than embeddings

    Oh boy...

  • apavlinovic 1 hour ago
    The article sounds like AI slop with some predictable tells like short punctual sentences, bizarre jargon, and titles like "Recipe 4: On-The-Fly Embedding (The Fresh Data Play)"

    Can we not reward junk like this? Most of the sentences are incomprehensible and provide zero actual argumentation, it's just a list of "whats" with no "whys"

    • dsego 57 minutes ago
      You are right, now I noticed "Real talk" and "Why this is underrated" and I can't unsee it.
  • simianwords 1 hour ago
    OT but its interesting that none of the harnesses today use embeddings but just simple grep. I would not have predicted this
    • imtringued 46 minutes ago
      Ok? I'm not seeing how that is interesting, you're exclusively focusing on coding which requires precise substring locations. Google is basically almost entirely driven by embedding models now.
      • simianwords 38 minutes ago
        And why do you think coding didn’t benefit from embeddings? It was attempted many times and the industry gave up.

        I find this interesting because practically no one is doing RAG on thier personal data which is something I wouldn’t have expected.

  • cloudoora 1 hour ago
    [dead]