# Embedding

## EmbeddingEngine

::: aifastdb.EmbeddingEngine

Vector embedding generation with text, batch, multimodal, and numpy support.

```python
from aifastdb import EmbeddingEngine

engine = EmbeddingEngine()                  # dummy 384d
engine = EmbeddingEngine(dimension=128)     # custom dimension
engine = EmbeddingEngine.minilm()           # MiniLM (requires candle)

vec = engine.embed("Hello")                 # list[float]
arr = engine.embed_numpy("Hello")           # numpy.ndarray
vecs = engine.embed_batch(["a", "b", "c"]) # list[list[float]]

sim = EmbeddingEngine.cosine_similarity(vec, vec)  # 1.0
```

## PerceptionPipeline

::: aifastdb.PerceptionPipeline

Combined embedding + reasoning pipeline with `remember_with_embedding()`.

```python
from aifastdb import PerceptionPipeline

pipe = PerceptionPipeline()
result = pipe.remember_with_embedding("content", "doc1", tags=["tag"])
# {"id": "doc1", "content": "...", "embedding": [...], "dimension": 384, ...}
```
