返回顶部
f

fred-navigator

Navigate FRED categories and series using fredapi, supporting natural-language queries with intent recognition and double validation.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
649
下载量
2
收藏
概述
安装方式
版本历史

fred-navigator

# 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": <int>, "name": "<str>", "path": "<str>" }, ... }` - `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 <id>` for consistent output. 2. 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 <id>` and `scripts/fred_query.py series-info <id>`. 3. 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 <id>` 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.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 fred-navigator-1776420040 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 fred-navigator-1776420040 技能

通过命令行安装

skillhub install fred-navigator-1776420040

下载 Zip 包

⬇ 下载 fred-navigator v1.0.0

文件大小: 224.3 KB | 发布时间: 2026-4-17 18:21

v1.0.0 最新 2026-4-17 18:21
Initial release of fred-navigator.

- Enables navigation of FRED categories and series using direct IDs or natural-language queries.
- Implements intent recognition and double validation for reliable category selection.
- Returns Top-5 candidates when query confidence is low or validation fails.
- Provides structured workflow for series lookup and metadata retrieval.
- Requires external references and scripts for data lookup and path building; does not hardcode API keys.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部