Shaped's AI Transforms User Interactions into Instant Recommendations
Shaped has developed an advanced AI-powered recommendations and search platform that processes millions of user interactions per second. The platform's architecture handles three primary data types - users, items, and events - using sophisticated models for candidate retrieval, filtering, scoring, and ordering. Through continuous data ingestion and model retraining, Shaped maintains high performance while scaling to support thousands of users and items. The company's technical approach prioritizes direct data connection over manual transformation processes, enabling real-time AI functionality that adapts to evolving user preferences and global trends.
Shaped's architecture processes three primary data types: users, items, and events. Users represent personalized identities, while items contain surfaced content. Events capture user-item interactions, including behavioral information and interaction objectives like clicks, add-to-cart, or daily-active users. The platform analyzes items' attributes to determine content similarity and users' attributes for understanding user similarity, particularly beneficial for new users (cold-start).
Model training involves analyzing data schema, format, and volume to select appropriate recommendation models for specific use-cases. Cross-validation is performed on a held-out test set to determine the best subset of models for evaluation metrics. These models undergo A/B testing and evaluation online to ensure only the highest-performing model serves users. Shaped implements multiple models providing ranked results: content understanding models for feature encoding, initial item candidate retrieval, user-item affinity scoring, and ranking optimization for secondary objectives like recommendation diversity.
After deployment, Shaped continuously improves the recommendation system through ongoing data ingestion. This process ensures the platform maintains the most up-to-date user, item, and event data, using it to retrain recommendation models and account for data distribution shifts (recent trends in data). The system also employs subsequent events' feedback to continually adjust model configurations and weights.
The platform's infrastructure securely connects directly to a business's database, data warehouse, or analytics applications for real-time data ingestion, eliminating the need for logging infrastructure. Data processing occurs through two pipeline types: stream processing handles data within 30 seconds, while batch processing operates at 4-hour intervals. Shaped utilizes DuckDB SQL extended with connector sources, implementing native query capabilities to limit data fetching and enhance performance.
For real-time functionality, Shaped processes users, items, and events within 30 seconds, enabling dynamic reranking based on user session interactions, recent global trends, and updated item feature attributes. The platform supports multiple ranking use-cases, including content diversity, cart size optimization, and stakeholder-specific performance metrics. Shaped specializes in state-of-the-art AI technologies like transformers and Large Language Models (LLMs), making complex data types including text, images, and video usable for ranking systems.
The company provides two primary interfaces: the Model API for setting up data connections and model configurations, and the Rank API handling model inference. Key architectural components include content understanding models that encode user and item data using advanced tabular, language, image, and video encoders for downstream retrieval and ranking models. Shaped implements a real-time feature store for efficient serving during training and inference, with machine-learning training focused on subset architectures trained and evaluated for specific use cases. The best-performing models deploy to users through a continuous deployment process indexing generated embeddings in a vector store and serving them via real-time endpoints.
The recommendation system architecture consists of four main stages: candidate retrieval (high recall step using offline collaborative filtering or online methods), candidate filtering (removing last-minute items including viewed or depleted inventory), scoring (determining user interaction confidence considering both user and item context), and ordering (final ranked results with random items added to avoid filter bubbles). The company provides several model policies for each stage, continuously evaluating and optimizing combinations for specific data and use cases to achieve highest uplift.
Shaped's platform handles the processing requirements of millions of users and items through a scalable infrastructure that supports both real-time and batch processing operations. The system processes up to 1,000 requests per second, with capabilities to handle 100 million unique users, 10 million unique items, 50 million personal filters, and process 36 million requests monthly.
The platform achieves this scale through its architecture that ingests data from multiple sources including BigQuery, Snowflake, Redshift for data warehouses; MySQL, Postgres for databases; S3, GCS for blob storage; and analytics platforms like Segment and Amplitude. Data processing occurs through two pipeline types: stream processing handles data within 30 seconds for immediate response, while batch processing operates at 4-hour intervals for comprehensive data analysis.
The platform's ability to ingest and process data efficiently is supported by its use of DuckDB SQL extended with connector sources, implementing native query capabilities to optimize data fetching and processing. This infrastructure enables Shaped to support real-time AI functionality, processing users, items, and events within 30 seconds. This real-time capability allows for dynamic reranking that adapts to evolving user preferences, global trends, and updated item feature attributes. The system particularly excels in handling session-based recommendations, which are especially useful for serving content to anonymous or new users (cold-start).
The company's infrastructure demonstrates impressive scalability, with the ability to handle up to 100 million unique users, 10 million unique items, 50 million personal filters, and process 36 million requests monthly. This capability allows the platform to maintain performance and reliability as businesses grow, with the system ingesting both user and item catalog information in just 10 minutes and handling event and filter ingestion in less than 30 seconds.
Data ingestion occurs through two pipeline types: stream processing handles data within 30 seconds, while batch processing operates at 4-hour intervals. Shaped uses DuckDB SQL extended to include connector sources, with under-the-hood SQL syntax tree parsing for performance optimization. Connectors provide native queries to limit data fetching, improving efficiency.
The platform supports real-time AI functionality, processing user interactions, items, and events within 30 seconds. This enables dynamic reranking that adapts to evolving user preferences, global trends, and updated item feature attributes. The system particularly excels in handling session-based recommendations, which are especially useful for serving content to anonymous or new users.
Shaped's security framework includes enterprise-grade protection, with compliance achieved through GDPR and SOC2 standards. The platform's infrastructure demonstrates impressive scalability, supporting up to 100 million unique users, 10 million unique items, 50 million personal filters, and processing 36 million requests monthly.
The company has developed a comprehensive integration capability, supporting multiple data sources through various connectors. These include BigQuery, Databricks, DynamoDB (Beta), Firestore, Google Cloud Storage, Google Analytics, and multiple database systems like PostgreSQL and Microsoft SQL Server. The platform also integrates with analytics applications such as Segment and Amplitude.
Shaped's technical approach prioritizes direct data connection over manual transformation processes. The company's generative AI capabilities enable content understanding without manual tagging, adapting to user behavior in real-time. Technical support is available through multiple channels, including JavaScript and Python packages and API documentation, making the platform accessible to both technical experts and non-technical users.
The company's model creation process begins with goal alignment between the client's hero use-case and uplift goals. This involves identifying relevant user, item, and event data sources and working through Shaped's "Schema Jam" process to determine specific connector requirements.
Model development proceeds through several key steps. Shaped provisions API keys and creates initial models, setting up connections to user, item, and event data sources along with data transformation processes. This initial setup typically takes 1-2 days to complete. The company then performs offline evaluation using their command-line interface (CLI) to test model inference and visualize results, with this phase taking one week.
Before production deployment, clients participate in A/B testing using Shaped's tools to measure performance uplift on actual users. The company recommends specific evaluation criteria and typically completes this phase in 1-3 weeks. Successful A/B testing leads to production deployment, with the company providing ongoing support during the process.
The platform supports continuous model iteration across multiple personalization use-cases. Each new use-case follows the same model creation process, but subsequent models benefit from the company's growing understanding of the data and increased iteration speed. The typical workflow for additional models involves 1-2 days for API key setup and data connection, followed by one week of offline evaluation and 1-3 weeks for A/B testing and production deployment.
Once models are deployed, the company maintains them through continuous data ingestion. This ensures the recommendation system incorporates the latest user, item, and event data, allowing for regular model retraining and weight updates. The platform's infrastructure enables efficient handling of data distribution shifts and ongoing performance improvements through continuous learning from subsequent user interactions.
Shaped's deployment process allows for flexible insertion into existing tech stacks through multiple interface options. The company's architecture supports both technical experts and non-technical users, offering documentation in multiple formats including JavaScript and Python packages and API documentation. As noted by Matt Koh of Brandazine, Shaped demonstrates impressive capabilities in delivering custom models while maintaining ease of use.
Shaped addresses cold-start problems through three primary strategies while maintaining real-time processing capabilities:
The platform employs user and item context features to rank results similarly to users or items with more interaction data. For users, this may include demographic or interest data collected at sign-up, while item features can encompass metadata, descriptions, or content type. This approach helps provide relevant recommendations even for users with limited interaction history.
To ensure new items receive visibility, Shaped intelligently injects them into the ordering step through the exploration_factor argument within the Create Model API. This adjustable mechanism allows the system to introduce cold-start items while maintaining overall recommendation quality.
For users engaged with the system for the first time, Shaped's endpoint processes the latest user interactions (sessions) to deliver contextually relevant recommendations. This capability enables serving personalized content to both new and anonymous users, expanding the platform's reach beyond existing user bases.
The company's infrastructure demonstrates exceptional scalability, supporting up to 100 million unique users, 10 million unique items, 50 million personal filters, and processing 36 million requests monthly. This robust foundation enables the platform to handle user and item catalog ingestion in just 10 minutes and process events and filters in less than 30 seconds, maintaining real-time responsiveness even during peak usage.
The technical architecture ensures this performance through optimized data processing pipelines, with stream processing handling data within 30 seconds for immediate response. Native query capabilities implemented through DuckDB SQL extended with connector sources optimize data fetching and processing, allowing the system to handle 1,000 requests per second while supporting multiple ranking use-cases including content diversity, cart size optimization, and stakeholder-specific performance metrics.