Merged
Conversation
Contributor
Greptile SummaryThis PR fixes an issue where Exa web search fails when using the The implementation adds a
The solution is clean, extensible, and follows the existing architecture patterns. The string formatting approach with Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant PromptBuilder as build_system_prompt
participant WebSearchTool
participant ExaClient
participant LLM
User->>PromptBuilder: Request system prompt with tools
PromptBuilder->>WebSearchTool: Check has_web_search
PromptBuilder->>WebSearchTool: supports_site_filter?
WebSearchTool->>ExaClient: supports_site_filter
ExaClient-->>WebSearchTool: False
WebSearchTool-->>PromptBuilder: False
PromptBuilder->>PromptBuilder: Set site_disabled_guidance = WEB_SEARCH_SITE_DISABLED_GUIDANCE
PromptBuilder->>PromptBuilder: Format WEB_SEARCH_GUIDANCE with site_disabled_guidance
PromptBuilder-->>User: System prompt with "Do not use site: operator"
User->>LLM: Send prompt
LLM->>LLM: Follow guidance, avoid site: operator
LLM-->>User: Search results without site: filter issues
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Exa fails to search in format site:whatever for sites like reddit, just turning it off with prompt change hopefully.
How Has This Been Tested?
Checked locally
Additional Options
Summary by cubic
Disable "site:" usage in web search prompts when using Exa to prevent failed queries (e.g., reddit), and add a provider capability flag to control this behavior. This reduces search errors and makes queries more reliable.
Bug Fixes
Refactors
Written for commit 7041a47. Summary will update on new commits.