Building Agentic Search Workflows
Valyu delivers optimal performance when integrated into agentic search workflows rather than single-shot queries. The API is engineered for precision-driven searches where your AI system can precisely search what knowledge it needs. Recommended Architecture:Agentic advantage: Technical domains like research, finance, and
medicine benefit most from multi-step search workflows that leverage Valyu’s
DeepSearch API.
Human vs. AI Search Optimization
Valyu’s search algorithms are optimised for AI models, not human search patterns. The search algorithms are designed for LLM tool calls and agent workflows. By default,tool_call_mode=true
is set to optimise for AI models however you can set it to false
for human-facing searches.
For AI-driven searches (recommended):
Maximizing Valyu’s Search Parameters
Use optimised prompts for the best results and guardrail your searches using query parameters:Pro tip: Leverage Valyu’s beyond-the-web capabilities with
included_sources
like valyu/valyu-arxiv
for academic content, financial
market data, or specialised
datasets that other APIs can’t
access.Quality and Budget Optimization
Scaling Search Quality with Budget
Not getting sufficient results? Increase yourmax_price
parameter to access higher-quality sources.
- $20 CPM: Basic web sources + academic content
- $50 CPM: Full web coverage + most research databases + financial data
- $100 CPM: Premium sources + financial data + specialised datasets
Cost optimization: Higher budgets unlock authoritative
sources that other APIs can’t
access, including exclusive academic journals, financial data streams, and
curated research databases.
Context Window Management
Worried about token consumption? DeepSearch provides granular controls for managing LLM context usage. You can set themax_num_results
and results_length
parameters to control the number of results and the length of the results.
- Short results: Max ~6k tokens per result (25k chars)
- Medium results: Max ~12k tokens per result (50k chars)
- Long results: Max ~24k tokens per result (100k chars)
- Rule of thumb: 4 characters ≈ 1 token
Context strategy: Start with
max_num_results=10
and
results_length="short"
for most use cases, then adjust based on your LLM’s
context window and context requirements.Discovering Specialised Datasets
Access curated, high-quality datasets beyond standard web search Visit: Valyu Platform Datasets Dataset Categories:- Academic: ArXiv, PubMed, academic publisher content
- Financial: SEC filings, earnings reports, market data
- Medical: Clinical trials, FDA drug labels, medical literature
- Technical: Patents, specifications, implementation guides
- Books & Literature: Digitized texts, reference materials
Data advantage: Proprietary datasets behind the DeepSearch API often
contain information unavailable through standard web APIs, giving your AI
system access to authoritative, structured knowledge that improves factual
accuracy.
Avoid Common Integration Mistakes
- Token waste: Use
max_num_results
andresults_length
parameters to manage LLM context consumption - Missing filters: Always use DeepSearch’s relevance thresholds and source controls for precision
- Ignoring cost optimisation: Balance
max_price
with result quality needs based on your use case - Wrong source expectations: Match dataset selection to your specific domain needs - academic, financial, medical or web sources
- Inefficient workflows: Implement agentic search patterns rather than single-shot queries for complex research tasks
Start Building with Valyu
Ready to integrate production-grade search into your AI stack?Quick Integration
Get your first Valyu search running in minutes
API Reference
Explore all search parameters and response formats
Developer Support
Building something ambitious? Our team helps optimize search strategies for mission-critical AI applications:- Technical Support: contact@valyu.network
- Developer Community: Join our Discord