Try this Before RAG. This New Approach Could Save You Thousands!

preview_player
Показать описание
In this video, I explore the capabilities of Google’s Gemini API for document processing, highlighting the potential cost savings and efficiency brought by context caching. I'll show how to handle large PDF files, directly process documents without pre-processing, and seamlessly integrate context caching. Tune in to see step-by-step examples and learn how to effectively utilize this powerful tool for your projects!

LINKS:

💻 RAG Beyond Basics Course:

Let's Connect:

Signup for Newsletter, localgpt:

00:00 Introduction to Prompt Caching with Claude
00:19 Google's Gemini API for PDF Processing
01:11 Capabilities and Specifications of Gemini API
02:20 Tutorial: Using Gemini API for Document Processing
04:39 Experimenting with Gemini API
05:35 Setting Up and Using Context Caching
08:37 Advanced Multimodal Capabilities of Gemini API
11:48 Working with Multiple Files
18:06 Practical Use Cases and Conclusion

All Interesting Videos:

Рекомендации по теме
Комментарии
Автор

Amazing combo you introduced in this video, truly impressive! Honestly, it feels like we've finally cracked one of the century's biggest challenges: understanding PDFs. We all know how ugly PDFs can be, but now this solution is unbelievable.

I’ve got this thought on RAG though, within a single document, it doesn’t seem to make much sense anymore. But for a collection of documents? Absolutely. Imagine we’ve got 100 or even thousands of PDFs. We could create short summaries for each one, and store those in a vector database. When a user asks a question, we could use an embedding model to identify which documents to load into something like Gemini’s context caching.

This approach would make RAG more about indexing and directing the system to the right documents. So, even though chunking might become less important, all the other strategies still hold.

This could be a great topic for your next video, handling thousands of PDFs, creating summaries, building a vector database, and then using RAG to select relevant content, which you then pass to Gemini to cache and then process user query.

unclecode
Автор

*𝓣𝓲𝓶𝓮𝓼𝓽𝓪𝓶𝓹𝓼 𝓫𝔂 𝓘𝓷𝓽𝓮𝓵𝓵𝓮𝓬𝓽𝓒𝓸𝓻𝓷𝓮𝓻*

0:00 - Introduction to Prompt Caching with Claude and Gemini API
1:12 - Gemini API Capabilities and PDF Processing
2:45 - Considerations When Uploading PDFs to Gemini API
4:40 - Comparison of Gemini API with RAG Pipelines
6:46 - Processing PDF Files with and without Context Caching
9:50 - Testing Gemini API's Multimodal Capabilities
15:29 - Using Context Caching with Gemini API
18:31 - Conclusion and Practical Use Cases for Context Caching vs. RAG

IntellectCorner
Автор

Thanks for the very interesting video. Would it be enough to store the name of the cache (name='cachedContents/hash-value', ) to be able to use it later for the next request to my bot?

uwegenosdude
Автор

so... in RAG data are stored in ssd/hdd
meanwhile context caching data are stored in RAM?

RickySupriyadi
Автор

Why not use results caching at home, i don't waste calls to paid services.

saxtant
Автор

insider said, 10 million context length is possible.

NLPprompter
Автор

Thanks for effort! appreciate it.
@Prompt Engineering

ahmadzobairsurosh
Автор

APIs are okay for some assistants, but I want to run things locally.

NoidoDev
Автор

i i want to upload tons of .txt or .json files and upload it, there is around 5gb (text only) for a specific field the information data is on github to download what can i do?

darkmatter
Автор

I made my own RAG, local/Offline/Private, utilizing one of the available LLM models. It can process infinity number of docs. Has features that don't exist in any of the best current known ChatGPTs. I can get different answers' lengths. Accuracy of retrieved answers is like 100%. The only downside is time! Depending on the desired answer length, user can get the response anywhere between 5 sec to 25 minutes.
And, NO, not going to share it, just bragging here! I might sell it.

userrjlyjg
Автор

Hey I wanted to generate ai size chart generator for apparel sellers

1) it should cluster similar users with body measurements and successful purchased/ return data

Recommend size to seller


Possible with RAG. Or will have to use ML?

CryptoMaN_Rahul
Автор

You didn't mention this time the lifetime of cache, why?

yesweet
Автор

please do the workflow to automate leetcode to solve with claude api 9usd and i will pay you patreon the 9usd back but i want to learn, as the guy who solved 600 problems in 24h

darkmatter
Автор

I'm hating all of this API talk. People really think using API through mega company artificial intelligence is a good idea? Surely they are using the data exchanged at API as material for their artificial intelligence. People really need to build their own from scratch. Most people can't build their own home and car, but fortunately and unfortunately, artificial intelligence needs to be user developed. It's the safest way and prevents any doomsday scenarios.

imaspacecreature