← 返回案例库
CUSTOMER STORY · 企业知识库怎么搭

索引器崩溃后,Claude 用 Unix 命令破解电子书格式并检索

Reverse-engineer a book file format to search it

Tools · 使用工具Claude
Source · 来源原作者 · Hacker News
Zaowuyun · 可参考能力资产库 + 上下文管理
01

谁在用

Who

一位 Claude 网页版用户(评论区分享)。

02

遇到什么问题

Challenge

把一本书上传到项目上下文,RAG 索引器处理该文件时崩溃。

03

怎么用 AI 解决

Solution
  1. Claude 使用一系列 Unix 命令分析出这本书的文件格式。
  2. 再用 grep 手动搜索内容。
04

结果如何

Results据原作者自述
  • Claude 绕过了崩溃的索引器,依然能检索这本书
  • 没有准确率、文件格式或耗时细节;未说明用户是否提示了这些步骤

以上内容均由原作者自行报告,未经独立核实,也不代表造物云产品的效果。

05

提示词

Prompt

参考提示词(由 agentusecases.ai 整理为模板,非原帖原文)

中文

【文件路径】中有一个我的工具读不了的文件,是一本【书/文档,已知格式】。用命令行工具检查其结构、判断格式,把可读文本提取为纯文本文件。然后搜索【主题或短语】并给我看结果。

ENGLISH

I have a file at [path to file] that my tools can't read properly, and it is a [book/document, format if known]. Use command-line tools to inspect its structure, work out the format, and extract the readable text into a plain text file. Then search it for [topic or phrase] and show me the matching passages with their locations. Don't modify the original file.