ETF Agent Separates Daily Research Generation From Saved Readback
An engineering article describes an ETF Agent design that separates personalized daily research generation from reading saved results: read-only requests return existing results, while explicit generation requests create or retry research. The design uses a user-and-server-UTC-date key for deduplication, PostgreSQL session-level advisory locks, and a separate limited connection pool for long-held locks so they do not exhaust the pool used by normal queries. It also distinguishes states such as not generated, in progress, successful with no selected items, failed, and saved but unreadable. A source-projection fix allows a card to retrieve the sources explicitly linked to its original research without rewriting the body or rerunning the model. The article also states that the public Open ETF Agent v0.15.2 lacks the account-level daily selection, database generation lock, and scheduled-result integration described in it.
The article documents concrete engineering patterns for keeping saved AI research reusable, controlling concurrent generation, preserving source-to-result bindings, and separating resource-intensive locks from normal database operations. It also cautions that displaying cards or preserving citations does not establish recommendation quality or novelty.
用户早上打开首页,看到几条与自己关注方向有关的研究。午饭后再次打开,内容还在;晚上点进其中一条,准备继续追问。
从界面看,这似乎只是几张卡片。最直接的实现也很诱人:读取用户偏好,拼接“请生成今天值得关注的内容”,把结果放进页面。
但页面刷新算不算再次授权模型花费?两台设备同时打开,会不会生成两份?用户只看到一张卡,它的引用为什么可能来自另一张卡?同一天修改关注主题,先前结果应该保留还是重做?
每日研究的难点,是把一次有明确归属的研究,变成可以反复阅读的产品结果,而不是让每次阅读都重新启动一轮推理。 以下先沿首页的一天解释设计,再展开两个在工程验证中出现过的具体问题。
图示主题:每日研究的生成、去重和回读关系。概览按职责组织,不是某次任务的真实调用记录。 完整配图见文末原文链接。