Volcengine Ark Web Search
Overview
Use this skill when the task needs up-to-date public web information and the runtime should go through Volcengine ARK Responses API instead of the model's built-in browsing. The bundled script wraps ARK responses with the web_search tool, defaults to Chinese-friendly output, and is suitable for repeatable automation or local agent workflows.
Default markdown output is stabilized into three sections:
When to Use
- - The user asks for today's news, recent updates, current public coverage, or live fact checks.
- You want fresh web results but must route them through Volcengine ARK with
ARK_API_KEY. - You need a reusable local command that can be shared in scripts, cron jobs, or other skills.
- The answer should prefer Chinese output, explicit dates, and source links.
- You need to compare or verify public web information before answering.
When Not to Use
- -
ARK_API_KEY is missing. - The task is static and does not need current web information.
- You need browser automation, authenticated sessions, or site-specific interaction rather than search.
- A different provider is mandatory.
Quick Start
- 1. Confirm
ARK_API_KEY is set. - Run the bundled script.
- Summarize the returned answer with explicit dates and source links.
Basic usage:
CODEBLOCK0
Chinese query:
CODEBLOCK1
Custom model:
CODEBLOCK2
Structured JSON output:
CODEBLOCK3
Longer timeout with quick retries:
CODEBLOCK4
Dry run without network:
CODEBLOCK5
Core Workflow
- 1. Rewrite the user request into a direct search question when needed. Prefer explicit entities, topics, and time windows.
- Use the default system prompt unless the task requires raw passthrough behavior.
- Run
scripts/ark_web_search.py. - If the script returns enough signal, summarize in Chinese unless the user asked for another language.
- For relative-time prompts such as "today" or "recently", write absolute dates in the final answer.
Output Requirements
- - Prefer concise summaries with links.
- Default markdown output should be stable and easy to scan: title, summary, then sources.
- Preserve uncertainty when the search result is thin or conflicting.
- If sources are present, include them.
- Convert relative date language into explicit dates whenever possible.
- If the API result is insufficient, say so instead of inventing facts.
Files
- -
scripts/ark_web_search.py: ARK Responses API runner with web_search, dry-run support, streaming support, and source extraction. - INLINECODE8 : Notes on request shape, model drift, tool naming drift, and maintenance references.
Maintenance Notes
- - Prefer overriding the model with
--model or ARK_MODEL. ARK model availability changes over time. - INLINECODE11 is per attempt. Use
--retries for quick retry behavior on transient failures. - Some ARK environments reject
search_context_size with HTTP 400. This script now retries automatically without that field if the server reports it as unsupported. - The default system prompt asks the model to return summary body only. Title and source sections are added by the script to keep output stable.
- The Volcengine docs have shown both
web_search and web_search_preview historically. This skill defaults to web_search and should only change if official docs for the target environment require it. - If response parsing breaks after an upstream API change, update the normalization logic in
scripts/ark_web_search.py and keep references/ark-responses-api.md in sync.
Volcengine Ark Web 搜索
概述
当任务需要最新的公开网络信息,且运行时需通过 Volcengine ARK Responses API(而非模型内置浏览功能)时,请使用此技能。配套脚本封装了带有 web_search 工具的 ARK responses,默认输出中文友好内容,适用于可重复的自动化或本地代理工作流。
默认的 Markdown 输出稳定分为三个部分:
使用场景
- - 用户询问今日新闻、近期动态、当前公开报道或实时事实核查。
- 需要获取最新网络结果,但必须通过 ARKAPIKEY 路由至 Volcengine ARK。
- 需要可复用的本地命令,以便在脚本、定时任务或其他技能中共享。
- 答案应优先使用中文输出,包含明确日期和来源链接。
- 在回答前需要对比或验证公开网络信息。
不适用场景
- - 缺少 ARKAPIKEY。
- 任务为静态内容,无需当前网络信息。
- 需要浏览器自动化、认证会话或特定站点交互,而非搜索。
- 必须使用其他提供商。
快速开始
- 1. 确认已设置 ARKAPIKEY。
- 运行配套脚本。
- 总结返回的答案,包含明确日期和来源链接。
基本用法:
bash
python3 scripts/arkwebsearch.py 今天有哪些AI新闻头条?
中文查询:
bash
python3 scripts/arkwebsearch.py 今天有什么热点新闻
自定义模型:
bash
python3 scripts/arkwebsearch.py OpenAI最新公告 \
--model doubao-seed-1-6-250615
结构化 JSON 输出:
bash
python3 scripts/arkwebsearch.py 最新半导体政策新闻 \
--format json
超时延长并快速重试:
bash
python3 scripts/arkwebsearch.py OpenAI最新新闻 \
--timeout 90 \
--retries 2
无网络模拟运行:
bash
python3 scripts/arkwebsearch.py 今日电动汽车市场新闻 \
--dry-run
核心工作流
- 1. 必要时将用户请求改写为直接的搜索问题。优先使用明确的实体、主题和时间窗口。
- 除非任务需要原始透传行为,否则使用默认系统提示。
- 运行 scripts/arkwebsearch.py。
- 如果脚本返回足够信息,用中文总结(除非用户要求其他语言)。
- 对于“今天”“最近”等相对时间提示,在最终答案中写明绝对日期。
输出要求
- - 优先使用简洁摘要并附带链接。
- 默认 Markdown 输出应稳定且易于浏览:标题、摘要、来源。
- 当搜索结果信息不足或存在矛盾时,保留不确定性。
- 如有来源,务必包含。
- 尽可能将相对日期表述转换为明确日期。
- 如果 API 结果不足,如实说明,而非编造事实。
文件
- - scripts/arkwebsearch.py:ARK Responses API 运行器,支持 web_search、模拟运行、流式输出和来源提取。
- references/ark-responses-api.md:关于请求结构、模型变更、工具命名变更及维护参考的说明。
维护说明
- - 优先使用 --model 或 ARKMODEL 覆盖模型。ARK 模型可用性会随时间变化。
- --timeout 为每次尝试的超时时间。对临时故障使用 --retries 实现快速重试。
- 部分 ARK 环境会因 searchcontextsize 返回 HTTP 400 错误。本脚本会在服务器报告不支持该字段时自动重试(不带该字段)。
- 默认系统提示要求模型仅返回摘要正文。标题和来源部分由脚本添加,以保持输出稳定。
- Volcengine 文档历史上同时出现过 websearch 和 websearchpreview。本技能默认使用 websearch,仅在目标环境的官方文档要求时才更改。
- 如果上游 API 变更导致响应解析失败,请更新 scripts/arkweb_search.py 中的规范化逻辑,并同步更新 references/ark-responses-api.md。