# kensakun

## Install

```sh
uv add kensakun
```


## Use

```py
from kensakun import Engine, Encoder

encoder = Encoder.from_model_name(
  "Snowflake/snowflake-arctic-embed-m-v1.5",
  truncation_ratio=0.5,
)
engine = Engine.init(encoder, top_n=10)

docs = ["Mannheim is amazing.", "Earth is flat."]

engine.add_documents(docs)

query = "Tell me about Mannheim."
retrieved_docs, retrieved_indexes = engine.search(query)
# -> ['Mannheim is amazing.', 'Earth is flat.'], [0, 1]
```
