XRAPH/Work/RAG engine
Go · since 2026

Weave

The RAG pipeline as swappable parts, covering loaders, chunkers, embedders, vector stores and retrievers, with token-budgeted assembly and citations at the end. Postgres, SQLite or memory for metadata; pgvector or memory for vectors. Runs standalone or as a Forge extension with its own HTTP surface.

Language
Go
Category
RAG engine
Since
2026
Stars
1
Repository Docs
01

Highlights

3 claims
H.01
Onecall
Load to searchable

Ingestion loads, chunks, embeds and stores in a single operation, so the pipeline is not yours to assemble.

H.02
Threemodes
Retrieval

Cosine similarity, maximal marginal relevance and hybrid search, with configurable top-K and score thresholds.

H.03
Fourteenevents
Extension hooks

OnIngestCompleted, OnRetrievalStarted and twelve more, so metrics and audit trails attach without a fork.

02

What it does

6 entries

Retrieval-augmented generation as a library, with the document lifecycle handled for you.

02.1
Ingestion

Load, chunk, embed, store

The whole path from raw content to searchable vectors runs from one call, which is the part most projects rebuild badly before they rebuild it well.

One call
02.2
Retrieval

Similarity, MMR and hybrid

Cosine similarity for the obvious case, maximal marginal relevance when results cluster too tightly, and hybrid search across both, with top-K and score thresholds configurable per query.

MMRHybrid
02.3
Tenancy

Scoped per collection

Collections, documents and chunks all carry their tenant on the context, so a cross-tenant query cannot be written.

Context-scoped
02.4
Storage

In-memory to pgvector

Development runs in memory and production on Postgres with pgvector, with every subsystem behind a Go interface.

pgvector
02.5
Hooks

Fourteen lifecycle events

OnIngestCompleted, OnRetrievalStarted and twelve others, for metrics, audit trails and behaviour that belongs outside the library.

Hooks
02.6
Collections

Their own embedding model

Each collection sets its embedding model, chunk strategy and metadata, and can be reindexed at any point without the others moving.

Reindexable
03

Anatomy

4 modules
01

Ingest

Documents in, chunked and embedded.

02

Retrieve

Vector and keyword recall over the same store.

03

Rerank

Ordering the candidates before they reach the model.

04

Assemble

Context built to a budget, not to a limit.

04

Why it exists

Design notes

#What it is

Weave is a composable RAG pipeline for Go. Load documents, chunk them, embed, store vectors, retrieve relevant context and assemble a prompt, with each stage swappable, in one library.

#The pipeline

Ingest runs loader → chunker → embedder → vector store. Retrieve runs query → embedder → retriever → results. Assemble takes those results and applies a token budget and citations before the prompt is built.

Splitting assembly out as its own stage was the decision that mattered most. Most RAG failures I have debugged were not retrieval failures. The right chunk was in the result set and got truncated out of the prompt by a naive concatenation with no budget.

#Practicalities

  • Storage backends: in-memory, PostgreSQL or SQLite for metadata; memory or pgvector for vectors.
  • Multi-tenant data isolation through Forge scope context.
  • Extension hooks for auditing, metrics, tracing and custom logic at every lifecycle point.
  • A REST API with OpenAPI metadata for collections, documents and retrieval.
  • Runs standalone or as a Forge extension with DI, routing and health checks.

#Where it fits

Weave supplies the retrieval half of the agent stack. Cortex runs the episode; KGKit holds what survives it. A retrieval hit and a graph claim are different kinds of evidence, and keeping them in separate systems has made it much easier to tell which one an answer actually rested on.

05

Signals

GitHub
Stars
1
Language
Go
Since
2026
Adopters
00

Shipping something on Weave? Nobody is listed here yet. Tell me what you built and you will be the first.

Get listed