用户用 Claude 与 Ollama 本地批量处理
一名 Reddit 用户让 Claude 生成本地 Python 工作流,用于提取桌面游戏 PDF 记录表,并加入进度显示、中断恢复、测试和可选本地 AI。用户称,Ollama 驱动的脚本约一小时处理了 4,200 张记录表,但仍需约 10 至 11 次智能体运行来完成分类、检查和整合。这些数据属于个人经验,并非独立测量的基准测试。
该案例展示了一种实际工作流:由 Claude 设计自动化工具,再由本地模型在智能体循环之外执行重复的大规模任务。
I'm a noob to using Claude (and using agentic AI in general,) but one tip I can give to other noobs is the above -- tell Claude to build tools that can be run locally when you're gathering and processing large batches of data, doing extensive simulation runs, or other stuff that doesn't require intelligence to guide it once the process starts.
In my current project I was having claude ingest PDF record sheets from a tabletop game. It took a relatively long time due to tool runs, and it was certainly not nothing when it came to token usage. I got about 600 sheets processed over a few days, and it did a pretty decent job, but there were still dozens of bits that it had queued up for me to check by eye. Then I realized that I was being stupid.
I told claude to whip me up a script to do everything that could be done locally, show its progress, ensure it would resume if interrupted, and run any tests and cross-checks that it could do independently. I also told it to use local AI if that would help. After downloading Ollama and running a .bat as it told me to, about five minutes later I had a python script, twenty minutes after that Ollama finished downloading models, and then about an hour after that the script finished tearing through about 4200 record sheets. It'll still take probably another 10-11 agent runs to classify, check, and integrate everything, but that's far cheaper than how it was going before.