Uploaded March 2025 | Updated September 2026, 2 weeks ago
While you can include a 1,000-page PDF file in a prompt request, the token usage is going to be extremely expensive, especially if you are using highly capable generative models like O1, Gemini Pro, or Sonnet, which might cost you a few dollars per request. By using RAG, you can reduce the cost by almost 100 times, even more so if you implement the correct RAG chunking strategy.
π Source Code (So you don't have to write all the code yourself)
β‘οΈ patreon.com/posts/123189712
π₯οΈ More on PydanticAI: https://ai.pydantic.dev/
π LanceDB Documentation: lancedb.github.io/lancedb
π» Also checkout:
β‘οΈ Getting Started With PydanticAI (youtu.be/H63RbTuHTy0)
β‘οΈ Create An Intelligent Web Scraping Agent With PydanticAI | Complete Tutorial (youtu.be/7tXSk31d9X0)
β‘οΈ Google Sheets AI Agent With PydanticAI | Complete Tutorial (youtu.be/tURxphunUyk)
π Show Your Support
β Paypal: paypal.me/jiejenn/5
β Venmo: @Jie-Jenn
π³ Patreon: patreon.com/JieJenn
βοΈ Business Inquiring: YouTube@LearnDataAnalysis.org
00:00 - Intro to RAG
02:57 - Chunking strategy types
09:37 - Install Python dependencies
10:00 - Set up RAG databse with LanceDB
17:20 - Test RAG database with PydanticAI Agent
#pydanticai #aiagent #agenticai
While you can include a 1,000-page PDF file in a prompt request, the token usage is going to be extremely expensive, especially if you are using highly capable generative models like O1, Gemini Pro, or Sonnet, which might cost you a few dollars per request. By using RAG, you can reduce the cost by almost 100 times, even more so if you implement the correct RAG chunking strategy.
π Source Code (So you don't have to write all the code yourself)
β‘οΈ patreon.com/posts/123189712
π₯οΈ More on PydanticAI: https://ai.pydantic.dev/
π LanceDB Documentation: lancedb.github.io/lancedb
π» Also checkout:
β‘οΈ Getting Started With PydanticAI (youtu.be/H63RbTuHTy0)
β‘οΈ Create An Intelligent Web Scraping Agent With PydanticAI | Complete Tutorial (youtu.be/7tXSk31d9X0)
β‘οΈ Google Sheets AI Agent With PydanticAI | Complete Tutorial (youtu.be/tURxphunUyk)
π Show Your Support
β Paypal: paypal.me/jiejenn/5
β Venmo: @Jie-Jenn
π³ Patreon: patreon.com/JieJenn
βοΈ Business Inquiring: YouTube@LearnDataAnalysis.org
00:00 - Intro to RAG
02:57 - Chunking strategy types
09:37 - Install Python dependencies
10:00 - Set up RAG databse with LanceDB
17:20 - Test RAG database with PydanticAI Agent
#pydanticai #aiagent #agenticai










