Making AI accessible on YouTube, Substack, and our Courses. Co-founder @towards_ai @hlr_newsletter. Ex-Ph.D. student @Mila_Quebec @polymtl.
Sep 13, 2024 • 15 tweets • 7 min read
This is the best #RAG stack, according to a fantastic study currently in review (by Wang et al., 2024) (it's a gold mine!).
Here are the best components of each part of the system and how they work… 👇
First is Query Classification. Not all queries are equal. Some queries don't need retrieval as the LLM already has the knowledge (e.g. Who is Messi?)
They created 15 task categories based on whether they provided sufficient information (See image).
They then train a binary classifier for tasks based on user-given information, termed “sufficient” (yellow), which need not retrieval, and “insufficient” (red), where retrieval may be necessary.