Skip to main content

Advanced

Unlike Ahnlich DB, which is concerned with similarity algorithms and indexing, Ahnlich AI focuses on embedding generation. The service introduces model-aware stores, where you define the embedding models used for both data insertion (indexing) and querying. This abstraction lets developers work directly with raw inputs (text or images) while the AI proxy handles embedding generation.

Supported Models​

Ahnlich AI includes several pre-trained models that can be configured depending on your workload. These cover both text embeddings and image embeddings:

Model NameString NameTypeDescription
ALL_MINI_LM_L6_V2all-minilm-l6-v2TextLightweight sentence transformer. Fast and memory-efficient, ideal for semantic similarity in applications like FAQ search or chatbots.
ALL_MINI_LM_L12_V2all-minilm-l12-v2TextLarger variant of MiniLM. Higher accuracy for nuanced text similarity tasks, but with increased compute requirements.
BGE_BASE_EN_V15bge-base-en-v1.5TextBase version of the BGE (English v1.5) model. Balanced performance and speed, suitable for production-scale applications.
BGE_LARGE_EN_V15bge-large-en-v1.5TextHigh-accuracy embedding model for semantic search and retrieval. Best choice when precision is more important than latency.
RESNET50resnet-50ImageConvolutional Neural Network (CNN) for extracting embeddings from images. Useful for content-based image retrieval and clustering.
CLIP_VIT_B32_IMAGEclip-vit-b32-imageImageVision Transformer encoder from the CLIP model. Produces embeddings aligned with its paired text encoder for multimodal tasks.
CLIP_VIT_B32_TEXTclip-vit-b32-textTextText encoder from CLIP. Designed to map textual inputs into the same space as CLIP image embeddings for text-to-image or image-to-text search.

Supported Input Types​

Input TypeDescription
RAW_STRINGAccepts natural text (sentences, paragraphs). Transformed into embeddings via a selected text-based model.
IMAGEAccepts image files as input. Converted into embeddings via a selected image-based model (e.g., ResNet or CLIP).

Example – Creating a Model-Aware Store​

CREATESTORE my_store QUERYMODEL all-minilm-l6-v2 INDEXMODEL all-minilm-l6-v2
  • index_model - defines how inserted data is embedded before being stored in Ahnlich DB.

  • query_model - defines how queries are embedded at search time.

  • Both models must output embeddings of the same dimensionality to ensure compatibility.

Choosing the Right Model​

ModelBest Use Case
MiniLM (L6/L12)Fast, efficient semantic similarity (FAQs, chatbots).
BGE (Base/Large)High semantic accuracy for production-scale applications.
ResNet50Image-to-image similarity and clustering.
CLIP (Text+Image)Multimodal retrieval (text-to-image / image-to-text search).