ai-tech-summary

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

AI Tech Summary

AI Tech 摘要

Core Goal

核心目标

  • Pull the right records and fields for a requested time range.
  • Package evidence into a compact JSON context for RAG.
  • Let the agent synthesize final summary text from retrieved evidence.
  • Support daily, weekly, monthly, and custom time windows.
  • 提取请求时间范围内的正确记录和字段。
  • 将证据打包为适用于RAG的紧凑JSON上下文。
  • 让Agent基于检索到的证据合成最终摘要文本。
  • 支持每日、每周、每月及自定义时间窗口。

Triggering Conditions

触发条件

  • Receive requests for daily, weekly, or monthly digests.
  • Receive requests for arbitrary date-range summaries.
  • Need evidence-grounded summary output from RSS entries/fulltext.
  • Need agent-generated summary style rather than rigid scripted report format.
  • 收到生成每日、每周或每月摘要的请求。
  • 收到生成任意日期范围摘要的请求。
  • 需要基于RSS条目/全文生成有证据支撑的摘要输出。
  • 需要Agent生成的摘要风格,而非僵化的脚本化报告格式。

Input Requirements

输入要求

  • Required tables in SQLite:
    feeds
    ,
    entries
    (from
    ai-tech-rss-fetch
    ).
  • Optional table:
    entry_content
    (from
    ai-tech-fulltext-fetch
    ).
  • Shared DB path should be the same across all RSS skills.
  • In multi-agent runtimes, set
    AI_RSS_DB_PATH
    to one absolute DB path for this agent.
  • SQLite中需包含必填表:
    feeds
    entries
    (来自
    ai-tech-rss-fetch
    )。
  • 可选表:
    entry_content
    (来自
    ai-tech-fulltext-fetch
    )。
  • 所有RSS技能需使用相同的共享数据库路径。
  • 在多Agent运行环境中,需为该Agent设置
    AI_RSS_DB_PATH
    为一个绝对数据库路径。

RAG Workflow

RAG工作流

  1. Retrieve evidence context by time window.
bash
export AI_RSS_DB_PATH="/absolute/path/to/workspace-rss-bot/ai_rss.db"

python3 scripts/time_report.py \
  --db "$AI_RSS_DB_PATH" \
  --period weekly \
  --date 2026-02-10 \
  --max-records 120 \
  --max-per-feed 20 \
  --summary-chars 8192 \
  --fulltext-chars 8192 \
  --pretty \
  --output /tmp/ai-tech-weekly-context.json
  1. Load retrieval output and generate final summary in agent response.
  • Read
    query
    ,
    dataset
    ,
    aggregates
    ,
    records
    .
  • Prioritize
    records
    as evidence source.
  • Mention key trends, major events, and notable changes grounded in records.
  1. Include evidence anchors in summary.
  • Reference
    entry_id
    , feed, and URL for key claims.
  • If retrieval is truncated, state that summary is based on sampled top records.
  1. 按时间窗口检索证据上下文。
bash
export AI_RSS_DB_PATH="/absolute/path/to/workspace-rss-bot/ai_rss.db"

python3 scripts/time_report.py \
  --db "$AI_RSS_DB_PATH" \
  --period weekly \
  --date 2026-02-10 \
  --max-records 120 \
  --max-per-feed 20 \
  --summary-chars 8192 \
  --fulltext-chars 8192 \
  --pretty \
  --output /tmp/ai-tech-weekly-context.json
  1. 加载检索输出并在Agent响应中生成最终摘要。
  • 读取
    query
    dataset
    aggregates
    records
  • 优先将
    records
    作为证据来源。
  • 提及基于记录的关键趋势、重大事件和显著变化。
  1. 在摘要中包含证据锚点。
  • 为关键论断引用
    entry_id
    、来源Feed和URL。
  • 若检索结果被截断,需说明摘要基于抽样的顶级记录。

Time Window Modes

时间窗口模式

  • --period daily --date YYYY-MM-DD
  • --period weekly --date YYYY-MM-DD
  • --period monthly --date YYYY-MM-DD
  • --period custom --start ... --end ...
  • Time filtering is always based on
    entries.first_seen_at
    (UTC).
Custom boundaries support both
YYYY-MM-DD
and ISO datetime.
  • --period daily --date YYYY-MM-DD
  • --period weekly --date YYYY-MM-DD
  • --period monthly --date YYYY-MM-DD
  • --period custom --start ... --end ...
  • 时间过滤始终基于
    entries.first_seen_at
    (UTC时间)。
自定义边界支持
YYYY-MM-DD
格式和ISO日期时间格式。

Field Selection for RAG

RAG字段选择

  • Use
    --fields
    to control token budget and relevance.
  • Default fields are tuned for summarization:
    • entry_id,timestamp_utc,timestamp_source,feed_title,feed_url,title,url,summary,fulltext_status,fulltext_length,fulltext_excerpt
  • Common minimal field set for tight context:
    • entry_id,timestamp_utc,feed_title,title,url,summary
  • 使用
    --fields
    控制token用量和相关性。
  • 默认字段为摘要优化配置:
    • entry_id,timestamp_utc,timestamp_source,feed_title,feed_url,title,url,summary,fulltext_status,fulltext_length,fulltext_excerpt
  • 适用于紧凑上下文的常用最小字段集:
    • entry_id,timestamp_utc,feed_title,title,url,summary

Recommended Agent Output Pattern

推荐的Agent输出格式

  • Use this order in final response:
    1. Time range scope
    2. Top themes/trends
    3. Key developments (grouped)
    4. Risks/open questions
    5. Evidence list (entry ids + URLs)
  • 最终响应遵循以下顺序:
    1. 时间范围说明
    2. 核心主题/趋势
    3. 关键进展(分组展示)
    4. 风险/待解决问题
    5. 证据列表(条目ID + URL)

Configurable Parameters

可配置参数

  • --db
  • AI_RSS_DB_PATH
    (recommended absolute path in multi-agent runtime)
  • --period
  • --date
  • --start
  • --end
  • --max-records
  • --max-per-feed
  • --summary-chars
  • --fulltext-chars
  • --top-feeds
  • --top-keywords
  • --fields
  • --output
  • --pretty
  • --fail-on-empty
  • --db
  • AI_RSS_DB_PATH
    (多Agent运行环境中推荐使用绝对路径)
  • --period
  • --date
  • --start
  • --end
  • --max-records
  • --max-per-feed
  • --summary-chars
  • --fulltext-chars
  • --top-feeds
  • --top-keywords
  • --fields
  • --output
  • --pretty
  • --fail-on-empty

Error Handling

错误处理

  • Missing
    feeds
    /
    entries
    : fail fast with setup guidance.
  • Invalid date/time/field list: return parse errors.
  • Missing
    entry_content
    : continue in metadata-only mode.
  • Empty retrieval set: return empty context; optionally fail with
    --fail-on-empty
    .
  • 缺少
    feeds
    /
    entries
    表:快速失败并提供设置指引。
  • 无效的日期/时间/字段列表:返回解析错误。
  • 缺少
    entry_content
    表:继续以仅元数据模式运行。
  • 检索结果为空:返回空上下文;可通过
    --fail-on-empty
    参数设置失败返回。

References

参考资料

  • references/time-window-rules.md
  • references/report-format.md
  • references/time-window-rules.md
  • references/report-format.md

Assets

资源文件

  • assets/config.example.json
  • assets/config.example.json

Scripts

脚本文件

  • scripts/time_report.py
  • scripts/time_report.py