fix(tool): inject current date into web search tool description to prevent llm temporal hallucinations
This commit is contained in:
parent
d20cb364a2
commit
73f426bc47
1 changed files with 1 additions and 1 deletions
|
|
@ -393,7 +393,7 @@ func (t *WebSearchTool) Name() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *WebSearchTool) Description() string {
|
func (t *WebSearchTool) Description() string {
|
||||||
return "Search the web for current information. Returns titles, URLs, and snippets from search results."
|
return fmt.Sprintf("Search the web for current information. Returns titles, URLs, and snippets from search results. Today's date is %s. Use this when you need to construct date-specific search queries.", time.Now().Format("2006-01-02"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *WebSearchTool) Parameters() map[string]any {
|
func (t *WebSearchTool) Parameters() map[string]any {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue