Back to directory

search

A Go library for embedded vector search and semantic embeddings, with an exact cosine-similarity index and optional local (llama.cpp) or cloud (OpenAI-compatible) embedding providers.

search

search is a Go library providing an exact cosine-similarity vector index for small and medium datasets, along with optional embedding providers. The core search package handles vector indexing, search and persistence and has no dependency on any embedding backend.

A separate llama module adds local GGUF embeddings through llama.cpp using purego, and a separate openai module adds text embeddings through any OpenAI-compatible API, including OpenRouter, using only the Go standard library at runtime. Each module has its own go.mod and go.sum, so importing the core search package pulls in neither embedding dependency.

The library requires Go 1.27 or newer, normalizes vectors when they are added or searched, and returns results ordered by descending cosine similarity. Changing embedding models requires re-embedding the whole dataset, even when the vector dimensions still match.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.