Transform offline LLMs into online models with real-time internet search capabilities.
Exa provides a powerful search API that seamlessly integrates with your LLM applications, enabling real-time internet access for any model. When integrated with Portkey, Exa transforms requests by adding relevant search results before they reach the model, effectively turning offline models into online models.
Learn more about Exa and their offerings.
The Exa Online Search plugin automatically adds a context window with relevant search results from the internet before your prompt reaches the LLM:
This process allows any LLM to respond with up-to-date knowledge without retraining or fine-tuning.
Settings
→ Plugins
in the sidebarNavigate to the Guardrails
page and click Create
Search for “Exa Online Search” and click Add
Configure your search parameters:
<web_search_context>
)</web_search_context>
)Set any actions
you want on your check, and create the Guardrail!
Guardrail Actions allow you to orchestrate your guardrails logic. You can learn more about them here
input_guardrails
parameter in your Portkey Config.The Exa Plugin is supported only as an input guardrail
. It adds web search results to your request before it reaches the LLM, which is why only before_request_hooks
are supported and not after_request_hooks
on Portkey’s gateway. Learn more about guardrails here
Combine with Output Guardrails: Pair Exa with output validation guardrails to ensure not just up-to-date information, but also accurate formatting and content safety.
Manage Token Usage: Be mindful that adding search context increases token consumption. Monitor usage patterns and adjust the number of search results accordingly.
Use Domain Filtering: For specialized applications, use domain filtering to ensure information comes from authoritative sources relevant to your use case.
Test Thoroughly: Different models may respond differently to the added context. Test your configuration across various query types and models.
All Exa-enhanced requests are logged in the Portkey dashboard. You can review:
Does this work with all LLM providers?
Yes, the Exa Online Search plugin works with any LLM provider supported by Portkey, including OpenAI, Anthropic, Cohere, and more. The plugin adds context before your prompt reaches the model, so it’s model-agnostic.
How does this affect token usage?
Adding search results as context will increase token usage since the prompt becomes longer. The exact increase depends on the number of search results and their length. You can control this by adjusting the “Number of Results” parameter.
How fresh are the search results?
Exa provides real-time search results from across the web, with freshness depending on how quickly content is indexed. For most major news and information sources, content is available within minutes to hours of publication.
How does this differ from using OpenAI's web search capability?
Unlike OpenAI’s browsing capability which is limited to specific models and the OpenAI ecosystem, Exa Online Search works with any LLM provider and model available through Portkey, giving you more flexibility and control.
If you face any issues with the Exa integration, reach out to the Portkey team on the community forum.
Transform offline LLMs into online models with real-time internet search capabilities.
Exa provides a powerful search API that seamlessly integrates with your LLM applications, enabling real-time internet access for any model. When integrated with Portkey, Exa transforms requests by adding relevant search results before they reach the model, effectively turning offline models into online models.
Learn more about Exa and their offerings.
The Exa Online Search plugin automatically adds a context window with relevant search results from the internet before your prompt reaches the LLM:
This process allows any LLM to respond with up-to-date knowledge without retraining or fine-tuning.
Settings
→ Plugins
in the sidebarNavigate to the Guardrails
page and click Create
Search for “Exa Online Search” and click Add
Configure your search parameters:
<web_search_context>
)</web_search_context>
)Set any actions
you want on your check, and create the Guardrail!
Guardrail Actions allow you to orchestrate your guardrails logic. You can learn more about them here
input_guardrails
parameter in your Portkey Config.The Exa Plugin is supported only as an input guardrail
. It adds web search results to your request before it reaches the LLM, which is why only before_request_hooks
are supported and not after_request_hooks
on Portkey’s gateway. Learn more about guardrails here
Combine with Output Guardrails: Pair Exa with output validation guardrails to ensure not just up-to-date information, but also accurate formatting and content safety.
Manage Token Usage: Be mindful that adding search context increases token consumption. Monitor usage patterns and adjust the number of search results accordingly.
Use Domain Filtering: For specialized applications, use domain filtering to ensure information comes from authoritative sources relevant to your use case.
Test Thoroughly: Different models may respond differently to the added context. Test your configuration across various query types and models.
All Exa-enhanced requests are logged in the Portkey dashboard. You can review:
Does this work with all LLM providers?
Yes, the Exa Online Search plugin works with any LLM provider supported by Portkey, including OpenAI, Anthropic, Cohere, and more. The plugin adds context before your prompt reaches the model, so it’s model-agnostic.
How does this affect token usage?
Adding search results as context will increase token usage since the prompt becomes longer. The exact increase depends on the number of search results and their length. You can control this by adjusting the “Number of Results” parameter.
How fresh are the search results?
Exa provides real-time search results from across the web, with freshness depending on how quickly content is indexed. For most major news and information sources, content is available within minutes to hours of publication.
How does this differ from using OpenAI's web search capability?
Unlike OpenAI’s browsing capability which is limited to specific models and the OpenAI ecosystem, Exa Online Search works with any LLM provider and model available through Portkey, giving you more flexibility and control.
If you face any issues with the Exa integration, reach out to the Portkey team on the community forum.