Skip to content
Select theme

LLM apps in Rust

What you end up with: a service that answers questions about your own documents — chunks and embeds them, searches by vector similarity, and streams an answer, with the inference running either locally or against a hosted API.

The finished pipeline, measuring itself: six labelled questions scored by recall and MRR, next to a brute-force cross-check and a window-size ablation

Most AI app tutorials assume Python. Rust is not a worse choice: it is how you ship an AI feature that has to be fast, memory-hungry in the right places, and deployable as a single binary. This track is written for backend developers, not researchers.

  • A document pipeline: chunking, metadata and an embedding store
  • Vector similarity search, first brute force, then an index
  • Streaming responses over HTTP with Server-Sent Events
  • Local inference with candle, and switching to a hosted API without rewriting the app
  • Prompt templates and token counting
  • Evaluation: does the retrieval actually find the right chunk?
  • Cost and latency budgets you can defend

Concurrency and async and Practical crates — this track is mostly async plumbing around a model call.