Ahnlich AI proxy
The AI proxy lets you work in text, images, and audio instead of numbers.
Ahnlich DB stores and searches vectors — but where do those vectors come from? Normally you'd have to run a machine-learning model yourself to turn a sentence or an image into numbers before saving it. That's the fiddly part.
The Ahnlich AI proxy sits in front of the database and does that step for you. You hand it raw text, an image, or audio; it picks the right model, produces the vector, and stores or searches it in Ahnlich DB — automatically.
Why it helps
Without the proxy you'd write code to load a model, embed your input, keep the model versions in sync between saving and searching, and only then call the database. The proxy removes all of that. You send:
INSERT "The rise of renewable energy storage" INTO article_store…and behind the scenes it becomes a vector and lands in the database. When you search, you again send plain text — the proxy embeds your query the same way, so the comparison is fair.
The one key idea: model-aware stores
When you create a store through the AI proxy, you choose two models:
| Model | When it runs | Its job |
|---|---|---|
| Index model | when you add data | turn each stored item into a vector |
| Query model | when you search | turn each query into a vector |
There's a single rule: both models must output vectors of the same size (dimension), so stored items and queries live in the same space and can be compared.
CREATESTORE my_store QUERYMODEL all-minilm-l6-v2 INDEXMODEL all-minilm-l6-v2Text, images, and audio
Because the index and query models are chosen separately, you can mix modalities — text, images, or audio — as long as the two models output the same dimension:
-
Text → text (same model both sides): classic semantic search over documents.
CREATESTORE product_store QUERYMODEL all-minilm-l6-v2 INDEXMODEL all-minilm-l6-v2 -
Text → image (different, compatible models): index photos, then search them with words like "blue denim jacket".
CREATESTORE image_store QUERYMODEL all-minilm-l6-v2 INDEXMODEL resnet-50
Ready-to-use models
The proxy ships with several off-the-shelf models for text and images (MiniLM, BGE variants, ResNet-50, CLIP, and more). You don't install or fine-tune anything — you just name the model when creating a store. See Supported models for the full list.
Searching in plain language
At query time you provide natural input, not vectors:
GETSIMN 3 WITH ["climate change effects on agriculture"] USING cosinesimilarity IN news_storeThe proxy embeds your query, asks Ahnlich DB for the nearest stored vectors, and returns the matching items.
Where to go next
- Quickstart: Ahnlich AI — the recommended starting point.
- Command reference — every command.
- Supported models — text and image models you can use.
- Advanced — model parameters, input types, and more.