Skip to main content

Model Reference

Shaped offers a rich library of model policies that power retrieval, scoring, and ranking within your recommendation and search systems. These policies range from classic collaborative filtering techniques and rule-based heuristics to state-of-the-art deep learning architectures. Explore the available policies below to understand their capabilities and how to configure them for optimal performance.

Model types in Shapedโ€‹

Shaped systems typically use a combination of:

  • HuggingFace embedding models (zero-shot): Pre-trained encoders used to generate embeddings without training on your interaction data. These are commonly used for vector search retrieval (semantic text search, similarity, content filtering) and as feature inputs to downstream trained models.
  • Trained embedding models: Models trained or fine-tuned on your data to learn user and item representations (e.g., matrix factorization, two-tower retrieval, sequential models). These are often used for candidate retrieval, similarity, and as features for scoring.
  • Scoring models: Point-wise models used in the scoring stage to produce a relevance score for a (user, item) pair, typically using rich feature sets.

Trained embedding and scoring models are trained on the data in your engine and retrained continuously based on your configured training schedule.

Embedding modelsโ€‹

Embedding models are trained to represent items and users in vector space.

For pre-trained, zero-shot embedding generation, see HuggingFace embedding models.

HuggingFace embedding models (zero-shot)โ€‹

HuggingFace models are used for generating embeddings in a zero-shot way. They can be used for:

  • Vector search retrieval: Semantic search, similarity lookup, and content filtering using the embedding vector index.
  • Downstream features: As feature inputs to trained embedding models (e.g., two-tower, beeFormer) and scoring models (e.g., LightGBM, Wide and Deep).

In v2, HuggingFace embeddings are configured in your engine index.embeddings via the hugging_face encoder. See Use a pre-trained model.

If you prefer embeddings trained on your data, you can also encode with trained models and use them in the same retrieval and scoring flows.

You will typically use these embeddings in two places:

Common gotchas:

Supported HuggingFace model collectionsโ€‹

Shaped supports HuggingFace embedding models from:

  • Sentence Transformers: Any compatible model from the HuggingFace Sentence Transformers collection.
  • CLIP: Any compatible model from the HuggingFace CLIP collection.

Common providers and architecturesโ€‹

In addition to the collections above, users commonly use models from providers and families like:

  • Jina AI: Text and multimodal embedding models published on HuggingFace (e.g., jinaai/jina-clip-v2).
  • Nomic AI: Text embedding models published on HuggingFace (e.g., nomic-ai/*).
  • Marqo: Domain-tuned multimodal retrieval/embedding models published on HuggingFace (e.g., Marqo-published CLIP-style models).
  • Other common embedding families: E5, BGE, and GTE models, when published as compatible Sentence Transformers or CLIP-style encoders.
  • Other common multimodal architectures: OpenCLIP and SigLIP variants, when published as compatible CLIP-style encoders.

Commonly used modelsโ€‹

These are common examples used in our v2 docs:

  • sentence-transformers/all-MiniLM-L6-v2
  • sentence-transformers/modernbert
  • Alibaba-NLP/gte-modernbert-base
  • openai/clip-vit-base-patch32

Scoring modelsโ€‹

Scoring models are used to rank items by relevance or other predicted business metrics (e.g., engagement, predicted click-through-rate, conversion).

Zero-shot scoring and rerankingโ€‹

For text-heavy search use cases, Shaped also supports zero-shot rerankers and rank fusion methods that work well on a small candidate set.

These are score-stage expressions, so they can be used for both search and recommendations anywhere score(expression='...') is supported.