Ollama

Text Embeddings for RAG and Search: Ollama and OpenAI-Compatible APIs

Text Embeddings for RAG and Search: Ollama and OpenAI-Compatible APIs

3 min read

An embedding is a fixed-dimensional float vector placing similar meanings nearby — a representation layer for search, clustering, dedup, and RAG retrieval, not token IDs and not chat output. The concepts stay identical across backends; only the HTTP surface changes. Two local patterns cover nearly everything: Ollama’s embed endpoint and any OpenAI-compatible embeddings route.

Building a Self-Evaluating RAG System: Hybrid Search, Routing, and LLM-as-Judge

Building a Self-Evaluating RAG System: Hybrid Search, Routing, and LLM-as-Judge

8 min read

Most RAG systems are demos: they retrieve chunks and generate an answer immediately, with no check on whether the retrieved context is relevant, sufficient, or even correct. When retrieval misses, the model hallucinates. There is no recovery loop, no quality signal, and no way to tell which step produced a bad answer.

This post documents how to build a self-evaluating RAG system that routes queries, retrieves with hybrid search, and evaluates its own answers using LLM-as-judge. It is built in three cooperating parts:

  1. Hybrid search and retrieval — dense + BM25 vectors with int8 quantization in Qdrant, RRF fusion, payload filtering, and multi-year balanced fetch.
  2. Agent and MCP — a LangGraph ReAct loop with routing guardrails, wrapped in FastMCP and exposed through a Streamlit UI.
  3. Observability and evaluation — Arize Phoenix tracing plus LLM-as-judge scoring for hallucination, QA correctness, and context relevance.

The LLM provider layer is shared: Ollama (local llama3.2, nomic-embed-text) or Gemini API (gemini-2.5-flash-lite), switchable via environment variable with no code changes.

Managing Documents with Local LLMs and Self-Hosted Apps

Managing Documents with Local LLMs and Self-Hosted Apps

7 min read

I stopped relying on cloud AI services for document management. Instead, I run a self-hosted stack of Paperless-ngx, Paperless-GPT, and Paperless AI, backed by local LLMs through Ollama. Nothing leaves my network: academic records, certificates, invoices, tax filings, and receipts all stay on my own hardware.

This post documents the stack I built to manage documents locally: how Paperless-ngx serves as the central document hub, how Paperless-GPT handles OCR, how Paperless AI provides RAG-powered chat over the archive, and how everything connects to a local Ollama instance running Qwen 3, MiniCPM-V, and Llama 3.2.

Open WebUI: Self-Hosted ChatGPT Alternative for Local LLMs

Open WebUI: Self-Hosted ChatGPT Alternative for Local LLMs

3 min read

Open WebUI brings the ChatGPT experience onto your own infrastructure: Ollama plus any OpenAI-compatible backend behind a modern chat UI with RAG document chat, multi-user auth, voice, prompt tooling, and model management. Privacy-first, offline-capable, and scalable from laptop Docker runs to Kubernetes fleets.

Ollama to vLLM: When Your Local Server Needs to Grow Up

Ollama to vLLM: When Your Local Server Needs to Grow Up

6 min read

Ollama is the easiest way to run a local model, until the experiment becomes a shared service. Requests queue, latency wobbles, prefixes recompute, and one GPU stops being enough. vLLM answers exactly those problems — but migration is a trade, not an upgrade: simplicity for scheduling, memory control, parallelism, and production operations.