A Helping Hand for LLMs (Retrieval Augmented Generation) - Computerphile
171K views · Sep 1, 2024 · Education
Comments · 146
@mokopa · 2 years ago
<a href="https://www.youtube.com/watch?v=of4UDMvi2Kw&t=492">8:12</a> "Langchain does a lot of other stuff that I'm not using"...langchain in a nutshell
38
@Tomyb15 · 2 years ago
It's surprisingly bare bones as an approach. I was expecting something more sophisticated than just sticking the context as part of a promt and literally telling the model to use it in the answer. Reminds me of "promp engineers" sticking a <i>"and please don't lie"</i> at the end of a prompt to decrease hallucinations 😂
50
@mikoaj1321 · 2 years ago
The presented example wasn't quite RAG. You're just putting more text into the context window. This method quickly falls short if you need to process a big set of reference data, like an entire PDF documentation. Real RAG is a bit more complicated and involves an additional step of converting the reference data to tokens that can be stored, then during inference you first convert the query to tokens, then find best matches with stored data, then use that search to generate excerpts from the original data to feed into your final inference window.
140
@alastairzotos · 2 years ago (edited)
I worked on a RAG to make product recommendations, but eventually I was supplying it with too much data as context and it wouldn't work.<br><br>I settled on a neat solution: use GPT's ability to call functions and tell it something like, "when the user asks for a recommendation, call the get_recommendations function with a summary of the user's query". It's cool that it gave me a summary because the embeddings are much better than those of a whole sentence or paragraph. So I could take that embedding and look up products based on semantic similarity to the user's query, while it was still generating a response, and then pass the top 10 back to GPT for it to show the user
26
@KylerChin · 2 years ago
Feels illegal to be this early to Prof. Pound's lectures
81
@mscotty910 · 1 year ago
Out of all the people they have Mike is the best (IMO) it would be awesome to do a segment with him on how models like Stable Video Diffusion Image-to-Video work
3
@dukestt543 · 2 years ago
The word "Strawberry" actually has two R's. I apologize for any confusion caused earlier. - Chat GPT
110
@amrelmohamady · 2 years ago
Now we need a video on fine tuning!
27
@penfold-55 · 2 years ago
The problem with RAG and LLM's are the same. The risk is that the user takes what is said at face value.<br>Where RAG really can improve the situation is if the source is provided.<br>If you have a group of formal documents (such as documents for company procedure) then you should always state the source of that document.<br>This not only improves the trust of the model, but also narrows down where the user needs to look.<br><br>If it is just a black box, it can be hard for the user to know whether the RAG worked or whether it was hallucinating.
63
@i1abnrk · 2 years ago
I remember having a whole box of the green printer paper. A family friend worked at the state and gave it to me for drawing, etc. some of it had phone numbers and addresses. Long ago in the city dump now.
1
@garcipat · 2 years ago
Funny. just had to do this in a hackathon last week :)
@_di_su · 1 year ago
brilliant! thank you
Up next

Vector Search with LLMs - Computerphile
Computerphile · 168K views

Is RAG Still Needed? Choosing the Best Approach for LLMs
IBM Technology · 1M views

AI Language Models & Transformers - Computerphile
Computerphile · 352K views

How AI 'Understands' Images (CLIP) - Computerphile
Computerphile · 375K views

Keynote: After the AI Hype – What’s Real, and What’s Next - Richard Campbell - 2026
NDC Conferences · 424K views

How to set up RAG - Retrieval Augmented Generation (demo)
Don Woodlock · 77K views

How might LLMs store facts | Deep Learning Chapter 7
3Blue1Brown · 2.2M views

The Problem with A.I. Slop! - Computerphile
Computerphile · 714K views

Is Fine-Tuning Still Needed? LLMs, RAG, & LoRA
IBM Technology · 126K views

Why AI Tokens are so Expensive - Computerphile
Computerphile · 820K views

Everything You Need To Know About Large Language Models (LLMs)
Matthew Berman · 518K views

The Hard Problem of Controlling Powerful AI Systems - Computerphile
Computerphile · 62K views

But how do AI images and videos actually work? | Guest video by Welch Labs
3Blue1Brown and Welch Labs · 2.1M views

Generative AI's Greatest Flaw - Computerphile
Computerphile · 611K views

Introduction to large language models
Google Cloud Tech · 887K views

LLMs Explained: Tokens, Embeddings, Transformers and More
Syntax · 858K views

Prompting Is Dead in 6 Months. Andrew Ng, Stanford
philia · 224K views

GraphRAG: The Marriage of Knowledge Graphs and RAG: Emil Eifrem
AI Engineer · 289K views

RAG vs Fine-Tuning vs Prompt Engineering: Optimizing AI Models
IBM Technology · 730K views

Stable Diffusion in Code (AI Image Generation) - Computerphile
Computerphile · 316K views