Blog

Technical articles on AI inference, search, embeddings, and building developer tools.

· 5 min read

Why I Built a Native ML Inference Engine in Rust

Kjarni is a single native library that runs transformer models in your own process, from Rust, C#, Go, C++ or the command line. One install, on CPU, offline after the first run.

rust machine-learning inference embeddings transformers nlp kjarni
Read more
· 4 min read

Sentiment Analysis in C#: Three Lines, Tokenizer Included

Run sentiment analysis locally in C# using transformer models. Positive, negative, neutral, emotions, toxicity. Three lines of code, one NuGet package, running on your own machine.

C# dotnet sentiment-analysis machine-learning nlp transformers kjarni
Read more
· 6 min read

Build a Document Search Engine in C#

Build a full-text search engine in C# with keyword search, semantic search, hybrid ranking, and reranking. Index files and query them in 10 lines of code, with the index living on your own disk.

C# dotnet search-engine semantic-search bm25 reranking machine-learning nlp kjarni
Read more
· 7 min read

Reranking in C#: Better Search Results With a Cross-Encoder

Improve search relevance in .NET with cross-encoder reranking. Rescore your existing search results from Elasticsearch, SQL LIKE, or vector search, locally in C# and in your own process.

C# dotnet reranking cross-encoder search semantic-search relevance rag local-ai kjarni
Read more
· 6 min read

RAG in C# Without a Vector Database: One NuGet Package, Start to Finish

Build a retrieval-augmented generation pipeline in C#: index documents, search them, rerank the hits, and answer with a local LLM. One NuGet package, start to finish, with every stage running on your own machine.

C# dotnet rag retrieval-augmented-generation vector-database semantic-search reranking llm local-ai kjarni
Read more
· 6 min read

Your MiniLM Embeddings Are Probably Truncating at 256 Tokens

Three config files disagree about how long an all-MiniLM-L6-v2 input can be, and the answer sentence-transformers uses is 256 tokens. At a 1000-character chunk size, 87% of chunks are longer than that, and the excess is discarded silently.

embeddings sentence-transformers rag minilm chunking semantic-search nlp kjarni
Read more