在我們看來,DeepSearch 本質上就是一個大型的 while 迴圈。在最大 token 預算限制下,它不斷地在搜尋、閱讀和思考之間循環,直到找到最佳答案。LLM 的一個關鍵任務是根據當前的記憶狀態決定下一步該採取什麼行動。它應該繼續搜索嗎?閱讀網頁?還是直接回答問題?
在我們的 node-deepresearch 實作中,我們使用了一個標準 LLM(gemini-2.0-flash
)來選擇行動。我們稱之為「標準」,是因為推理過程是通過提示工程明確概述的,然後以序列輸入、序列輸出的方式運作,並將選擇的行動以 JSON 物件形式返回。因此,一個自然的問題出現了:用專門的推理模型替代這個決策步驟是否能提升 DeepSearch 的性能?

在這篇文章中,我們探討使用 DeepSeek R1 671b 這個推理 LLM 來替代 gemini-2.0-flash
進行這個決策步驟。我們相信 R1 的推理能力將有助於解決在網路搜尋和分析結果時遇到的複雜問題。
為了測試這個概念,我們讓它執行一個實際的例子:規劃一個全面的三天假期行程,然後評估其表現。執行深度搜尋任務的代理可能會遇到與人類相同的問題,所以在我們的假期任務中,模型可能會遇到以下問題:
- 知識缺口(資訊依賴於其他資訊):例如,你想參觀艾菲爾鐵塔,但不知道它在公共假期是否開放。你需要同時找出鐵塔的假期營業時間表和法國公共假期的日期。
- 錯誤或過時的資訊:一篇 2020 年的旅遊部落格提到羅馬的某家餐廳週日有營業,但當你抵達時,發現它已經改變營業時間,現在週日不營業。
- 矛盾的資訊:一個旅遊網站聲稱紐約的某家酒店提供免費早餐,而另一個網站則表示房價不包含早餐。
- 模糊的資訊:一篇旅遊論壇的貼文提到「巴塞隆納附近的一個很棒的海灘」,但沒有指明是哪個海灘或提供清楚的方向,使得很難確定確切位置。
R1 可以將複雜的任務分解成可執行的步驟,識別資訊缺口和不一致之處,並處理像被封鎖的網站和訂閱牆這樣的障礙。它具有收集所需知識和綜合答案的推理能力。然而,它無法單獨為我們規劃假期 — 這需要搜尋網路並理解返回的結果。我們必須對它進行強化,設置框架並增強其能力,才能勝任這項工作。
tag實作

要運行此 notebook,你需要免費的 Jina AI 和 OpenRouter API 金鑰。
雖然 R1 是我們代理的引擎,但我們還添加了一些工具、狀態物件,當然還有一個(相當大的)提示。以下是簡化的表示:

- 工具可以被模型調用來搜尋和抓取網頁,結果存儲在狀態中。
- 狀態追蹤工具結果、任務狀態和知識。它存儲在提示本身中。
- 單一提示提供指示,指定任務和如何進行,以及存儲狀態。
我們稍後會詳細介紹這些內容,特別是提示部分。但簡而言之,系統的運作方式如下:
我們從帶有未填充狀態物件的提示開始。當任務正在進行中(即嘗試產生答案)時,代理會循環執行以下步驟直到產生答案:
- 模型從提示中檢查任務和其狀態,並推理如何最好地使用其工具來獲得答案。
- 模型輸出一個 JSON 物件,指定其狀態(
IN PROGRESS
或DONE
)、記憶更新、工具調用和答案(最初為null
)。 - 代理異步調用工具,結果被嵌入回提示中,以及步驟 3 中的 JSON 物件。
- 包含這些新資訊的提示被重新輸入到模型中進行另一輪循環。
一旦模型在其輸出中提供答案,任務就結束並交付答案。
現在我們有了高層次的概述,讓我們依次看看工具、狀態和提示:
tag工具
由於 R1 無法自行搜尋或抓取網頁,我們使用 Jina 的 Reader API 來擴展其功能。這包括兩種模式:
- 搜尋模式:搜尋網路上的相關術語並返回搜尋引擎結果(包括每個結果的 URL、標題和描述)。
- 閱讀模式:抓取搜尋結果中的頁面並以 Markdown 格式返回。
由於 R1 的上下文視窗有限,我們不能只是將整個頁面丟進提示的 Tool Results
部分。我們需要額外的工具來選擇最相關的資訊,然後再傳遞給模型:
- LangChain 遞歸字符文本分割器:我們使用
RecursiveCharacterTextSplitter
將長輸出分成段落,在段落和句子上遞歸分割,直到獲得所需的段落大小。這確保輸出能夠被 R1 的有限上下文視窗輕鬆處理。 - Jina Reranker:我們使用 jina-reranker-v2-base-multilingual 對段落重新排序,並將排名最高的段落組合成一個結果。
不幸的是,DeepSeek R1 不像 o3-mini
那樣支援工具使用。例如,使用 o3-mini
,我們可以使用類似以下的程式碼:
def scrape_page(url: str):
"""Scrape a web page with Jina Reader"""
tools = [
{
"type": "function",
"function": {
"name": "scrape_page",
"description": "Scrape the content of a webpage",
"parameters": {
"url": {"type": "string", "description": "The URL to scrape"}
}
}
}
]
client = OpenAI()
response = client.completions.create(
model="o3-mini",
prompt=f"Scrape www.skyscanner.net/routes/gr/de/germany-to-crete.html",
tools=tools
)
支援工具使用的 o3-mini 程式碼示例
但這對 R1 來說並不容易:它沒有可以傳遞給 API 的 tools
參數,也不會在其回應中返回結構化的 tool_calls
。簡單來說,它並未被訓練使用工具(而且在短期內也不會支援)。至少,它不以傳統意義上支援工具。然而,我們仍然可以要求 R1 以 JSON 格式輸出工具調用,並將工具調用結果回饋給模型進行分析:
You must respond with a valid JSON object containing:
```json
{
"tool_calls": [
{"tool": "search", "input": "Cheapest flights from Germany to Crete May 2025"},
{"tool": "scrape", "input": "<https://www.skyscanner.net/routes/gr/de/germany-to-crete.html>"}
]
}
```
Tool calls 作為 R1 提示詞的一部分
在模型在第 n 次迭代中輸出 tool calls 後,這些工具被調用,結果會被嵌入到提示詞的 Tool Results
部分,供模型在第 n+1 次迭代時進行推理:
Tool Results:
Source 1️: search: Cheapest flights from Germany to Crete May 2025
Result:
```
Title: Affordable flights: Germany - Heraklion (Crete) (HER) | Eurowings URL Source: https://www.eurowings.com/en/booking/offers/flights-from/DE/to/GR/HER.html Description: Affordable flights from Germany to Heraklion (Crete) ✈ Eurowings brings you closer to your dream destination from as little as €89.99*. Book now and enjoy.
Title: Are you a person or a robot? URL Source: https://www.skyscanner.com/routes/fran/her/frankfurt-to-crete-heraklion.html Description: Book a one-way ticket from Frankfurt to Heraklion Airport from $78 or travel return from just $154. The prices shown are based on availability and could change ...
```
工具結果,顯示德國到克里特島航班的搜索結果
tag狀態
狀態用於追蹤任務狀態(Status
)和模型需要分析和更新的知識(Memory
)。簡而言之,這是系統的工作記憶和記憶庫。這些內容存儲在提示詞中名為 {{ workspace }}
的部分,一開始是空白的:
Status: IN_PROGRESS
Memory:
... no memory blocks ..
空的狀態對象
當模型對任務進行推理、運行工具並收集輸出時,狀態會被填充上記憶塊(來自工具輸出),每個記憶塊都有自己隨機分配的 ID。對於我們的度假規劃示例,在運行一次代理後,狀態可能如下所示:
Status: IN_PROGRESS
Memory:
<nuz-032>Potential warm May destinations: Malaga (Spain), Crete (Greece), Algarve (Portugal)</nuz-032>
<xwj-969>URL to scrape for Crete hotel details: <https://www.tripadvisor.com/HotelsList-Crete-Beachfront-Cheap-Hotels-zfp13280541.html></xwj-969>
<vsc-583>URL to scrape for flight details: <https://www.expedia.com/lp/flights/fra/her/frankfurt-to-heraklion></vsc-583>
DeepSeek R1 填充的狀態
記憶塊通過在模型的 JSON 響應中包含 memory_updates
列表來更新:
{
"memory_updates": [
{"operation": "add", "content": "Round-trip flight from Berlin to Tenerife in May 2025 ranges from €59.99 to €200 round-trip as per the Skyscanner and Iberia sources."},
{"operation": "delete", "id": "nuz-032"},
...
]
}
作為 R1 JSON 輸出一部分的記憶更新
add
操作添加一個記憶塊,可用於存儲重要資訊,如線索、發現、資訊缺口和已執行的操作。delete
操作刪除一個記憶塊,允許模型刪除舊的、不必要的或錯誤的資訊,並維護一個乾淨的工作空間。
replace
操作,但我們發現模型會生成大量資訊(過度依賴 replace
),因此決定移除這個選項。與發出工具調用相比,R1 對管理自己的記憶較不熟悉。雖然模型經過專門訓練可以處理複雜的數學問題和編碼任務——這種訓練使其能夠產生準確的 JSON 對象並執行工具調用——但它並沒有被訓練來管理類記憶狀態(我們所知的其他模型也沒有)。
使用緊湊的記憶狀態存儲資訊比每輪存儲模型的全部輸出有幾個優勢。這種方法在提示詞中壓縮資訊,防止上下文溢出,同時增強模型對相關知識的關注。我們保持 JSON 格式是因為它易於更新,但 JSON 在提示詞中會以人類可讀的格式呈現。
即便如此,記憶管理仍然超出了 R1 的核心領域;我們需要實施多項指令來指導模型正確處理記憶操作。以下是我們提示詞中處理這部分的內容:
... other contents of the prompt ...
## Memory Block Usage
- Each memory block has a unique ID in format <abc-123>content</abc-123>
- Create separate blocks for distinct pieces of information:
* Discovered URLs (both explored and pending)
* Information gaps that need investigation
* Actions already taken (to avoid repetition)
* Promising leads for future exploration
* Key facts and findings
* Contradictions or inconsistencies found
- Keep each block focused on a single idea or piece of information
- Always cite sources when recording information from tool results
- Use IDs to track and manage your knowledge (e.g., deleting outdated information)
- Make sure to store sources (URLs) for the facts and findings you store
## Lead Management
- Since you can only make 3 tool calls per round, store promising leads for later
- Create dedicated memory blocks for URLs to scrape later
- Maintain blocks for potential search queries to explore in future rounds
- Prioritize leads based on relevance to the task
... other contents of the prompt ...
提示詞中的記憶處理指令
tag提示詞
我們使用 Jinja 模板格式創建提示詞。它包含幾個部分:
- 上下文(在本例中是當前日期)。
- 指令,涵蓋一切如何運作,並告訴模型有哪些工具可用。
- 狀態,如上所述。
- 工具輸出,來自
search
和scrape
工具。
{% macro format_tool_results(tool_records) %}
{% for to in tool_records %}
Source {{ loop.index }}️: {{ to.tool }}: {{ to.input }}
Result:
```
{{ to.output }}
```
{% endfor %}
{% endmacro %}
The date: `{{ current_date }}`.
You are an information analysis and exploration agent that builds solutions through systematic investigation.
## Investigation Cycle
You operate in a continuous investigation cycle:
1. Review current workspace (your memory blocks)
2. Analyze new tool results (or initial task if first round)
3. Update memory with new insights and track investigation progress
4. Decide on next tools to call based on identified leads and information gaps
5. Repeat until task completion
## Memory Structure
Your memory persists between investigation cycles and consists of:
- **Status**: Always the first line, indicates if the task is IN_PROGRESS or DONE
- **Memory**: A collection of discrete information blocks, each with a unique ID
## Memory Block Usage
- Each memory block has a unique ID in format <abc-123>content</abc-123>
- Create separate blocks for distinct pieces of information:
* Discovered URLs (both explored and pending)
* Information gaps that need investigation
* Actions already taken (to avoid repetition)
* Promising leads for future exploration
* Key facts and findings
* Contradictions or inconsistencies found
- Keep each block focused on a single idea or piece of information
- Always cite sources when recording information from tool results
- Use IDs to track and manage your knowledge (e.g., deleting outdated information)
- Make sure to store sources (URLs) for the facts and findings you store
## Lead Management
- Since you can only make 3 tool calls per round, store promising leads for later
- Create dedicated memory blocks for URLs to scrape later
- Maintain blocks for potential search queries to explore in future rounds
- Prioritize leads based on relevance to the task
## Available Tools
- **search**: Use for broad information gathering on new topics or concepts
* Example: {"tool": "search", "input": "renewable energy statistics 2023"}
- **scrape**: Use for extracting specific details from discovered URLs
* Example: {"tool": "scrape", "input": "https://example.com/energy-report"}
## Tool Usage Guidelines
- **When to use search**: For new concepts, filling knowledge gaps, or exploring new directions
- **When to use scrape**: For URLs discovered that likely contain detailed information
- **Maximum 3 tool calls per round**
- **Never repeat the exact same tool call**
- **Always record valuable information from tool results in memory blocks**
## Response Format
You must respond with a valid JSON object containing:
```json
{
"status_update": "IN_PROGRESS or DONE",
"memory_updates": [
{"operation": "add", "content": "New insight or lead to investigate"},
{"operation": "delete", "id": "abc-123"}
],
"tool_calls": [
{"tool": "search", "input": "specific search query"},
{"tool": "scrape", "input": "https://discovered-url.com"}
],
"answer": "Your final, comprehensive answer when status is DONE"
}
```
## Important Rules
- The "add" operation creates a new memory block
You do not need to specify an ID, it will be added automatically by the system.
- The "delete" operation requires the specific ID of the block to remove
- Never invent or fabricate information - only use facts from your memory or tool results
- Never make up URLs - only use URLs discovered through tool results
- CRITICAL: Any information not recorded in your memory blocks will be lost in the next round
For example, if you find a potential webpage to scrap, you must store the URL and your intention
Example: `{"operation": "add", "content": "Found relevant URL: https://... to scrape ..."}`
- Set status to "DONE" only when you have fully addressed the task
- Only include the "answer" field when status is "DONE"
Task:
```
{{ task }}
```
Current workspace:
```
{{ workspace }}
```
Tool Results:
{{ format_tool_results(tool_records) if tool_records else '... no previous tool results ...'}}
IMPORTANT: Generate a valid JSON response following the format above.
Think carefully about:
- what information do you need to preserve
- which tools to call next
- how to build your answer systematically with focused memory blocks
我們深度搜索系統中使用的完整提示詞
tag評估
我們用我們的假期規劃範例來測試我們的系統。以下是嵌入提示中的任務:
Help me plan a 3 day holiday in Europe in May for under 2000 EUR
1. I need specific flight and hotel recommendations.
2. I want the destination to be warm.
3. I want to have a beach nearby the hotel.
I live in Germany.
以下是最終結果(經過五次迭代循環後):
**3-Day Crete Holiday Plan (Total ≈ €600-800)**
✈️ *Flights (From Frankfurt):*
- Skyscanner: €154 round trip (May 2025 dates)
Source: <https://www.skyscanner.com/routes/fran/her/frankfurt-to-crete-heraklion.html>
- Backup: Eurowings €180 round trip
🏨 *Beachfront Hotels:*
1. **Georgioupolis Beach Hotel**
- Direct beach access, bike rentals €10
- Source: <https://www.tripadvisor.com/HotelsList-Crete-Beachfront-Cheap-Hotels-zfp13280541.html>
2. **JT Apartments**
- €57/night, 9.5/10 rating, 5-min walk to beach
- Source: <https://www.booking.com/region/gr/crete.html>
3. **FNK Apartments**
- Sea views, 9.6/10 rating
💰 *Budget Breakdown:*
- Flights: €154
- Hotel (3 nights): €171-250
- Remaining: €1,600+ for meals/activities
*Note:* All hotels are <5 mins from beaches. Crete averages 25°C in May (Source: TravelSupermarket).
假期搜尋任務的結果,經過五次迭代後
這個答案看起來很合理。但它真的準確嗎?畢竟,模型有時會產生幻覺,而且在一個有多個運作部分的系統中,很可能會出錯。讓我們驗證 R1 輸出中的一些細節:
tag目的地和總預算
每個項目的計算都加起來了(我們稍後會討論每個項目是否準確)。畢竟,R1 是在數學問題上訓練的。目的地也沒問題;克里特島是一個熱門地點。
tag航班
航班價格幾乎是對的,但讓我們看看哪裡出了問題。首先,以下是 2025 年 5 月從法蘭克福到赫拉克利翁的實際 Skyscanner 往返價格:

我們可以看到價格都在 200 歐元左右,而不是承諾的往返 154 歐元!但這個錯誤從何而來?查看日誌,我們發現在第三輪中添加了一個相關的記憶區塊:
{"operation": "add", "content": "Crete flight options: Eurowings €89.99* one-way ..."}
與德國-克里特島航班相關的記憶區塊
這個區塊似乎是從附加的搜尋結果推斷出來的:
Source 1️: search: Cheapest flights from Germany to Crete May 2025
Result:
```
... other results ...
Title: Are you a person or a robot?
URL Source: https://www.skyscanner.com/routes/fran/her/frankfurt-to-crete-heraklion.html
Description: Book a one-way ticket from Frankfurt to Heraklion Airport from $78 or travel
return from just $154. The prices shown are based on availability and could change ...
```
德國-克里特島航班的搜尋結果
模型從未嘗試爬取此網頁以確認結果,但這可能不會有什麼區別。然而,它至少應該注意到搜尋結果中並沒有包含「五月」這個時期。
tag酒店
酒店資訊是正確的,但我們發現了一些可以改進的地方。首先,我們希望模型在尋找 Georgioupolis Beach Hotel 和 FNK Apartments 的價格時投入更多努力 - 雖然它提供了其他資訊,但價格卻缺失了。為了說明我們的意思,這裡是用於生成酒店推薦的 URL 爬取的原始輸出。它只顯示了第一個和最後一個結果的價格,跳過了中間三個:
資料來源 3️: 爬取: https://www.booking.com/region/gr/crete.html
結果:
```
顯示更多 顯示更少
Moritz 德國
* ### [JT Apartments](https://www.booking.com/hotel/gr/jt-apatments.html?label=gen173nr-1FCAYoXEIFY3JldGVIM1gEaJUCiAEBmAExuAEZyAEM2AEB6AEB-AECiAIBqAIDuALSvqC-BsACAdICJDc5ZWE5ZDJkLTI2ZWEtNGNiMS04MzNlLTJhNWIyMGI5Y2M3NdgCBeACAQ&sid=f21cdd5fe9eb08dcac7d3a0304f9ccc9)
Kissamos
每晚 $57 起
9.5 極佳 313 則評論
我強烈推薦入住 JT Apartments。當我們進入公寓時,受到了一個愉快的驚喜。一切設備齊全。周邊環境安靜,附近有超市。海灘就在步行距離內。如果您想參觀克里特島最美麗的海灘,這裡是絕佳位置。感謝您們讓我們的住宿體驗完全符合我們的夢想 :)
顯示更多 顯示更少
Katarzyna 波蘭
顯示更多 顯示更少
Aitor 德國
* ### [FNK Apartments with Sea View](https://www.booking.com/hotel/gr/f-amp-k-apartments.html?label=gen173nr-1FCAYoXEIFY3JldGVIM1gEaJUCiAEBmAExuAEZyAEM2AEB6AEB-AECiAIBqAIDuALSvqC-BsACAdICJDc5ZWE5ZDJkLTI2ZWEtNGNiMS04MzNlLTJhNWIyMGI5Y2M3NdgCBeACAQ&sid=f21cdd5fe9eb08dcac7d3a0304f9ccc9)
Agia Pelagia
9.6 極佳 64 則評論
我們在克里特島待了一週。期間住在 FnK Apartments。Froso 和 Konstantinos 是超級友善且令人驚艷的房東。如果我們有任何問題或需求,他們總是隨時準備協助。公寓本身擁有 Agia Pelagia 和周圍海灣的美麗景色(甚至可以看到美麗的日出)。我們只能推薦 FnK Apartments!!
顯示更多 顯示更少
Moritz 德國
顯示更多 顯示更少
mary 美國
* ### [Artemis Hotel Apartments](https://www.booking.com/hotel/gr/artemis-hersonisos.html?label=gen173nr-1FCAYoXEIFY3JldGVIM1gEaJUCiAEBmAExuAEZyAEM2AEB6AEB-AECiAIBqAIDuALSvqC-BsACAdICJDc5ZWE5ZDJkLTI2ZWEtNGNiMS04MzNlLTJhNWIyMGI5Y2M3NdgCBeACAQ&sid=f21cdd5fe9eb08dcac7d3a0304f9ccc9)
Limenas Hersonissou, Hersonissos
9.0 優異 419 則評論
如果您想感受賓至如歸,被當作朋友對待,並且知道您會在各方面得到幫助,我們強烈推薦您入住這家飯店。衷心感謝 Konstantine 的溫暖和非常貼心的待遇!下次造訪克里特島時,我們很樂意再次入住 Artemis Hotel!
顯示更多 顯示更少
Irina 以色列
顯示更多 顯示更少
Ann Marie 愛爾蘭
* ### [Pinelopi Hotel](https://www.booking.com/hotel/gr/pinelopi.html?label=gen173nr-1FCAYoXEIFY3JldGVIM1gEaJUCiAEBmAExuAEZyAEM2AEB6AEB-AECiAIBqAIDuALSvqC-BsACAdICJDc5ZWE5ZDJkLTI2ZWEtNGNiMS04MzNlLTJhNWIyMGI5Y2M3NdgCBeACAQ&sid=f21cdd5fe9eb08dcac7d3a0304f9ccc9)
Platanes
7.8 好 198 則評論
絕佳位置,靠近海灘,周圍有很棒的小餐館,也適合開車四處遊覽。安靜的區域,適合度過美好的假期。寬敞的房間配備所需的一切。物超所值。泳池區域非常棒,您可以在一天中任何時候在那裡放鬆。飯店附近的停車場很完美。下次再訪克里特島時,我一定會再回到 Pinelopi Hotel。
顯示更多 顯示更少
Rita 羅馬尼亞
顯示更多 顯示更少
Katarzyna 波蘭
* ### [Elizabeth Suites](https://www.booking.com/hotel/gr/elizabeth-suites.html?label=gen173nr-1FCAYoXEIFY3JldGVIM1gEaJUCiAEBmAExuAEZyAEM2AEB6AEB-AECiAIBqAIDuALSvqC-BsACAdICJDc5ZWE5ZDJkLTI2ZWEtNGNiMS04MzNlLTJhNWIyMGI5Y2M3NdgCBeACAQ&sid=f21cdd5fe9eb08dcac7d3a0304f9ccc9)
Kato Daratso
每晚 $74 起
9.1 優異 86 則評論
我們有一個很棒的住宿體驗,老闆 Epas 總是面帶微笑且非常樂於助人,工作人員特別是 Anna 都很可愛,這讓體驗更加溫馨。我們吃了幾天早餐,份量都非常充足。公寓位置完美,靠近海灘和餐廳。我們強烈推薦 The Elizabeth Suites,讓我們在克里特島的首次假期非常愉快 😊
顯示更多 顯示更少
Jean 英國
```
在 booking.com 上爬取的克里特島飯店列表原始搜尋結果
其次,我們在使用 Reranker 時發現了一個額外問題,它預設的 top_n
為 5 個結果 — 結果發現爬取的頁面實際上包含超過五個相關結果 — 我們本可以通過實際檢查每個結果的相關性分數來解決這個問題,而不是僅僅取前五個(或其他數量的)結果。然而,理想的重新排序配置因任務而異。解決這個問題的更好方法應該是使用整個爬取頁面 — 但可惜由於 R1 的上下文長度限制,這是不可能的。
tag整體表現和潛在改進
模型一開始表現不錯,但我們注意到,除非特別提示,否則它很少嘗試切換策略或制定複雜的計劃。雖然 R1 自然會在數學和編碼問題上採用這些方法(這是它特別訓練的領域),但它並沒有將相同的推理應用於搜尋任務。雖然我們可以進一步微調提示(甚至使用多個提示)來解決這個限制,但這不是我們的主要目標。
我們也觀察到 R1 沒有充分處理時效性資訊。簡而言之,如果搜尋結果沒有明確提到錯誤的日期,模型會在沒有進一步驗證的情況下假設該資訊有效。例如,在規劃 5 月 1 日的航班時:
- 德國到克里特島 $80 5 月 1 日:正確 — 模型可以信任這個資訊。
- 德國到克里特島 $80 1 月 1 日:錯誤 — 模型正確識別並放棄這個資訊。
- 德國到克里特島 $80:假陽性 — 當沒有指定日期時,模型未能驗證資訊並錯誤地假設其有效。
如果我們要繼續這個專案,我們可能會考慮實施幾個潛在的改進:
- 追蹤記憶區塊數量,並在狀態變得太大時提示模型總結條目。
- 指示模型在完成探索和回應查詢之前窮盡所有線索。
- 強調驗證時效性資訊。
- 確保模型通過爬取搜尋工具返回的 URL 來複查結果。
- 使用支援更大上下文視窗的未來推理模型測試我們的系統,不過這需要大量重構和測試來調整提示以適應不同的模型。
tag結論
即使在 R1 最近發布以來,這個領域已經有了顯著的發展。一些專案已經能以極低的成本(有些僅需 $5)訓練推理模型。這種民主化意味著訓練專門模型比以往更加容易。我們對 R1 的實驗為我們繼續探索如何增強推理型 LLM 以處理複雜搜尋任務提供了有用的基準。
雖然我們的度假規劃示例展示了令人期待的結果(尤其是對於一個快速的示範專案而言),但它也揭示了 R1 在處理搜尋和記憶任務方面的限制,相較於其在數學和編碼方面的優勢。雖然該系統成功地在預算限制內制定了旅行計劃,但在諸如驗證時效性資訊和徹底探索所有可用選項等方面表現不足,凸顯了模型訓練重點和其應用於不同領域之間的差距。