LlamaIndex搞了个小技巧,让Claude读PDF省了37%的钱,还更准。用的是开源LiteParse,直接就能用。
LlamaIndex团队为Claude Code开发了LiteParse技能,通过避免重复解析、关闭OCR、减少grep操作等优化,使PDF处理成本降低37%,准确率提升。LiteParse完全免费开源,可直接集成使用。博客和代码均已在GitHub上公开。
We made Claude better and faster at understanding PDFs The trick isn’t just creating the fastest fr...
We made Claude better and faster at understanding PDFs The trick isn’t just creating the fastest free document parser out there (with liteparse), but also *tuning the skill itself* so that Claude Code can use it with fewer turns and expensive file operations. This is a fantastic blog post by @itsclelia which dives into the decision traces of Claude Code in how it operates over your filesystem, and identifies opportunities for optimization. We were able to incentivize the right skill behavior by doing the following: ✅ Preventing expensive mistakes like re-parsing the PDF for every search, leaving OCR on, reading screenshots when unnecessary, and preventing huge grep dumps ✅ Providing a simple BM-25 backed retrieval on parsed text ✅ Reducing the number of `grep` and `seq` sequential turns to reduce latency The net result is that we are 37% cheaper and higher accuracy than using Claude Code over raw PDFs. LiteParse is fully free and open-source, and you can plug in the skill today! Blog: llamaindex.ai/blog/building-… Repo: github.com/run-llama/lite… LlamaIndex 🦙 @llama_index How much can good documentation save an AI agent in cost and time? Turns out, a lot. We built a custom skill that teaches Claude how to parse PDFs more efficiently, then used real usage traces to find where it was wasting time and money (re-reading the same file over and over, taking unnecessary "screenshots" of pages, etc.) After a few rounds of fixes based on what we observed, the results vs. just having Claude read PDFs the default way: → 37% lower cost per question → Better answer quality across the board → Fewer wasted steps The big takeaway: look at what an agent actually leaves in its traces, and fix bottlenecks from there. Full case study 👉️ llamaindex.ai/blog/building-… m Benchmark code 👉 github.com/run-llama/benc… m5 🔗 View Quoted Tweet 💬 1 🔄 4 ❤️ 12 👀 758 📊 4 ⚡