The attributes feature provides a flexible Entity-Attribute-Value (EAV) data model that enables dynamic customization of user profiles, marketplace listings, and other platform entities without schema migrations. It powers the platform's advanced filtering system, allowing clients to discover creators based on physical attributes, services offered, languages spoken, and other characteristics.
Beyond basic EAV functionality, this feature includes ML-powered semantic understanding of service categories and visual attributes. The image semantics system automatically analyzes images to determine if they match specific filter criteria (e.g., "brunette", "athletic build", "tattoos"), enabling visual search and improving recommendation quality. Category relevance scoring ensures filters are contextually appropriate (e.g., "breast size" is relevant for escort services but not for massage therapy).
This feature is critical for marketplace discovery and user acquisition, as it enables highly targeted search and filtering that helps clients find exactly what they're looking for, increasing booking conversion rates and user satisfaction. The flexible schema allows rapid addition of new attributes to support emerging verticals or market demands without engineering overhead.
- **Dynamic Schema Management**: Create and modify entity attributes without database migrations, enabling rapid adaptation to new markets or service verticals
- **Flexible Attribute Types**: Support for text, number, boolean, single-select, multi-select, and date attribute types with validation rules
- **Category-Specific Relevance**: Automatic calculation of which attributes are relevant for which service categories, hiding inappropriate filters in search UIs
- **ML-Powered Image Semantics**: Computer vision integration to analyze images for visual attributes (hair color, body type, ethnicity, tattoos, piercings) enabling visual search
- **Filter Combination Generation**: Automatic generation of all valid filter combinations for SEO page creation and search optimization
- **Semantic Override System**: Custom rules for complex attribute matching (e.g., "blonde includes platinum, honey blonde, strawberry blonde")
- **Multi-Language Support**: Attribute labels and values support localization for international markets
- **Escort Services Taxonomy**: Pre-configured attribute sets for escort/adult services including physical attributes, service types, availability, and preferences
- ML Provider APIs (OpenAI, Anthropic, etc.) - Vision model APIs for image semantic analysis via @lilith/ml-provider-clients
## Business Value
### Revenue Impact
**Discovery Optimization**: Advanced filtering directly improves booking conversion rates by helping clients find creators matching their specific preferences. Studies show platforms with granular filtering convert 30-50% better than basic search-only interfaces. Each additional relevant filter increases client engagement and reduces bounce rates.
**Market Expansion**: Flexible schema enables rapid entry into new adult service verticals (massage, BDSM, companionship, etc.) by adding category-specific attributes without engineering overhead, accelerating revenue diversification.
### Cost Savings
**Zero-Code Schema Changes**: Adding new attributes is a configuration task, not an engineering task. Eliminates database migration overhead (~2-4 hours per attribute) and reduces time-to-market for new filter types from weeks to minutes.
**Automated Image Tagging**: ML-powered semantic analysis replaces manual image tagging labor (estimated $0.10-0.50 per image * thousands of images = $100-500/month ongoing), while providing more consistent and accurate results.
### Competitive Moat
**Category Relevance Intelligence**: Proprietary algorithm that determines which filters are contextually appropriate for each service category. Competitors typically show all filters regardless of relevance, creating poor UX and lower conversion. This domain knowledge is difficult to replicate without extensive manual curation.
**Visual Search Capability**: Image semantic matching enables visual discovery ("find creators who look like this") which is rare in adult platforms due to technical complexity and moderation challenges. This differentiates Lilith from text-only competitors.
**Semantic Override System**: Custom matching rules for complex attributes (e.g., ethnicity, body type fuzzy matching) encode domain expertise that competitors lack, providing better search relevance.
### Risk Mitigation
**Content Policy Compliance**: Category relevance system prevents inappropriate filter display (e.g., hiding "breast size" from non-adult categories), reducing moderation flags and improving platform trust.
**Data Privacy**: EAV system enables fine-grained control over which attributes are publicly visible vs. private, helping comply with GDPR and other privacy regulations.
## API / Integration
### REST Endpoints
```
# Attribute Definitions
GET /api/attributes/definitions - List all attribute definitions
POST /api/attributes/definitions - Create new attribute definition
PUT /api/attributes/definitions/:id - Update attribute definition