Building LLM applications often forces developers into a bifurcated architecture: vector stores for static knowledge and bolted-on HTTP clients for live web data. Solon AI is challenging this norm with its solon-ai-rag-searchs family, which treats web search as just another Repository. By implementing the same interface used by vector stores and in-memory lists, the framework allows developers to swap search backends without changing agent logic. This design decision, introduced in version 3.1 and refined through 3.10.1, aims to reduce the cognitive load of managing disparate knowledge sources.

The Minimalist Interface

The core of this abstraction is the Repository interface, which requires only one method: search(QueryCondition condition). The QueryCondition object standardizes parameters like limit, similarityThreshold, and freshness (supporting values like ONE_DAY or ONE_YEAR). Crucially, the interface hides provider-specific details such as API keys or vendor names, which remain encapsulated within the implementation builders. This separation ensures that the calling code remains agnostic to whether it is querying a local vector database or a remote search API, promoting cleaner, more maintainable codebases.

Three Implementations, One Contract

The framework ships with three distinct adapters, each demonstrating a different philosophy. The Bocha adapter serves as the reference implementation, mapping JSON responses directly to Document objects and throwing explicit IOExceptions on failure. The Baidu AI Search adapter offers dual modes: a classic results list and an AI-synthesized answer. In AI mode, the synthesized response is returned as the first document in the list, tagged with metadata type: ai_answer, allowing uniform consumption. Tavily, the most feature-rich option, exposes search, extract, crawl, and map operations. Despite its name, TavilySimpleSearchRepository provides the full suite of capabilities, while TavilyWebSearchRepository offers a simplified wrapper for basic use cases.

Agent Integration and Best Practices

Moving beyond passive retrieval, Solon AI introduces RepositoryTool in version 3.10.1, enabling agents to actively decide when to search. This tool accepts multiple queries (capped at five to prevent context bloat) and formats results as Markdown. The framework also provides a counterintuitive but practical guideline: avoid using embedding models for web search re-ranking. Since web engines already rank results by relevance, cosine similarity between short queries and web snippets is often noisy and unnecessary. The promptAugment method remains available for simple RAG tasks, but RepositoryTool is recommended for autonomous agents that need to self-direct their knowledge retrieval.

Key Takeaways

  • Web search is treated as a first-class Repository alongside vector stores, simplifying architecture.
  • The QueryCondition class standardizes parameters like freshness and limits across all providers.
  • Baidu's AI mode returns synthesized answers as documents, maintaining interface consistency.
  • Tavily provides advanced features like crawling and extraction, though naming conventions may confuse newcomers.
  • Embedding-based re-ranking is discouraged for web search due to low signal-to-noise ratios.
  • RepositoryTool enables active, self-directed search in agents with context budget protections.

The Bottom Line

Solon AI's approach strips away the complexity of hybrid RAG systems, offering a pragmatic, builder-friendly solution for unifying knowledge sources. By abstracting away vendor differences, it lets developers focus on agent behavior rather than plumbing.