AI 说报告做好了,为什么用户还是打不开?
如果 AI 告诉你“报告已经生成”,还附上一条下载链接,你会觉得任务完成了吗?
我们在开发 ETF Agent 时遇到过相反的情况:一次研究已经保存了五份 HTML 报告,最终回答也给出了链接,但五次下载都返回 404。另一次任务中,Python 多次执行,计算和渲染也有成功记录,最后却没有成功导出文件。
这些故障提醒我们:代码执行成功、文件保存成功、用户拿到能打开的报告,是不同的事实。
一条链接,背后有好几步
把报告交给用户,至少要经过生成内容、导出、保存、确认访问权限、下载和打开。每一步都有自己的结果。
例如,Python 在临时工作区写出了文件,只能说明那一步写出了文件;如果没有完成导出,它还不是用户的附件。文件即使已经存好,下载接口也可能因为身份、路径或其他问题没有把它交给用户。
因此,模型说“做好了”不是最后的验收。更有意义的检查是:用户通过正常入口,能不能拿到正确的文件,文件能不能打开。
历史报告为什么会突然变成 404?
上面那五份报告的排查中,问题出在下载环节:系统用“当前持仓数据是否仍然新鲜”去重新判断一份已经保存的历史报告。持仓快照发生变化后,历史文件因此被拒绝读取。
但查看旧报告和重新计算今天的持仓,是两件不同的事。旧报告需要保持原来的内容和身份;下载时仍要检查当前用户是否有权读它,却不应把“今天的行情和持仓是否最新”当作旧文件存在与否的判断。
这不是说可以跳过权限,也不是说历史报告永远能下载。它说明不同问题需要不同证据:访问资格、文件是否完整、数据是否新鲜,各自回答不同的问题。
好看的页面,不等于真正的交付
早期我们曾为周报做专用生成器,也试过严格限制 HTML 样式。前者带来重复的接线和参数,后者把一些普通排版当成危险内容,模型不得不花时间修改本来无害的样式。
后来我们把重点放回用户要的结果:研究方法可以针对周报,文件生成、保存和下载则尽量复用已有的交付路径。安全检查仍然关注脚本、危险资源加载和权限等实际效果,而不是只接受一种预设外观。
这里也有一个经验:固定模板不自动等于易读。我们曾看到一份报告在窄手机屏幕上产生严重的横向溢出;文件能打开只是第一步,还需要在真实阅读场景里检查体验。
成功应该说到哪一步?
技术站原文记录过一条真实模型驱动的 Child、Python、HTML 导出和主任务下载路径,也记录了统一路径下的保存、认证下载和浏览器打开。这说明相关链路曾经走通;它不等于所有变体都在真实研究中复验,也不能证明报告里的金融分析一定正确。
比起一句笼统的“成功”,更有帮助的说法是:内容已生成、文件已保存、下载已验证、浏览器已打开。没有验证到的那一步,就继续保留为未验证。
你用 AI 生成文件时,遇到过“它说完成了,但你实际拿不到”的情况吗?
本文根据 ETF Agent 技术站原文整理。更多工程实践见 GitHub 文章仓库,欢迎交流和 Star。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
AI said the report was ready. Why can't the user open it?
If AI tells you "the report has been generated" with a download link, do you think the mission is complete?
We have experienced the opposite in the development of ETF Agent: a study has saved five HTML reports and finally the answer has been linked, but all five downloads have returned 404. In another task, Python performed several times, with a record of success in computing and rendering, and ultimately with no success in exporting documents.
These failures remind us that the success of code implementation, the success of file preservation and the availability of open reports by users are different facts.
A link. A few steps behind it.
Submit the report to the user, at least by generating content, exporting, storing, confirming access to permission, downloading and opening. Each step has its own results.
For example, the fact that Python wrote a document in the temporary workspace only indicates that the document was written at that stage; if the export was not completed, it was not an annex to the user. Even if the document is stored, the download interface may not be given to the user because of identity, path or other problems.
Therefore, the model states that "good" is not the last acceptance check. More meaningful checks are whether users can get the right documents through the normal entrance and whether they can open them.
Why did the history report suddenly turn into 404?
In the inventory of the five above reports, the problem arises in the download chain: the system re-judges a historical report that has been kept using “is the current hold data still fresh”. As a result of the change in the hold-up snapshot, historical documents were denied access.
But looking at old reports and recalculating today's holdouts are two different things. The old report needed to be kept in its original content and identity; the download should still check whether the current user had the right to read it, but should not consider “the latest of today's events and holdouts” as a test of the existence of the old document.
This is not about skipping permission, nor about always downloading history reports. It indicates that different questions require different evidence: eligibility for access, completeness of documentation, availability of data, and different answers.
Nice page. It doesn't mean real delivery.
We made a dedicated generator for the weekly paper in the early days and tried to limit the HTML style. The former brings repetitive lines and parameters, while the latter treats general layouts as hazardous content, and models have to take time to modify otherwise harmless patterns.
We then focused back on the results that users wanted: research methods could target weekly reports, and documents could be generated, stored and downloaded using existing delivery paths as much as possible. Security checks continue to focus on the practical effects of scripts, loading of hazardous resources and permission, rather than accepting only a pre-set appearance.
Here is another experience: fixed templates are not automatically readable. We have seen a report generate a serious horizontal spill on narrow mobile screens; the opening of documents is only a first step, and there is a need to examine experiences in real reading scenes.
What should we say about success?
The technology station records in the original language the path of a real model-driven Child, Python, HTML export and main task download, as well as the preservation, authentication download and browser opening under the unified path. This indicates that the link has been made; it does not mean that all the variables are repeated in real research, nor does it prove that the financial analysis in the report is necessarily correct.
It is more helpful to say than a general “success” that the content has been generated, the document has been saved, the download has been validated and the browser has been opened. If that step is not verified, it is retained as unverified.
Did you ever experience "it says it's done, but you can't get it" when you created the file with AI?
This post is based on the original version of the ETF Agent technology station. For more engineering practice see GitHub article warehouse, welcome communication and Star.
Auto-fetched and translated by AI Atlas. All rights belong to the original author.