How to Boost RAG Accuracy with SmolAgents & BM25

Опубликовано: 26 Март 2026
на канале: Trelis Research
3,862
108

🔑 Lifetime access to ADVANCED-inference Repo (incl. future additions): https://trelis.com/ADVANCED-inference/
🛠 Tools (Fine-tuning, Vision, Audio, Inference): https://Trelis.com
💡 Consulting (Technical Assistance OR Market Insights): https://forms.gle/2VXzrBzpvm1BmG6e7
🤝 Join the Trelis Team: https://trelis.com/developer-collabor...
💸 Grants Program: https://trelis.com/trelis-ai-grants/
📧 Newsletter: https://trelis.substack.com
📸 Thumbnail made with this tutorial:    • Fine Tune Flux Diffusion Models with Your ...  

VIDEO LINKS:
SmolAgents Blog: https://huggingface.co/blog/smolagents
SmolAgents Tools: https://huggingface.co/docs/smolagent...

TIMESTAMPS:
00:00:00 - Introduction to using agents for document retrieval
00:00:14 - Three key insights about function calling and embeddings
00:01:00 - Explanation of traditional function calling approach
00:01:38 - Introduction to SmolAgents and code execution
00:02:24 - Discussion of HuggingFace's safe Python environment
00:02:57 - Demo of SmolAgents basic implementation
00:04:08 - Setup instructions for running the code
00:06:04 - Explanation of document preparation and Markdown conversion
00:10:28 - Discussion of table of contents generation
00:13:40 - Introduction to BM25 retrieval tool
00:19:20 - Implementation details of BM25 search
00:24:40 - Setup of document section reading tool
00:29:20 - Explanation of section retrieval implementation
00:33:40 - Demo of BM25 retriever tool
00:37:20 - Integration of section reading tool
00:40:40 - Demonstration of combined tools with Claude model
00:47:55 - Testing with different language models
00:52:43 - Summary and conclusion of tutorial
00:54:02 - Mention of future improvements needed for context management