Search-Based RAG with DuckDB and GLiNER

Sdílet
Vložit
  • čas přidán 21. 08. 2024
  • In this video, we're going to learn how to do Search-Based RAG on a podcast trasnscript. Instead of doing vector search to retrieve appropriate text chunks, we'll use Full-Text Search with DuckDB. We'll also use GLiNER to extract key words from the user's prompt.
    #gliner #duckdb #llamacpp
    Import code - github.com/mne...
    Search code - github.com/mne...
    Simon Willison's Blog - simonwillison....
    GLiNER - github.com/urc...
    GLiNER model - huggingface.co...
    llama.cpp - formulae.brew....

Komentáře • 5

  • @ranjit9427
    @ranjit9427 Před měsícem +2

    Can we combine both Text Search and Vector Search? And can u create a complete implementation video?

    • @learndatawithmark
      @learndatawithmark  Před měsícem +1

      We can! This would be hybrid search which I need to read a bit more about. Once I've done that, I'll make another video - thanks for the idea :)

    • @saqqara6361
      @saqqara6361 Před 9 dny

      This is one of the most promising approach in RAG -> hybrid search with a re-ranking

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w Před měsícem +1

    why would you do full text search over rag?

    • @learndatawithmark
      @learndatawithmark  Před měsícem +4

      You'd use Full-Text Search (FTS) if you were searching for specific terms that you know are in the text. But it will only find those terms or any variants close to those words. So if you know exactly what you're looking for it should (in theory) work better than doing vector search, where you'd be matching an embedding of your search query/keywords against embeddings of paragraphs of text.
      Of course this technique won't find other bits of text that have the same semantic meaning.
      But your question makes me curious to compare the two techniques on the same dataset to see if/how the query results differ.