This section contains comprehensive documentation for the RAG Modulo API and its simplified architecture.
- Search API - Complete search API documentation with automatic pipeline resolution
- Search Schemas - Data structures for search requests and responses
Simplified Pipeline Resolution: The search API now automatically handles pipeline selection based on user context, eliminating client-side pipeline management complexity.
Breaking Changes from Legacy API:
- Removed
pipeline_idfrom SearchInput schema - Added automatic pipeline resolution in SearchService
- Simplified CLI interface without pipeline parameters
- Enhanced error handling for configuration issues
- Service Configuration - Service-based configuration system
- Provider Configuration - LLM provider and model management
- Prompt Templates - Template management system
- Question Suggestion - Intelligent query suggestions
- Custom Voice API - Voice sample upload and custom voice management
Development-specific documentation has been moved to:
- Backend Development - Guidelines and development tasks
Before (Legacy):
# Client had to manage pipeline selection
pipeline_id = get_user_pipeline(user_id, collection_id)
search_input = SearchInput(
question="What is ML?",
collection_id=collection_id,
user_id=user_id,
pipeline_id=pipeline_id # Client-managed
)After (Current):
# Backend handles pipeline selection automatically
search_input = SearchInput(
question="What is ML?",
collection_id=collection_id,
user_id=user_id
# No pipeline_id needed
)-
SearchInput Schema:
- ✅ Removed
pipeline_idfield - ✅ Added
extra="forbid"validation - ✅ Simplified field requirements
- ✅ Removed
-
Service Layer:
- ✅ Added automatic pipeline resolution
- ✅ Enhanced error handling
- ✅ Improved user experience
-
CLI Interface:
- ✅ Removed pipeline parameters
- ✅ Simplified command structure
- ✅ Automatic configuration
- Unit Tests: Schema validation, service logic, pipeline resolution
- Integration Tests: End-to-end search flow, database integration
- API Tests: Endpoint validation, error handling
# Schema and service tests
pytest backend/tests/unit/test_search_service_pipeline_resolution.py
# Integration tests
pytest backend/tests/integration/test_search_integration.py
# API endpoint tests
pytest backend/tests/api/test_search_endpoints.py- First search for new users triggers pipeline creation
- Pipeline creation includes LLM provider validation
- Default configurations applied automatically
- All operations logged for audit
- Response caching based on search input hash
- Pipeline resolution results cached per user
- Configurable cache TTL (default: 1 hour)
- User authentication required for all operations
- Collection access validation
- Pipeline isolation between users
- Audit logging for all search activities
- Strict schema validation with
extra="forbid" - Query length and content validation
- Configuration parameter range checking
- SQL injection prevention
-
Configuration Errors:
- No LLM provider configured
- Invalid provider credentials
- Missing pipeline configuration
-
Access Errors:
- Collection not found or access denied
- User authentication failures
- Rate limiting violations
-
Validation Errors:
- Invalid search input format
- Parameter out of range
- Malformed configuration metadata
{
"detail": "Error description",
"error_code": "STANDARDIZED_ERROR_CODE",
"timestamp": "2023-12-07T10:30:00Z",
"request_id": "req-unique-id",
"user_id": "user-uuid-if-available"
}-
Enhanced Pipeline Resolution:
- Context-aware pipeline selection
- Collection-specific optimizations
- A/B testing support
-
Advanced Search Features:
- Multi-collection search
- Streaming responses
- Real-time suggestions
-
Performance Optimizations:
- Parallel processing
- Predictive caching
- Resource optimization
-
Analytics and Monitoring:
- Search quality metrics
- Performance dashboards
- Usage analytics
For additional help:
- Check the troubleshooting guide
- Review configuration options
- See development workflow
Last Updated: December 2023 API Version: 2.0 (Simplified Pipeline Resolution)