← 返回
开发者工具 Key 中文

FRED-Navigator

Navigate FRED categories and series using fredapi, supporting natural-language queries with intent recognition and double validation.
利用fredapi浏览FRED类别与数据系列,支持带意图识别和双重验证的自然语言查询。
kiszly kiszly 来源
开发者工具 clawhub v1.0.0 1 版本 99918.1 Key: 需要
★ 2
Stars
📥 1,180
下载
💾 12
安装
1
版本
#latest

概述

FRED Navigator

Purpose

Provide a reliable workflow to navigate FRED categories and series, with support for:

  1. Direct category_id
  2. Direct series_id
  3. Natural-language query → intent recognition → double validation

Inputs

  • category_id: FRED category id
  • series_id: FRED series id
  • query: natural language request
  • limit: number of candidates to return (default 5)
  • api_key: read from environment FRED_API_KEY only

Required Resources

  • references/fred_categories_tree.json
  • references/fred_categories_flat.json
  • Optional: references/category_paths.json (precomputed)
  • Optional: references/synonyms.json
  • Helper script: scripts/fred_query.py
  • Path builder: scripts/build_paths.py

Optional Resource Structure Notes

  • references/category_paths.json format:
  • { "category_id": { "id": , "name": "", "path": "" }, ... }
  • references/synonyms.json format:
  • { "concept": ["alias1", "alias2", ...], ... }

Workflow

1. Category Exploration

  1. Load fred_categories_tree.json for hierarchical browsing.
  2. If user provides category_id, validate it exists.
  3. If user provides category_name, fuzzy match against flat names and return candidates.

2. Series Discovery

  1. Use search_by_category(category_id) to list available series.
  2. Prefer scripts/fred_query.py category for consistent output.
  3. Return key columns:
    • id, title, frequency, units, seasonal_adjustment, last_updated.

3. Series Retrieval

  1. Use get_series(series_id) for time series.
  2. Use get_series_info(series_id) for metadata.
  3. Prefer scripts/fred_query.py series and scripts/fred_query.py series-info .
  4. Provide:
    • data head/tail
    • missing counts
    • latest value and date

4. Natural Language Query

4.1 Intent Identification (Top-K)

  1. Use the IDE agent (Codex) to interpret the natural-language intent.
  2. Select the single best-matching category.
  3. If confidence is low, ask the user to confirm the category before proceeding.
  4. Use references/category_paths.json and references/synonyms.json as supporting context if available.

4.2 Double Validation

Structural validation

  • Candidate must exist in fred_categories_tree.json.
  • Pass if at least one:
  • children non-empty
  • search_by_category(id) returns >= 1 series
  • Prefer scripts/fred_query.py check-category for a quick check

Semantic validation (agent)

  • Compare query with candidate name/path.
  • Return pass/fail or numeric relevance score.

4.3 Decision

  • If structural + semantic validation both pass → accept category.
  • Otherwise:
  • return Top-5 candidates
  • ask user to choose one explicitly

Failure Handling

  • Always provide Top-5 candidates when uncertain.
  • Never proceed to series retrieval if category validation fails.

Notes

  • Do not hardcode API keys.
  • Keep heavy reference data in references/, not in this file.
  • When running Python functions for querying, execute them inside the sandbox environment.

Maintenance

  • Update workflow or constraints: edit SKILL.md.
  • Update category data: replace files in references/.
  • Improve natural-language matching: add or edit references/synonyms.json (key → list of related terms).
  • Regenerate precomputed paths (optional): run scripts/build_paths.py.
  • Add helper scripts (optional): place in scripts/ and document usage here.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 06:58 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Tavily 搜索

jacky1n7
通过 Tavily API 进行网页搜索(Brave 替代方案)。当用户要求搜索网页、查找来源或链接,且 Brave 网页搜索不可用时使用。
★ 272 📥 100,008
data-analysis

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 296 📥 137,081
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 206 📥 67,115