#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.