Docs
Web Search
Web Search
Enable real-time internet search to get current information in AI responses.
Web search integration allows AI models to access real-time information from the internet, providing up-to-date answers with source citations.
How It Works
When web search is enabled:
- AI analyzes if your question needs current information
- Searches the web for relevant sources
- Synthesizes information from multiple sources
- Provides a response with citations
Enabling Web Search
In Studio Chat
- Click the settings icon in the chat interface
- Toggle Web Search on
- Ask questions that require current information
With Alvin Routing
When using Alvin with web search enabled:
- Alvin automatically routes to web-search capable models
- Perplexity Sonar is commonly used for search queries
- Results include source citations
Use Cases
Web search is ideal for:
| Use Case | Example |
|---|---|
| Current events | "What happened in tech news today?" |
| Latest data | "What's the current price of Bitcoin?" |
| Recent releases | "What's new in React 19?" |
| Real-time info | "What's the weather in San Francisco?" |
Source Citations
Responses include clickable source citations:
Based on recent reports [1][2], the new framework offers...
Sources:
[1] https://example.com/article1
[2] https://example.com/article2
Supported Models
Web search is available with:
| Model | Search Quality |
|---|---|
| Perplexity Sonar | Excellent - native search |
| GPT-4o with search | Good - integrated search |
| Claude with search | Good - integrated search |
When using Alvin routing with web search enabled, queries are automatically routed to the most appropriate search-capable model.
Best Practices
When to Use
- Questions about current events
- Queries requiring recent data
- Fact-checking and verification
- Research and information gathering
When to Disable
- Code generation tasks
- Creative writing
- Tasks using your provided context
- Privacy-sensitive queries
Limitations
- Search results depend on public web content
- Some information may be behind paywalls
- Real-time data may have slight delays
- Not suitable for all query types
API Usage
Enable web search in API requests:
curl -X POST https://api.elyxir.ai/v1/chat/completions \
-H "Authorization: Bearer elyxir_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "perplexity/sonar",
"messages": [{"role": "user", "content": "What are the latest AI developments?"}]
}'Related
- AI Chat Overview - Using the chat interface
- Alvin Routing - Automatic model selection
- Model Hub - Explore search-capable models