Background requirements
Users often need to extract specific information from web pages (e.g., product prices, technical parameters), and standard markdown conversions may not be able to meet the individual needs.
procedure
- Write precise cues: In the configuration file's
promptExplicit instructions in the field, for example:- Withdrawal price:
prompt=提取所有价格信息,按¥符号识别并列表 - Screening Date:
prompt=仅输出包含YYYY-MM-DD格式日期的段落
- Withdrawal price:
- Creating specialized views: in
~/.spegel.tomlAdd a new view block in, for example:[[views]]
id = "prices"
name = "Price Extractor"
prompt = "List all product prices in bullet points" - Model Selection Optimization: For complex tasks (e.g., multilingual mixed content), it is recommended to switch to a higher performance model such as GPT-4.
Debugging Tips
If the output is inaccurate, try: incrementally adding details to the cue; adding examples to the cue; and adding a new cue via thespegel --debugView intermediate processing results.
This answer comes from the articleSpegel: using AI to transform web pages into an end-to-end browsing experienceThe





























