Gemini Web Search
Use Gemini CLI to search the web and produce a concise, sourced answer.
Quick workflow
1) Formulate a tight query
- - Include: entity + ticker/name + date/time window + what you need (%, $, cause, quotes, links)
- Example: INLINECODE0
2) Run Gemini CLI with a TTY and long timeout
Gemini CLI can hang or be slow without a pseudo-TTY.
Preferred (OpenClaw tool call):
- - Use
functions.exec with INLINECODE2 - Use
timeout 300–600s (longer for heavy searches) - Use
yieldMs ~10000 then process.poll until completion
Command template:
If pty:true still behaves poorly, use a pseudo-tty wrapper:
3) Extract the answer in a structured way
Return:
- - The key numeric facts (e.g., % move, $ move, close/intraday)
- 2–4 bullets of the main catalyst(s)
- Links (always)
4) Quality control (mandatory)
- - Prefer: company IR/SEC filing, Reuters, Bloomberg, WSJ/FT, CNBC, reputable outlets.
- Avoid relying on low-quality finance blogs/SEO sites.
- If sources conflict or look unreliable: say so and ask user for a screenshot/link, or re-run with a stricter prompt.
Prompts that work well
INLINECODE9
INLINECODE10
INLINECODE11
Failure modes & fixes
- - Gemini prints “I will search…” then stalls
- Wait longer (it can be slow).
- Ensure TTY: run with
pty:true or
script -q -c ... /dev/null.
- - Output has suspicious claims (e.g., odd CEO news)
- Re-run with: “use Reuters/company IR/SEC filing only; otherwise say unknown”.
- Cross-check with at least 2 independent reputable sources.
- - Need numbers but sources don’t show them
- Ask user for the quote/screenshot from their market data app and reconcile.
Local setup notes
- - Gemini CLI binary: INLINECODE14
- Auth: already completed by Jiajie (should work without re-login)
Gemini 网页搜索
使用 Gemini CLI 搜索网络并生成简洁、有来源的答案。
快速工作流程
1) 构建精准查询
- - 包含:实体 + 股票代码/名称 + 日期/时间窗口 + 所需信息(百分比、金额、原因、引用、链接)
- 示例:PayPal (PYPL) 2026年2月4日下跌:百分比变动、金额变动、主要催化剂、3个来源
2) 使用TTY和长超时运行Gemini CLI
Gemini CLI在没有伪TTY的情况下可能会挂起或运行缓慢。
首选方案(OpenClaw工具调用):
- - 使用 functions.exec 并设置 pty: true
- 使用 timeout 300–600秒(重度搜索使用更长超时)
- 使用 yieldMs ~10000 然后 process.poll 直到完成
命令模板:
- - ~/.npm-global/bin/gemini -p <提示>
如果 pty:true 仍然表现不佳,使用伪tty包装器:
- - script -q -c ~/.npm-global/bin/gemini -p \<提示>\ /dev/null
3) 以结构化方式提取答案
返回:
- - 关键数字事实(例如,百分比变动、金额变动、收盘价/盘中价)
- 2–4条主要催化剂要点
- 链接(始终包含)
4) 质量控制(必做)
- - 优先选择:公司投资者关系/SEC文件、路透社、彭博社、华尔街日报/金融时报、CNBC、知名媒体。
- 避免依赖低质量财经博客/SEO网站。
- 如果来源冲突或看起来不可靠:说明情况并请求用户提供截图/链接,或使用更严格的提示重新运行。
效果良好的提示
搜索网络:<主题>。给出3条要点 + 2个可靠链接。
搜索网络:为什么
今天(<日期>)出现变动?提供精确的百分比和金额变动(收盘价及盘中价,如有),以及主要催化剂。引用来源并附上链接。
搜索网络并优先使用路透社/公司投资者关系/SEC文件。如果找不到,请说明。主题:<...>。提供链接。
失败模式及修复
- 等待更长时间(可能运行缓慢)。
- 确保TTY:使用 pty:true 或 script -q -c ... /dev/null 运行。
- 重新运行,使用:“仅使用路透社/公司投资者关系/SEC文件;否则说明未知”。
- 与至少2个独立可靠来源交叉验证。
- 请求用户提供其市场数据应用中的报价/截图并进行核对。
本地设置说明
- - Gemini CLI二进制文件:~/.npm-global/bin/gemini
- 认证:已由Jiajie完成(无需重新登录即可使用)