Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 7 min read How-to mediumAdept

The Multi-Model Database for AI Agents: Deploy SurrealDB with Docker Extension

SurrealDB is a Rust-built multi-model database that unifies document, graph, relational, time-series, geospatial, key-value and vector data in one engine queried with SurrealQL, with storage separated from compute so each can scale independently. It can be installed as a Docker Desktop Extension that provides a visual query editor, live data explorer, schema visualization and backup/restore. The walkthrough builds a WhatsApp RAG chatbot using LangChain, Docker Model Runner (llama3.2 and embeddinggemma), and a RocksDB-backed SurrealDB container. Chat history is stored as vector embeddings plus a keyword knowledge graph, so retrieval can combine similarity search and graph traversal and return answers with source citations.

Related posts

  • Local RAG with Ollama, Mistral, and Turso

    Turso mediumAdept

    A local retrieval-augmented generation pipeline can be built in TypeScript using Ollama's Mistral model for both embeddings and generation, with libSQL storing documents and 4096-dimension F32_BLOB vectors in a single SQLite file indexed via libsql_vector_idx. Similarity search uses vector_distance_cos in a SQL query, and the top matches are injected as context into a prompt for Ollama's chat API. The setup runs fully offline with no extensions to install, and can be pointed at a Turso URL with embedded replicas to sync vectors across devices.

  • Building a Retrieval Pipeline with Turso and Voyage AI

    Turso mediumAdept

    Turso's SQLite-compatible engine with native vector columns, paired with Voyage AI embedding and reranking models, replaces a multi-service RAG stack with a single embeddable database for agent retrieval and memory. Documents are indexed with voyage-4-large and queried with voyage-4-lite in a shared embedding space. Candidates are retrieved via a DiskANN index (vector_top_k) or an exact vector_distance_cos scan, then reranked with instruction-following rerank-2.5. Matryoshka dimensions and int8/binary quantization map onto Turso's F32/F16/1-bit blob columns to cut storage and scan cost 4–32x. The main caveat: Turso's MVCC concurrent-write mode doesn't yet support the DiskANN index, so write-heavy agent memory should use exact scan under MVCC.

  • Building Data-Aware AI Applications with Heroku AI and LlamaIndex

    Heroku Engineering mediumAdept

    A RAG stack on Heroku pairs LlamaIndex for ingestion, indexing and retrieval with Heroku Managed Inference (Claude 4 Sonnet via an OpenAI-compatible API), Cohere Embed Multilingual for embeddings, and Heroku Postgres with pgvector as the vector store. The walkthrough provisions the add-ons via the Heroku CLI. It then shows Python code that points LlamaIndex's OpenAILikeEmbedding at Heroku's embedding endpoint, stores 1024-dimension vectors in PGVectorStore, and queries documents through a query engine. Example use cases include financial report analysis, insurance claim agents and support chatbots.

  • Build a custom RAG AI agent in TypeScript and Jupyter

    Deno mediumAdept

    A local agentic RAG pipeline built in TypeScript inside a Deno Jupyter notebook, using LangChain and LangGraph with Ollama models. Deno blog posts are loaded with Cheerio, split into 500-character chunks, embedded with mxbai-embed-large and stored in an in-memory vector store exposed as a retriever tool. A LangGraph state graph wires an agent node (Llama 3.2 3B, the only small local model the author got tool calling working with) to retrieval, a binary relevance grader, query rewriting and final answer generation with DeepSeek R1 8B. The setup suits confidential documents that must not leave the machine.

  • ChatGPT plugins now support Postgres & Supabase

    Supabase mediumAdept

    Supabase contributed Postgres and Supabase datastore providers to OpenAI's ChatGPT Retrieval Plugin, storing text-embedding-ada-002 embeddings in pgvector. The Postgres provider connects directly via psycopg2, while the Supabase provider goes through PostgREST to enable Row Level Security. Both share the same documents schema and use a plpgsql match function that filters by source, author and date and ranks results by inner product distance. A walkthrough ingests the PostgreSQL 15 docs (about 7,904 chunks), adds an approximate ivfflat index with lists ≈ rows/1000, and registers the local plugin with ChatGPT to answer documentation questions.

The quest for software engineering knowledge.

Look:
Layout: