siva.sh powers its search experience using a flexible architecture that smoothly transitions from exact keyword matching to deep semantic search—and ultimately, Retrieval-Augmented Generation (RAG).
1. Keyword to Hybrid to Semantic
Different queries demand different search strategies. A user searching for a specific verse number needs exact matching, while a user exploring abstract concepts (e.g., "liberation from cycle of birth") needs conceptual understanding.
Our pipeline allows search to be tuned dynamically across a full spectrum:
- Pure Keyword: Fast, deterministic lexical search for exact matches.
- Hybrid Search: Combines keyword frequency with vector proximity to balance precision and intent.
- Pure Semantic Search: Uses dense vector representations to retrieve contextually relevant verses, even if they don't share exact words with the query.
2. Advanced Search Tools & Fine-Tuning
To make a multi-thousand-verse corpus manageable for researchers and general readers alike, our retrieval engine is paired with interactive search controls designed for precision and deep exploration.
Search Pagination
Navigating massive query result sets requires low latency and stateful tracking.
- Stateful Offset Management: Whether executing vector-based Approximate Nearest Neighbors (ANN) or traditional lexical queries, results are paginated seamlessly to keep response payloads small and render times under milliseconds.
- Deep Result Navigation: Researchers can traverse through complete result sets without degrading search performance or losing ranking context.
Search Fine-Tuning & Parameter Control
Not every query should be handled identically. Users can interactively adjust search parameters to tailor result retrieval to their exact research needs:
- Metadata Refinement & Faceting: Filter search scopes dynamically across specific books, chapters (Kandas/Parvas)
- Hybrid Weight Adjustment: Interactively shift the balance between exact keyword matching and semantic vector similarity depending on whether you are searching for precise Sanskrit terminology or broad philosophical concepts.
- Cut-off Thresholding: Set similarity score thresholds for semantic queries to eliminate low-confidence vector matches, ensuring that retrieved verses closely match the intended context.