Reading view

There are new articles available, click to refresh the page.

Textovert 1.1 can now convert PDF files to other formats

As promised last week, I have now produced a new version of Textovert that can extract text from PDF files and convert that to any of the nine formats supported by the app. Testing here suggests this could be generally useful, as the quality of output files appears good, and worth the small effort in conversion.

This new version offers the same conversions as the first, using textutil, but handles PDF files with a .pdf extension (case-insensitive) differently. When converting them to plain text, it loads the PDF and uses Quartz 2D’s PDF engine to extract the text for saving as a text file. When the output format is set to Rich Text (RTF), it uses the same engine to extract styled text and saves that as an RTF file. Note that doesn’t include layout information, but is generally a fairly faithful representation of the styles used in the original.

For the seven other output formats, Textovert first extracts styled text into a temporary RTF file, then hands that over to textutil to convert it to the selected output format.

Each PDF conversion is handled in a separate thread running at a high QoS in the background, to avoid blocking the main thread. As large conversions can take many seconds or even minutes to complete, Textovert’s window tracks how many are running at the moment. That’s most useful when converting batches of PDFs, when it’s easy to forget the last one or two that are still in progress.

Because each conversion gets its own thread, multiple simultaneous conversions will occupy as many CPU cores as are available, as shown in this CPU History for my seven heavyweight test PDFs. At the left of each chart the CPU % rises rapidly as all seven conversion threads are active. As those complete, the bursts of CPU activity diminish until they are from the single thread converting the largest of the PDFs.

Among those test PDFs are:

  • A 527-page book of 10.9 MB
  • A 5,754-page ISA reference of 14.7 MB
  • An 867-page book of 18 MB
  • A 141-page software manual of 24.4 MB
  • A 12,940-page reference manual created using FrameMaker 2019 and Adobe Acrobat Distiller 23.0 on Windows of 76.6 MB size, © 2013-2023 Arm Limited.

To give you an idea of the quality of output, this is a tiny excerpt of the last of those in its original PDF:

And this is the webarchive output from Textovert viewed in Safari:

Converting PDFs does require significantly more memory than those performed by textutil alone. For most documents of more modest size, 100-500 MB is usual, but my monster test PDFs usually rise toward 5 GB during their conversion. I have checked this version for memory leaks, and although it can hold onto some memory longer than I would have expected, that doesn’t continue to rise, and no leak is apparent.

Because PDF conversions are more intricate, I have added extensive error-reporting. For example, if you try to convert a PDF containing scanned images without any recognised text, that won’t have any recoverable text available, as will be reported in the main window. Once conversion is complete, Textovert tries to delete the intermediate RTF file from temporary storage, and if that fails, you’ll be warned.

Textovert version 1.1 for macOS 14.6 and later is now available from here: textovert11
from Downloads above, and from its Product Page.

I hope you find it useful.

Explainer: PDF format

Yesterday’s explainer covered a range of text formats, but stopped short of one of the most popular formats for text documents, Adobe’s Portable Document Format, PDF. Its origins are as old as the Mac, and it hasn’t changed much since the start of this century, so PDF is very different from the more recent file formats, and from its antecedent PostScript.

PostScript

PostScript files, with the extension .ps, start with a prologue containing metadata such as
%!PS-Adobe-3.0
%%Title: c:\output\online.dvi
%%Creator: DVIPSONE 0.8 1991 Nov 30 16:22:12 SN 102
%%CreationDate: 1992 Mar 26 10:04:36

They then largely consist of dictionaries of PostScript programs, instructions that are to be used to construct the page being described, such as
%%Page: 3 4
dvidict begin bp % [3]
38811402 d U
-34996224 d u
-1582039 d U
29614244 r
f2(3)s O o
34996224 d u
-34340864 d u
8708260 r(of)s
185088 W(abstractions,)s
191757 X(such)S(as)S(\\mixed)S(blessing")S(and)S(\\retaliation,")T(in)S
(semantic)S(nets)S(that)s o

and so on. These place each item of text and graphics on that page. PDF is completely different in that it consists of a tree of objects, sometimes many hundreds or thousands of them.

PDF

To be recognised as a PDF file, the first line must start with the ‘magic’ characters and give the version used:
%PDF-1.3
followed by a short line of non-ASCII bytes. It may appear surprising that macOS still writes a version that was defined in 1999, when the current version is 1.7 (before ISO standardisation) or 2.0 (standardised), and the Quartz 2D PDF engine may also report version 1.4. At least these ensure wide compatibility.

Then follows the main data, as a series of objects arranged in a flattened tree structure, starting like
3 0 obj
<< /Filter /FlateDecode /Length 158 >>
[…stream length 158…]

with a binary stream of data, which is here compressed using the Flate method (an improvement on LZW), terminated by
endobj
which defines object number 3.

Some objects consist of code or definitions, such as
1 0 obj
<< /Type /Page /Parent 2 0 R /Resources 4 0 R /Contents 3 0 R /MediaBox [0 0 595 842]
>>
endobj

which is a Page dictionary.

Somewhere towards the end of the file, you’re likely to find an object containing metadata, such as details of the PDF engine that built the file:
11 0 obj
<< /Title (Untitled) /Producer (macOS Version 26.1 \(Build 25B78\) Quartz PDFContext)
/Creator (DelightEd) /CreationDate (D:20251126211410Z00'00') /ModDate (D:20251126211410Z00'00')
>>
endobj

Right at the end of the PDF file comes the cross reference, which starts like
xref
0 12
0000000000 65535 f
0000000252 00000 n

and ends with a trailer
trailer
<< /Size 12 /Root 8 0 R /Info 11 0 R /ID [
] >>
startxref
8785
%%EOF

and that EOF marker ends the PDF file.

Problems

Objects, as elements on the page, can be laid out almost randomly, something that often makes converting laid-out columns of text so infuriating. PDF can just drop in blocks of text and images in whatever order they come, which often doesn’t coincide with the original flow in the text. As a PDF file proceeds one page at a time, multiple columns laid out over several pages can be particularly disastrous to extract as text, or to reconstitute in any other way.

PDF files are extremely verbose, and their contents are now largely unreadable due to the extensive use of binary streams of data, and all their supporting information. A document containing a single character may thus result in a PDF file of 160 lines, making even expansive XML files look concise in comparison. The example file used in yesterday’s article takes 9 KB in storage, for a total of only 11 PDF objects.

When a PDF file is changed by annotation, the contents of each annotation are added to the file as further objects. To save apps from having to rewrite the whole PDF file every time a change is made, changes can be appended to the end of the main file contents. Those can then be incorporated into the body by rewriting the file in ‘flattened’ form.

It’s also important to remember how old the roots of PDF are. The first volume of the Unicode standard 1.0 wasn’t published until 1991, and its introduction into Mac OS was long delayed after that. Consequently, PDF remains based on 8-bit extended ASCII text, with the main characters in a PDF file still being original 7-bit ASCII. Handling characters is generally accomplished by specifying individual characters in a specific font. This is why font substitution in PDF documents so commonly results in incorrect characters being displayed, with characters outside the extended ASCII set being most vulnerable. In worst cases, this mojibake can render entire documents incomprehensible.

Podofyllin 1.5 beta can export PDF to RTF

When I was developing my PDF reader Podofyllin, one of my goals was for it to be able to export from PDF to Rich Text Format. I never managed to get that to work, but in the light of your comments about supporting PDF as one of the convertible formats in Textovert, I revisited Podofyllin yesterday with the aim of adding that feature. And to my amazement it seems to work.

Before implementing any PDF conversions in Textovert, I’d be very grateful if you could test and comment on a beta of Podofyllin, which does now export PDF to RTF. If that code does a good enough job, then in the coming couple of weeks I will add PDF as one of the supported formats in Textovert, although that won’t rely so much on textutil as on my own code, and Quartz 2D support in macOS.

Podofyllin version 1.5 beta, build 38, adds a new command to its File menu to Export Rich Text. It also has printing disabled, as that has stopped working in recent versions of macOS, and needs repairs. I have disabled its update checking mechanism, so you won’t be pestered to ‘upgrade’ to version 1.4 when using this beta. Otherwise it retains all the features of version 1.4, and still has that Help book.

From my initial testing here the only significant oddity with the RTFs it writes may be small font sizes. There may be the occasional inappropriate use of a font, such as a line set in Courier in the midst of a paragraph in Helvetica, but those should be straightforward to correct. For small font sizes, I have simply selected all and used the Bigger font command to enlarge them all.

Podofyllin 1.5 beta, build 38, is now available from here: podofyllin15b
but not from anywhere else, for the time being. It requires macOS 11.5 or later.

Making the big presumption that PDF to RTF conversion proves worthwhile, this would make it possible to include PDF as one of the supported formats in Textovert. The snag is that would require the whole of any PDF document to be read into memory, before it could be converted to another format, in contrast to other formats where I suspect that textutil streams the input file during conversion. I don’t think there is any way to do that with PDF, because of its complex data structure.

So, if you think that this beta’s conversion of PDF to plain text and RTF is good enough to be useful, please let me know whether you want it built into Textovert, together with PDF to the other supported formats, or left in Podofyllin.

I wish you all a happy Thanksgiving, and thank you for your friendship, contributions and engagement.

Does Preview write PDF/A?

Earlier this week, when I considered how best to save websites using Safari, I pointed out that the PDFs it saves aren’t intended to be in archival format, using one of the PDF/A standards. As some of you pointed out, Preview has an option to export PDFs in “PDF/A” format. This article examines whether those are suitable for archiving.

PDF/A

PDF is a generic document type and includes a multiplicity of different standards. Standard PDF generated by the Quartz 2D engine should comply with PDF version 1.4, from 2001, although the first open ISO standard of 2008 was based on version 1.7, and the current ISO standard is version 2.0. There are also five specialised subsets of PDF, among them PDF/A intended for archival purposes, each with their own families of ISO standards.

PDF/A was originally based on PDF version 1.4, but more recently has adopted 1.7. Its standards impose additional restrictions on core features, such as requiring all fonts to be embedded, and forbidding the use of encryption and LZW compression. Its standards are based on three levels of conformance: basic (B), accessible (A), and full Unicode text (U). The two standards and levels in most common use are PDF/A-2A (accessible) and PDF/A-2B (basic). A more detailed account is given in Wikipedia’s article.

Although Preview claims to export PDF documents in PDF/A format, I’ve been unable to discover which standard or level those are intended to comply with. However, each of the test documents is reported by Adobe Acrobat CC (Pro) as claiming compliance with PDF/A-2B in ISO 19005-2.

Conformance

Three test PDF documents were used, two saved from Safari 26.1 (macOS 26.1) as detailed previously, and the Help book for LogUI, written by Nisus Writer Pro. All three were opened in Preview 11.0 (1113.2.5) and Exported As PDF/A, with just the Create PDF/A option ticked in the File Save dialog.

All three exported PDFs were then opened in Adobe Acrobat ‘Pro’ version 2025.001.20841. That reported that each claimed “compliance with the PDF/A standard”, so opened them read-only to ensure they couldn’t be modified. When each was verified against PDF/A-2B, that failed.

Details of the compliance failures were then obtained using Acrobat’s Preflight feature. In each there were multiple errors, such as those shown below.

To assess what changes were required to make the LogUI help book compliant with the standard, Acrobat then performed the conversion. Corrections it made are shown below.

Although those were quick and simple, without them the file exported from Preview wasn’t considered by Acrobat to comply with the standard.

When do you need to use PDF/A?

Although I’m confident that PDF documents created using the engine in Quartz 2D in macOS Tahoe will remain fully accessible for at least the next 20 years or more, looking 50 or 100 years ahead the use of a major open standard intended and widely used for archives becomes more important. Whether the imperfect PDF/A exported by Preview would make any difference to that is unclear.

If you intend any PDF documents created on Macs to be true archives that should stand the test of long times, then you should convert them into PDF/A-2B or another appropriate standard before committing them to archival storage. Otherwise, it’s moot whether Preview’s conversion is a good investment of your time.

Summary

  • According to Adobe Acrobat, the ‘PDF/A’ format exported by Preview doesn’t comply with its claimed standard of PDF/A-2B. Thus the answer to the question posed by the title is no, not quite.
  • If a PDF is intended to be accessible for decades into the future, it should be converted to a recognised PDF/A standard such as PDF/A-2B using Adobe Acrobat or an equivalent.
  • Other PDFs may as well be left in their original format, which should ensure their accessibility for at least the next 20 years or more.

How to save web pages using Safari

Websites come and go, and although the Internet Archive’s Wayback Machine provides a unique service by preserving so many, saving your own copies of pages remains important to many of us. This article looks at how you can do that using Safari 26, the current release for supported versions of macOS. If you want to explore the pages saved in the Wayback Machine, then its Safari extension is available free in the App Store.

Safari now offers the following five options for saving a page:

  • File/Save As…/Page Source to save it as an HTML source file (169 KB).
  • File/Save As…/Web Archive to save it as a Webarchive file (2.7 MB).
  • File/Save As…/PNG to save it as a PNG image (43.5 MB).
  • File/Export As PDF… to save it as a PDF file, in display format (31.6 MB).
  • File/Print…/Save as PDF to save it as a PDF file, in print format (28.1 MB).

Sizes given are those for a test page with plenty of images from here.

Page source

This is the smallest and least complete version of the five, as it contains just the HTML source of the page, omitting all linked and similar generated content. For relatively plain pages containing text exclusively, this can be useful. The saved file can be opened in Safari or another browser, and so long as none of the linked content is missing or changed, you should see the original content reconstituted, but in a flattened layout without columns or styling. This is unlikely to be suitable as a lasting record, although it’s by far the most compact at 169 KB for the test page.

Web Archive

This saves to a single opaque webarchive file containing the entire contents of the page, including embedded images and other content, but not linked downloadable files. Although this format is peculiar to Safari, it has had limited support by some other apps, but I can’t find any other current software that can give access to its contents.

A webarchive file is a (binary) property list written as a serialisation of the web page content in Safari, in a series of WebResource objects. For example, a JPEG image would consist of:

  • WebResourceData in Base-64 containing the image data;
  • WebResourceMIMEType of image/jpeg;
  • WebResourceResponse in Base-64 data;
  • WebResourceURL containing the URL to the file.

Although in theory it should be possible to recover some of its contents separately, in practice that isn’t available at present. In the past access has been supported by the macOS API, but all those calls to work with Webarchive files are now marked as being deprecated by Apple. Current API support is limited to writing but not reading them from WKWebView from macOS 11 onwards, and there’s no sign of that being extended.

Webarchive format has changed over time, and compatibility with different versions of Safari is unpredictable. When testing in virtual machines, Safari 18.6 proved incapable of opening any webarchive test file, including its own, while Safari 26.0 and 26.1 loaded webarchives written by Safari 18.6, 26.0 and 26.1. There has also been a long history of problems reported with webarchive files. Recent versions of macOS can display QuickLook thumbnails and previews of webarchives, although thumbnails aren’t particularly faithful to their contents.

Although webarchives should contain embedded images shown in the original page, those appear to be saved at the resolution they’re displayed in. This helps limit the size of files; in the case of the test page used here, that required 2.7 MB, around 10% of the size of a PDF, making them the most efficient option apart from plain HTML.

When they work, Safari Web Archives can provide excellent snapshots of web pages, but longer-term compatibility concerns make them unsuitable for archival use.

PNG

Saving the page to a PNG graphics file is a relatively new option in Safari. For the example page, that generates a 2,622 x 32,364 pixel image of 43.5 MB size, making it the largest of all.

The PNG image is a faithful replica of the page as viewed, although it can be affected by lazy loading (see below). Disappointingly, its text contents don’t appear to be accessible to Live Text, limiting its usefulness.

PDF

Safari provides two routes for turning a webpage into a PDF document: directly using the Export As PDF… menu command, and indirectly via the Print… command then saving as PDF from the Print dialog. The results are different.

safaripdf1

Exporting as PDF creates a document in which the entire web page is on a single PDF page, although it can spill over to one or two additional pages. The advantage of this is that the PDF is one continuous page without any breaks, and is a faithful representation of what you see in your browser, complete with its original layout and frames. The disadvantage is that this won’t print at all well, imposing page breaks in the most awkward of places. Very long pages can also prove ungainly, and difficult to manipulate in PDF utilities. The example page was 31.6 MB in size.

safaripdf2

Printing to PDF breaks up the web page into printable pages, and splits up frames. What you end up with isn’t what you see online, but could at a push be reassembled into something close to the original. That isn’t too bad when the placement of frames isn’t important to their reading, but if two adjacent columns need to appear next to one another, this layout is likely to disappoint. It is the best, though, for printing, with headers and footers and page numbering as well. The example page was slightly smaller than the single-page version, at 28.1 MB.

While PDF is one of the preferred formats for archiving laid-out documents, it’s worth bearing in mind that standard macOS PDF isn’t compliant with any of the PDF/A standards for archival documents. You’d need a high-end PDF editor such as Adobe’s Acrobat (Pro) CC to prepare and save to any of those.

Despite being ancient and inefficient, PDF normally does a good job of preserving the original format and layout. Text content is preserved, if laid out erratically, making it ideal for content search. Thus, either of the PDF options is best-suited for archiving web pages from Safari.

Lazy loading

Recent versions of Safari appear to load pages lazily, only inserting some images and other included content when scrolled. If you save that page to PNG or PDF without scrolling to the end of the page, the resulting file may skip those images that haven’t yet been loaded. Check the file when it has been saved to ensure that all enclosures have been captured successfully.

Conclusions

  • Save As…/Page Source is of limited use, mainly for text-only pages without embedded content.
  • Save As…/Web Archive can be excellent for day-to-day use, being complete and faithful, but isn’t an open standard and can prove fragile. It’s therefore not recommended for critical or archival use.
  • Save As…/PNG is of limited use, as its images are largest and their content least accessible.
  • Export As PDF… is excellent for day-to-day use, complete and faithful, but for serious archival use needs to be converted to comply with an archival standard in the PDF/A series.
  • Print…/Save as PDF is an alternative more suitable if you want to print the document out.
  • Before saving to PDF or PNG ensure you scroll through the whole page, then afterwards check the saved document contains everything it should.

Anthropic 官方团队分享如何利用 Claude Code

DUN.IM BLOG

DUN.IM BLOG

我们还年轻,可不想看到这个世界处在毫无自由、隐私的边缘。

Anthropic 的内部团队正在利用 Claude Code 彻底改变他们的工作流程。无论是开发者还是非技术人员,都能借助它攻克复杂项目、实现任务自动化,并弥补那些曾经限制生产力的技能鸿沟。

为了深入了解,我们采访了以下团队:

通过这些访谈,我们收集了不同部门使用 Code 的方式、它对工作带来的影响,以及为其他考虑采用该的组织提供的宝贵建议。

数据基础设施团队负责为公司内所有团队整理业务数据。他们使用 Code 来自动化常规的数据工程任务、解决复杂的基础设施问题,并为技术和非技术团队成员创建文档化工作流,以便他们能够独立访问和操作数据。

利用截图调试 Kubernetes

当 Kubernetes 集群出现故障,无法调度新的 pod 时,团队使用 Code 来诊断问题。他们将仪表盘的截图喂给 Claude Code,后者引导他们逐个菜单地浏览 Cloud 的用户界面,直到找到一个警告,指出 pod 的 IP 地址已耗尽。随后,Claude Code 提供了创建新 IP 池并将其添加到集群的确切命令,整个过程无需网络专家的介入。

为财务团队打造纯文本工作流

工程师向财务团队成员展示了如何编写描述其数据工作流程的纯文本文件,然后将这些文件加载到 Claude Code 中,以实现完全自动化的执行。没有任何编程经验的员工只需描述“查询这个仪表盘,获取信息,运行这些查询,生成 Excel 输出”等步骤,Claude Code 就能执行整个工作流,甚至会主动询问日期等必要输入。

为新员工提供代码库导览

当新的数据科学家加入团队时,他们会被指导使用 Claude Code 来熟悉庞大的代码库。Claude Code 会阅读他们的 Claude.md 文件(文档),识别特定任务所需的相关文件,解释数据管道的依赖关系,并帮助新人理解哪些上游数据源为仪表盘提供数据。这取代了传统的数据目录和发现

会话结束时自动更新文档

在每项任务结束时,团队会要求 Claude Code 总结已完成的工作并提出改进建议。这创建了一个持续改进的循环:Claude Code 根据实际使用情况帮助优化 Claude.md 文档和工作流指令,使后续的迭代更加高效。

跨多个实例并行管理任务

在处理耗时较长的数据任务时,团队会为不同项目在不同的代码仓库中打开多个 Claude Code 实例。每个实例都能保持完整的上下文,因此即使在数小时或数天后切换回来,Claude Code 也能准确地记住他们当时正在做什么以及任务进行到哪里,从而实现了无上下文丢失的真正并行工作流管理。

无需专业知识即可解决基础设施问题

解决了通常需要系统或网络团队成员介入的 Kubernetes 集群问题,利用 Claude Code 诊断问题并提供精确的修复方案。

加速新员工上手

新的数据分析师和团队成员无需大量指导,就能迅速理解复杂的系统并做出有意义的贡献。

增强支持工作流

Claude Code 能够处理比人类手动审查大得多的数据量,并识别异常情况(例如监控 200 个仪表盘),这是人力无法完成的。

实现跨团队自助服务

没有任何编程经验的财务团队现在可以独立执行复杂的数据工作流。

编写详细的 Claude.md 文件

团队表示,你在 Claude.md 文件中将工作流程、和期望文档化得越好,Claude Code 的表现就越出色。当你拥有现成的设计模式时,这使得 Claude Code 在设置新数据管道等常规任务上表现卓越。

处理敏感数据时使用 服务器而非命令行界面

他们建议使用 服务器而不是 BigQuery 命令行界面,以便更好地控制 Claude Code 的访问权限,尤其是在处理需要日志记录或存在潜在隐私问题的敏感数据时。

分享团队使用心得

团队举办了分享会,成员们互相演示他们使用 Claude Code 的工作流程。这有助于传播最佳实践,并展示了他们自己可能没有发现的各种工具使用方法。

Claude Code 产品开发团队使用自家的产品来为 Claude Code 构建更新,扩展产品的企业级功能和 AI 智能体循环功能。

通过“自动接受模式”快速构建原型

工程师们通过启用“自动接受模式”(Shift+Tab)并设置自主循环,让 Claude 编写代码、运行测试并持续迭代,从而实现快速原型开发。他们将自己不熟悉的抽象问题交给 Claude,让它自主工作,然后在接手进行最后润色前,审查已完成 80% 的解决方案。团队建议从一个干净的 git 状态开始,并定期提交检查点,这样如果 Claude 跑偏了,他们可以轻松回滚任何不正确的更改。

同步编码开发核心功能

对于涉及应用程序业务逻辑的更关键功能,团队会与 Claude Code 同步工作,提供带有具体实现指令的详细提示。他们实时监控过程,确保代码质量、风格指南合规性和正确的架构,同时让 Claude 处理重复的编码工作。

构建 Vim 模式

他们最成功的异步项目之一是为 Claude Code 实现 Vim 快捷键绑定。他们要求 Claude 构建整个功能,最终实现中大约 70% 的代码来自 Claude 的自主工作,只需几次迭代即可完成。

生成测试和修复 bug

在实现功能后,团队使用 Claude Code 编写全面的测试,并处理在代码审查中发现的简单 bug。他们还使用 GitHub Actions 让 Claude 自动处理像格式问题或函数重命名这样的 Pull Request 评论。

代码库探索

在处理不熟悉的代码库(如 monorepo 或 API 端)时,团队使用 Claude Code 来快速理解系统的工作方式。他们不再等待 Slack 上的回复,而是直接向 Claude 提问以获取解释和代码参考,从而大大节省了上下文切换的时间。

更快的功能实现

Claude Code 成功实现了像 Vim 模式这样的复杂功能,其中 70% 的代码由 Claude 自主编写。

提升开发速度

该工具可以快速构建功能原型并迭代创意,而不会陷入实现细节的泥潭。

通过自动化测试提高代码质量

Claude 生成全面的测试并处理常规的 bug 修复,在减少手动工作的同时保持了高标准。

更好的代码库探索

团队成员可以快速熟悉 monorepo 中不熟悉的部分,而无需等待同事的回复。

创建自给自足的循环

设置 Claude 通过自动运行构建、测试和代码检查来自己的工作。这使得 Claude 可以更长时间地自主工作并发现自己的错误,尤其是在你要求 Claude 在编写代码之前先生成测试时效果更佳。

培养任务分类的直觉

学会区分哪些任务适合异步处理(外围功能、原型设计),哪些需要同步监督(核心业务逻辑、关键修复)。产品边缘的抽象任务可以用“自动接受模式”处理,而核心功能则需要更密切的监督。

编写清晰、详细的提示

当组件具有相似的名称或功能时,你的请求要极其具体。提示越好、越详细,你就越能信任 Claude 独立工作,而不会对代码库的错误部分进行意外更改。

安全工程团队专注于保障软件开发生命周期、供应链安全和开发环境安全。他们广泛使用 Claude Code 来编写和调试代码。

复杂基础设施调试

在处理事故时,他们将堆栈跟踪和文档喂给 Claude Code,并要求它在代码库中追踪控制流。这大大缩短了生产问题的解决时间,使他们能够在大约 5 分钟内理解问题,而手动扫描代码通常需要 10-15 分钟。

Terraform 代码审查与分析

对于需要安全审批的基础设施变更,团队将 Terraform 计划复制到 Claude Code 中,并提问“这会做什么?我会后悔吗?”。这创建了更紧密的反馈循环,使安全团队能够更快地审查和批准基础设施变更,减少了开发过程中的瓶颈。

文档综合与操作手册

Claude Code 吸收多个文档来源,创建 Markdown 格式的操作手册、故障排除指南和概述。团队将这些精简的文档作为调试实际问题的上下文,创建了比在完整知识库中搜索更高效的工作流程。

测试驱动开发工作流

他们摒弃了以往的“设计文档 → 粗糙代码 → 重构 → 放弃测试”模式,现在他们要求 Claude Code 提供伪代码,引导其进行测试驱动开发,并定期检查以在卡住时进行引导,从而产出更可靠、更易于测试的代码。

上下文切换与项目上手

在为现有项目(如用于安全审批工作流的 Web 应用“dependant”)做贡献时,他们使用 Claude Code 来编写、审查和执行存储在代码库中的 Markdown 格式的规范,从而能够在几天内做出有意义的贡献,而不是花费数周时间。

缩短事故解决时间

通常需要 10-15 分钟手动代码扫描的基础设施调试现在大约需要 5 分钟。

改进安全审查周期

需要安全审批的 Terraform 代码审查速度大大加快,消除了开发人员在等待安全团队批准时的阻塞。

增强跨职能贡献

团队成员可以在几天内为项目做出有意义的贡献,而不是花费数周时间来建立上下文。

更好的文档工作流程

从多个来源综合而成的故障排除指南和操作手册创建了更高效的调试过程。

广泛使用自定义斜杠命令

安全工程团队使用了整个 monorepo 中 50% 的自定义斜杠命令实现。这些自定义命令简化了特定的工作流程,并加快了重复性任务的速度。

Claude 先说

他们不再通过提出有针对性的问题来生成代码片段,而是告诉 Claude Code “边做边提交你的工作”,让它在定期检查的情况下自主工作,从而得到更全面的解决方案。

利用它进行文档处理

除了编码,Claude Code 还擅长综合文档和创建结构化输出。团队提供写作样本和格式偏好,以获得可立即在 Slack、 Docs 和其他工具中使用的文档,避免界面切换带来的疲劳。

推理团队负责管理在 Claude 读取你的提示并生成回复时存储信息的内存系统。团队成员,尤其是那些刚接触机器学习的人,可以广泛使用 Claude Code 来弥补知识差距并加速他们的工作。

代码库理解与新员工上手

在加入一个复杂的代码库时,团队严重依赖 Claude Code 来快速理解其架构。他们不再手动搜索 GitHub 仓库,而是询问 Claude 哪些文件调用了特定的功能,几秒钟内就能得到结果,而不是向同事求助或手动搜索。

包含边界情况的单元测试生成

在编写完核心功能后,他们要求 Claude 为其编写全面的单元测试。Claude 会自动包含被遗漏的边界情况,在几分钟内完成通常需要大量时间和精力的工作,就像一个他们可以审查的编码助手。

机器学习概念解释

没有机器学习背景的团队成员依赖 Claude 来解释模型特定的函数和设置。过去需要一个小时谷歌搜索和阅读文档的工作,现在只需 10-20 分钟,研究时间减少了 80%。

跨语言代码翻译

在用不同编程语言测试功能时,团队向 Claude 解释他们想要测试的内容,Claude 就会用所需的语言(如 Rust)编写逻辑,从而无需为了测试目的而学习新语言。

命令记忆与 Kubernetes 管理

他们不再需要记住复杂的 Kubernetes 命令,而是向 Claude 询问正确的语法,比如“如何获取所有 pod 或部署状态”,然后就能收到他们基础设施工作所需的确切命令。

加速机器学习概念学习

有了 Claude Code,他们的研究时间减少了 80%,历史上需要一个小时谷歌搜索的工作现在只需 10-20 分钟。

更快的代码库导航

该工具可以帮助团队成员在几秒钟内找到相关文件并理解系统架构,而不是依赖同事在几天内分享知识。

全面的测试覆盖

Claude 自动生成包含边界情况的单元测试,在保持代码质量的同时减轻了精神负担。

消除语言障碍

团队可以在不熟悉 Rust 等语言的情况下实现功能,而无需学习它。

首先测试知识库功能

尝试问各种问题,看看 Claude 能否比谷歌搜索更快地回答。如果它更快、更准确,那么它就是你工作流程中一个宝贵的时间节省工具。

从代码生成开始

Claude 具体的指令,让它编写逻辑,然后其正确性。这有助于在将其用于更复杂的任务之前,建立对该工具能力的信任。

用它来编写测试

Claude 编写单元测试可以极大地减轻日常开发工作的压力。利用这个功能来保持代码质量,而无需花费时间手动思考所有测试用例。

数据科学和机器学习工程团队需要复杂的 可视化工具来理解模型性能,但构建这些工具通常需要不熟悉的语言和框架的专业知识。Claude Code 使这些团队能够构建生产质量的分析仪表盘,而无需成为全栈开发人员。

构建 JavaScript/TypeScript 仪表盘应用

尽管对“JavaScript 和 TypeScript 知之甚少”,团队仍使用 Claude Code 构建了完整的 React 应用,用于可视化强化学习(RL)模型的性能和训练数据。他们让 Claude 控制从头开始编写完整的应用程序,比如一个 5000 行的 TypeScript 应用,而无需自己理解代码。这一点至关重要,因为可视化应用相对上下文较少,不需要理解整个 monorepo,从而可以快速构建原型工具,以便在训练和评估期间了解模型性能。

处理重复的重构任务

当遇到合并冲突或半复杂的文件重构时——这些任务对于编辑器宏来说太复杂,但又不足以投入大量开发精力——他们就像玩“老虎机”一样使用 Claude Code:提交当前状态,让 Claude 自主工作 30 分钟,然后要么接受解决方案,要么在不成功时重新开始。

创建持久性分析工具而非一次性笔记本

团队现在不再构建用完即弃的 Jupyter 笔记本,而是让 Claude 构建可重复使用的 React 仪表盘,这些仪表盘可以在未来的模型评估中重复使用。这很重要,因为理解 Claude 的性能是“团队最重要的事情之一”——他们需要了解模型在训练和评估期间的表现,而这“实际上并非易事,简单的工具无法从观察一个数字上升中获得太多信号”。

零依赖任务委托

对于完全不熟悉的代码库或语言中的任务,他们将整个实现委托给 Claude Code,利用其从 monorepo 中收集上下文并执行任务的能力,而无需他们参与实际的编码过程。这使得他们在自己专业领域之外也能保持生产力,而不是花时间学习新技术。

节省了 2-4 倍的时间

过去虽然可以手动完成但很繁琐的常规重构任务现在完成得更快了。

用不熟悉的语言构建了复杂的应用

尽管 JavaScript/TypeScript 经验极少,却创建了 5000 行的 TypeScript 应用

从一次性工具转向持久性工具

不再使用一次性的 Jupyter 笔记本,而是构建可复用的 React 仪表盘进行模型分析。

直接获得模型改进的洞见

第一手使用 Claude Code 的经验为未来模型迭代中更好的内存系统和用户体验改进提供了信息。

实现了可视化驱动的决策

通过先进的数据可视化工具,更好地理解了 Claude 在训练和评估期间的性能。

把它当作一台老虎机

在让 Claude 工作之前保存你的状态,让它运行 30 分钟,然后要么接受结果,要么重新开始,而不是试图费力去修正。重新开始的成功率通常比试图修复 Claude 的错误要高。

必要时为了简化而打断它

在监督过程中,不要犹豫,停下来问 Claude “你为什么这么做?试试更简单的方法。” 模型默认倾向于更复杂的解决方案,但对于简化方法的请求反应良好。

产品工程团队致力于开发如 PDF 支持、引用和网页搜索等功能,这些功能将额外的知识引入 Claude 的上下文窗口。在大型、复杂的代码库中工作意味着不断遇到不熟悉的代码部分,花费大量时间来理解特定任务需要检查哪些文件,并在进行更改前建立上下文。Claude Code 通过充当向导,帮助他们理解系统架构、识别相关文件并解释复杂的交互,从而改善了这种体验。

第一步工作流规划

团队将 Claude Code 作为任何任务的“第一站”,要求它确定在进行 bug 修复、功能开发或分析时需要检查哪些文件。这取代了传统上在开始工作前手动浏览代码库和收集上下文的耗时过程。

跨代码库独立调试

团队现在有信心处理不熟悉代码库部分的 bug,而无需向他人求助。他们可以问 Claude “你觉得你能修复这个 bug 吗?我看到的行为是这样的”,并经常能立即取得进展,这在以前由于所需的时间投入是不可行的。

通过内部测试进行模型迭代测试

Claude Code 自动使用最新的研究模型快照,使其成为他们体验模型变化的主要方式。这为团队在开发周期中提供了关于模型行为变化的直接反馈,这是他们在之前的发布中从未体验过的。

消除上下文切换的开销

他们不再需要复制粘贴代码片段并将文件拖入 Claude.ai,同时还要详细解释问题,现在可以直接在 Claude Code 中提问,无需额外的上下文收集,从而显著减少了心智负担。

增强了处理不熟悉领域的信心

团队成员可以独立调试 bug 并调查不熟悉代码库中的事故。

在上下文收集中节省了大量时间

Claude Code 消除了复制粘贴代码片段和将文件拖入 Claude.ai 的开销,减轻了心智上的上下文切换负担。

加速轮岗员工上手速度

轮岗到新团队的工程师可以快速熟悉不熟悉的代码库并做出有意义的贡献,而无需与同事进行大量咨询。

提升开发者幸福感

团队报告称,随着日常工作流程中的摩擦减少,他们感到更快乐、更高效。

将其视为迭代伙伴,而非一次性解决方案

不要指望 Claude 能立即解决问题,而是把它当作一个与你一起迭代的合作者。这种方法比试图在第一次尝试中就获得完美的解决方案效果更好。

用它来建立在不熟悉领域的信心

不要犹豫去处理你专业领域之外的 bug 或调查事故。Claude Code 使得在通常需要大量上下文建立的领域独立工作成为可能。

从最少的信息开始

从你需要的最低限度的信息开始,让 Claude 引导你完成整个过程,而不是一开始就提供大量的解释。

增长营销团队专注于在付费搜索、付费社交、移动应用商店、电子邮件营销和 SEO 等领域建立效果营销渠道。作为一个只有一人的非技术团队,他们使用 Claude Code 来自动化重复性的营销任务,并创建通常需要大量工程资源的 AI 智能体工作流。

自动化 Ads 广告创意生成

团队构建了一个 AI 智能体工作流,该工作流可以处理包含数百个现有广告及其效果指标的 CSV 文件,识别表现不佳的广告进行迭代,并生成符合严格字符限制(标题 30 个字符,描述 90 个字符)的新变体。通过使用两个专门的子智能体(一个用于标题,一个用于描述),该系统可以在几分钟内生成数百个新广告,而无需在多个广告系列中手动创建。这使他们能够大规模地进行测试和迭代,这是以前需要花费大量时间才能实现的。

用于批量创意制作的 Figma 插件

他们没有手动复制和编辑用于付费社交广告的静态图片,而是开发了一个 Figma 插件,该插件可以识别框架并通过替换标题和描述来以编程方式生成多达 100 个广告变体,将需要数小时复制粘贴的工作缩短为每批半秒。这使得创意产出提高了 10 倍,让团队能够在关键社交渠道上测试数量庞大的创意变体。

用于广告活动分析的 Meta Ads 服务器

他们创建了一个与 Meta Ads API 集成的 MCP 服务器,以便直接在 Claude Desktop 应用内查询广告活动表现、支出数据和广告效果,从而无需在不同平台之间切换进行性能分析,节省了宝贵的时间,因为每一分效率的提升都意味着更好的投资回报率。

利用内存系统进行高级提示工程

他们实现了一个基本的内存系统,该系统记录了广告迭代中的假设和实验,使得系统在生成新变体时能够将之前的测试结果纳入上下文,创建了一个自我改进的测试框架。这使得系统性的实验成为可能,而这些实验是无法手动追踪的。

在重复性任务上节省了大量时间

Claude Code 将广告文案创作时间从 2 小时缩短到 15 分钟,让团队能够专注于更具战略性的工作。

创意产出增加 10 倍

通过自动广告生成和与 Figma 集成以获取最新的视觉设计元素,团队现在可以在各个渠道上测试数量庞大的广告变体。

像一个更大的团队一样运作

团队能够处理传统上需要专门工程资源的大型开发任务。

战略重点转移

团队可以将更多时间用于整体战略和构建 AI 智能体自动化,而不是手动执行。

识别支持 API 的重复性任务

寻找涉及使用带有 API 的工具(如广告平台、设计工具、分析平台)进行重复操作的工作流程。这些是自动化的主要候选对象,也是 Claude Code 提供最大价值的地方。

将复杂工作流分解为专门的子智能体

不要试图在一个提示或工作流中处理所有事情,而是为特定任务创建单独的智能体(比如一个标题智能体和一个描述智能体)。这使得调试更容易,并在处理复杂需求时提高输出质量。

在编码前进行充分的头脑风暴和提示规划

在前期花大量时间使用 Claude.ai 来构思整个工作流,然后让 Claude.ai 为 Claude Code 创建一个全面的提示和代码结构以供参考。此外,要逐步进行,而不是要求一次性解决问题,以避免 Claude 因任务过于复杂而不堪重负。

产品设计团队支持 Claude Code、Claude.ai 和 Anthropic API,专注于构建 AI 产品。即使是非开发人员也可以使用 Claude Code 来弥合设计与工程之间的传统鸿沟,使他们能够直接实现自己的设计愿景,而无需与工程师进行大量的反复迭代。

前端润色和状态管理变更

团队不再为视觉调整(字体、颜色、间距)创建大量的设计文档并与工程师进行多轮反馈,而是直接使用 Claude Code 实现这些变更。工程师们注意到,设计师们正在进行“通常不会看到设计师做的大型状态管理变更”,这使他们能够实现他们所设想的精确质量。

GitHub Actions 自动化工单处理

通过使用 Claude Code 的 GitHub 集成,他们只需提交描述所需更改的问题/工单,Claude 就会自动提出代码解决方案,而无需打开 Claude Code,从而为他们积压的润色任务创建了一个无缝的 bug 修复和功能优化工作流。

快速交互式原型制作

通过将模型图粘贴到 Claude Code 中,他们可以生成功能齐全的原型,工程师可以立即理解并在此基础上进行迭代,这取代了传统的静态 Figma 设计,后者需要大量的解释和转换才能成为可用代码。

发现边界情况和理解系统架构

团队使用 Claude Code 来规划错误状态、逻辑流程和不同的系统状态,使他们能够在设计阶段就识别出边界情况,而不是在开发后期才发现,从而从根本上提高了他们初始设计的质量。

复杂的文案更改和法律合规

对于像在整个代码库中移除“研究预览”信息这样的任务,他们使用 Claude Code 查找所有实例,审查周围的文案,与法务部门实时协调更改,并实施更新。这个过程只用了两次 30 分钟的电话会议,而不是一周的反复协调。

核心工作流程的变革

Claude Code 成为主要的设计工具,80% 的时间里 Figma 和 Claude Code 都是打开的。

执行速度提高 2-3 倍

以前需要与工程师进行大量反复沟通的视觉和状态管理变更,现在可以直接实现。

周期时间从数周缩短到数小时

Google Analytics 发布信息这样需要一周协调的复杂项目,现在只需两次 30 分钟的电话会议就能完成。

两种截然不同的用户体验

开发者获得了“增强型工作流”(执行更快),而非技术用户则获得了“天哪,我竟然也成了开发者”的工作流。

改善了设计与工程的协作

Claude Code 促进了更好的沟通和更快的问题解决,因为设计师理解了系统的限制和可能性,而无需与工程师紧密合作。

从工程师那里获得适当的设置帮助

让工程团队的同事帮助进行初始的代码库设置和权限配置——对于非开发人员来说,技术上的上手过程具有挑战性,但一旦配置完成,它将彻底改变日常工作流程。

使用自定义内存文件来引导 Claude 的行为

创建具体的指令,告诉 Claude 你是一个几乎没有编码经验的设计师,需要详细的解释和更小、更增量的更改。这极大地提高了 Claude 回应的质量,使其不再那么令人生畏。

利用粘贴图片进行原型制作

使用 Command+V 将截图直接粘贴到 Claude Code 中。它在读取设计并生成功能性代码方面表现出色,使其在将静态模型图转化为工程师可以立即理解和构建的交互式原型方面非常有价值。

强化学习(RL)工程团队专注于 RL 中的高效采样和跨集群的权重迁移。他们主要使用 Claude Code 来编写中小型功能、进行调试和理解复杂的代码库,并采用一种包含频繁检查点和回滚的迭代方法。

有监督的自主功能开发

团队让 Claude Code 在提供监督的情况下编写大部分中小型功能的代码,例如为权重迁移组件实现认证机制。他们以交互方式工作,允许 Claude 主导,但在其偏离轨道时进行引导。

测试生成和代码审查

在自己实现更改后,团队会要求 Claude Code 添加测试或审查他们的代码。这种自动化的测试工作流程在常规但重要的质量保证任务上节省了大量时间。

调试和错误调查

他们使用 Claude Code 来调试错误,结果好坏参半。有时它能立即识别问题并添加相关测试,而其他时候则难以理解问题,但总的来说,在有效时仍能提供价值。

代码库理解和调用栈分析

他们工作流程中最大的变化之一是使用 Claude Code 来快速获取相关组件和调用栈的摘要,取代了手动阅读代码或生成大量调试输出。

Kubernetes 操作指导

他们经常向 Claude Code 询问 Kubernetes 操作,这些操作否则需要大量谷歌搜索或询问基础设施工程的同事,从而能立即获得配置和部署问题的答案。

实验性方法的实现

他们现在使用一种“尝试并回滚”的方法,频繁提交检查点,以便他们可以测试 Claude 的自主实现尝试,并在需要时进行回滚,从而实现了更具实验性的开发。

文档编写加速

Claude Code 自动添加有用的注释,节省了大量的文档编写时间,尽管他们也指出,它有时会在奇怪的地方添加注释或使用有问题的代码组织方式。

有限制的提速

虽然 Claude Code 可以在他们“相对较少的时间”投入下实现中小型 PR,但他们承认,它在第一次尝试中成功的几率大约只有三分之一,需要额外的指导或手动干预。

为特定模式自定义你的 Claude.md 文件

在你的 Claude.md 文件中添加指令,以防止 Claude 重复犯工具调用错误,例如告诉它“运行 pytest 而不是 run,不要不必要地 cd – 只需使用正确的路径”。这显著提高了一致性。

使用检查点密集的工作流

随着 Claude 进行更改,定期提交你的工作,这样当实验不成功时,你可以轻松回滚。这使得在没有风险的情况下可以采用更具实验性的开发方法。

先尝试一次性解决,然后协作

Claude 一个快速的提示,让它先尝试完整的实现。如果成功了(大约三分之一的时间),你就节省了大量时间。如果没有,再切换到更具协作性、引导性的方法。

法务团队通过实验和了解 Anthropic 产品的好奇心,发现了 Claude Code 的潜力。此外,一位团队成员有一个个人用例,即为家人创建无障碍工具和为工作创建原型,这展示了该技术对非开发人员的强大能力。

为家人定制的无障碍解决方案

团队成员为因医疗诊断而有语言障碍的家人构建了沟通助手。在短短一小时内,一个人使用原生的语音转文本功能创建了一个预测性文本应用,该应用可以建议回复并使用语音库将其读出,解决了言语治疗师推荐的现有无障碍工具的不足之处。

法务部门工作流自动化

团队创建了“电话树”系统的原型,帮助团队成员联系到 Anthropic 合适的律师,展示了法务部门如何在没有传统开发资源的情况下为常见任务构建自定义工具。

团队协调工具

经理们构建了 G Suite 应用程序,可以自动化每周的团队更新,并跟踪各产品的法律审查状态,让律师只需通过简单的按钮点击就能快速标记需要审查的项目,而无需管理电子表格。

用于解决方案的快速原型制作

他们使用 Claude Code 快速构建功能性原型,然后展示给领域专家(例如向加州大学旧金山分校的专家展示无障碍工具),以验证想法并在投入更多时间之前识别现有解决方案。

Claude.ai 中规划,在 Claude Code 中构建

他们使用两步流程:首先在 Claude.ai 中进行头脑风暴和规划,然后转到 Claude Code 进行实现,要求它放慢速度,逐步工作,而不是一次性输出所有内容。

视觉优先的方法

他们经常使用截图向 Claude Code 展示他们想要的界面样子,然后根据视觉反馈进行迭代,而不是用文本描述功能。

原型驱动的创新

他们强调克服分享“傻瓜式”或“玩具级”原型的恐惧,因为这些演示能激励他人看到他们未曾考虑过的可能性。

MCP 集成担忧

产品律师使用 Claude Code 立即识别深度 MCP 集成的安全隐患,并指出随着 AI 工具访问更多敏感系统,保守的安全策略将成为障碍。

合规工具的优先级

他们主张随着 AI 能力的扩展,应迅速构建合规工具,认识到创新与风险管理之间的平衡。

首先在 Claude.ai 中进行详尽规划

在转到 Claude Code 之前,使用 Claude 的对话界面来充实你的整个想法。然后要求 Claude 将所有内容总结成一个分步的实现提示。

增量式和可视化工作

要求 Claude Code 放慢速度,一次实现一个步骤,这样你就可以复制粘贴而不会不知所措。大量使用截图来展示你想要的界面样子。

尽管不完美也要分享原型

克服隐藏“玩具”项目或未完成工作的冲动。分享原型有助于他人看到可能性,并在通常不互动的部门之间激发创新。

ChatGPT – Deep Research 功能指南&技巧总结:从「进度条」到「提示词」,一次搞懂!

DUN.IM BLOG

DUN.IM BLOG

我们还年轻,可不想看到这个世界处在毫无自由、隐私的边缘。

最近有很多朋友在讨论:「Deep Research 的用量是怎么算的?」 又因为目前 Plus 每个月只能用 10 次,大家都非常担心浪费。其实一句话就能总结——只要开始出现 「Starting Research」 的进度条,就算使用了一次。在进度条出现之前,怎么问都不算。下面就为大家分享一些 Deep Research 的使用流程、注意事项和提示词模板,帮助大家更好地运用这一强大的研究功能。

一句话总结从开始出现 Deep Research 进度条就算一次,之前都不算

提出主题
你先要告诉 ChatGPT 需要研究什么主题。

ChatGPT 询问澄清问题
ChatGPT 通常会向你询问一些澄清问题,确保理解你的研究需求。

回答澄清,触发研究
当你回答了上述澄清问题后,ChatGPT 会再回复一条消息,并提示「将开始报告「,随后出现 」Starting Research「 的进度条。

注意:从这一步开始就会扣除一次 Deep Research 用量。

报告生成
研究进度条走完后,ChatGPT 会给你发送完整的报告,这标志着一次 Deep Research 流程的完成。

进度条出现后,你可以随时离开
进度条开始后,无论你是关闭窗口、刷新网页、切换到其他会话还是新开会话,都不会影响已经开始的 Deep Research 流程,它会在后台继续执行并最终生成报告。

Deep Research 可以后续追问
当报告生成结束后,如果你要继续追加信息重新生成报告,有两种选择:1). 直接提问,会使用你开始会话时选择的模型继续对话,报告内容可以作为上下文;比如说你从 GPT-4o 开始的,那么你在报告生成后,如果继续提问,实际上是 GPT-4o 基于你报告和提问内容回复,但是可能会受限于上下文长度无法完整理解报告内容;2). 重新生成新报告:Deep Research 是一次性生成的,但是你可以继续在当前会话选中「Deep research」按钮,这样可以把当前会话内容作为输入,或者把内容复制出去新开会话选中「Deep research」按钮重新开始一次新的生成。内容复制出去处理一下再生成会更好的对输入进行控制,但是麻烦一些。

无法追加新的信息让它继续深度研究。如果你在当前会话里继续追问,后续的回答将由其他模型(如 GPT-4o)接管。
如果你对报告不满意,需要重新修改提示词再新开一次会话进行 Deep Research。

灵活切换模型
你可以先选任何模型(如 o1 pro/o1 等),再让它进行 Deep Research。若后续还打算继续追问报告内容,建议在 Deep Research 开始前就选一个更强的模型(比如 o1 pro / o1)来进行分析。

选择信息源和报告语言

建议在提示词中加一句「请选择权威信息源」(并不一定要非英文来源不可,重点是权威信息源,这样可以过滤掉一些不好的信息源,当然你也可以加上「优先英文信息源」)。

如果希望报告是中文,直接在提示词末尾加一句「请形成中文报告「即可。

如果不小心生成了英文报告,又看着费劲,可以在当前会话,让它翻译,也可以复制完整内容,

ChatGPT – Deep Research 功能指南&技巧总结:从「进度条」到「提示词」,一次搞懂!

新建会话,选择 o1 pro 或 o1 模型(最佳翻译效果),翻译提示词参考:

「请将下面的内容用中文重写,尊重原意,保持格式不变无删减:」

引入外部资料的方法

如果报告需要访问收费网页上的内容,你可以手动复制成 Markdown,然后在提示词中用 XML 标签包起来。

如果有图片内容,直接上传即可。

如果要分析视频内容,需要先把视频转成文字,同样用 <transcript> 标签包住,再放进提示词里。

我一般会用 AIStudio 的 Gemini 转成文本

你可以一次粘贴几千行代码也没问题(用 XML 包起来),但要注意输入框粘贴有上限。如果太多,可以把代码放在公开的 GitHub 仓库,让 Deep Research 去分析链接即可。

写报告或写代码都行
Deep Research 不仅能写报告,还能写代码。只要你提示它「生成的结果是代码」,它就会尝试从网上搜索相关代码库并提供解决方案。

文献质量与报告质量
如果想让它「阅读」一本书并进行提炼,需要注意输入长度有限,无法直接输入一本完整的书。大部分流行书籍已经在模型中有训练数据,所以它会参考网上已有的书评。资料越多、质量越高,报告越漂亮;如果资料很少,它也无米下炊,生成的报告质量可能有限。

一个常见的提示词模板大致可分为背景信息任务要求、和输出格式三个部分。

在这里填写所有对它生成报告有帮助,但模型本身访问不到的信息,比如:

付费文章

视频文字稿

图片或 PDF(可作为附件)

其他任何对于生成有帮助的内容

当背景信息较多时,务必用 XML 标签包裹,避免 AI 混淆指令。例如:

主题:你希望分析、研究或讨论的具体范围

信息源:希望它检索的文献库、学术论文、政府网站、GitHub

研究要点:需要关注的核心点,是深度解析还是简要摘要

语言或风格:是中文、英文或其他语言?

语言:中文报告、英文报告或双语

数据格式:是否需要用表格呈现数据(它暂时画不了图表)

段落和标题:是否需要分级标题、索引等

提示词模板并不是必须的,可以随性一点,你可以把写提示词使用 Deep Research 当成去交代一个实习生帮你写分析报告,你怎么交代实习生就怎么写提示词

Deep Research 的使用次数:只要出现「Starting Research」进度条,就会扣除一次用量。

保持灵活:不满意就重新开始,新开会话前最好做好提示词规划。

结合大模型优势:如果要深入分析或后续追问,选用更强的模型如 o1 pro / o1 更合适。

慎重选择资料:外部资料要提前整理好,使用 XML 标签嵌入提示。

尊重版权、合理引用:在使用外部资料时,务必保留引用信息,切勿违规。

希望这篇文章能让你更好地理解和使用 Deep Research。在实际使用中,不妨多加尝试和探索,慢慢就能摸索出最适合自己的使用方式。祝大家玩得开心,也能高效地完成研究和写作任务!如有更多问题,欢迎在评论区留言交流。

总结

如果你想让 Deep Research 提供权威信息源,在提示词中加一句「请选择权威信息源」

如果要生成中文报告,只要在提示词里加「请形成中文报告」即可。

不小心生成英文报告且看着费劲,使用下面的提示词翻译:
「请将下面的内容用中文重写,尊重原意,保持格式不变无删减:」

欢迎大家在留言区分享你们的使用心得与经验,一起探讨 Deep Research 的更多玩法!

❌