I explore search-based approaches to retrieval-augmented generation (RAG), including keyword search over full-text indexes rather than embeddings and vector search. I also use LLM fragments to bring Hacker News discussions into prompts. These approaches connect to rag applications and citations and prompt fragments and tools.
I extracted notes and code from a livestream: notes and code from a livestream about implementing search-based RAG using Claude 3.5 Sonnet, @ValDotTown and Datasette.
In that livestream, @stevekrouse and I hacked the implementation together in about an hour.
I said embeddings and vector search aren't actually required to build a RAG Q&A app. My keyword-search alternative is to turn the user's question into keyword search terms and run them against a full-text search engine like SQLite's built-in full-text search.
I asked, “Based on your current understating of RAG, does it have to involve vector search?”
I shared details about the llm-hacker-news plugin at https://t.co/6thQLY0hkG and https://t.co/0TEqS4kuym.
Related: rag and context management, embedding retrieval techniques, rag applications and citations