Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

如何在Spegel中实现个性化内容提取?

2025-08-22 264

Background requirements

用户常需要从网页提取特定信息(如商品价格、技术参数),而标准markdown转换可能无法满足个性化需求。

procedure

  1. 编写精准提示词:在配置文件的prompt字段中明确指令,例如:
    • 提取价格:prompt=提取所有价格信息,按¥符号识别并列表
    • 筛选日期:prompt=仅输出包含YYYY-MM-DD格式日期的段落
  2. 创建专用视图: in~/.spegel.toml中添加新视图区块,例如:
    [[views]]
    id = "prices"
    name = "Price Extractor"
    prompt = "List all product prices in bullet points"
  3. Model Selection Optimization:对复杂任务(如多语言混合内容),建议切换至GPT-4等更高性能模型。

Debugging Tips

若输出不准确,可尝试:逐步增加提示词细节;添加示例到提示词中;通过spegel --debug查看中间处理结果。

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish