weave

package module
v1.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 4 Imported by: 0

README

Weave, a RAG pipeline engine for Go that chunks, embeds, stores and retrieves documents for LLM prompts

Weave: RAG pipeline engine for Go

Weave is an open-source Go library for retrieval-augmented generation (RAG). You hand it documents, and it chunks the text, generates embeddings, writes the vectors to a vector store such as pgvector, then retrieves the closest chunks for a query and assembles them into prompt context with a token budget and citation markers. Collections, documents and chunks are tenant-scoped and live in PostgreSQL, SQLite, MongoDB or memory, and the whole engine runs standalone or as a Forge extension with an HTTP API.

CI Go Reference GitHub Stars

Documentation · Quick start · Features · Components · Storage · Forge · FAQ

Quick start

You need Go 1.26 or later and an OpenAI API key for the embeddings.

go get github.com/xraph/weave@latest

Save this as main.go:

package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/xraph/weave"
	"github.com/xraph/weave/chunker"
	"github.com/xraph/weave/collection"
	"github.com/xraph/weave/embedder"
	"github.com/xraph/weave/engine"
	"github.com/xraph/weave/store/memory"
	vsmemory "github.com/xraph/weave/vectorstore/memory"
)

func main() {
	// Every call runs inside a tenant, so put one on the context first.
	ctx := weave.WithTenant(context.Background(), "acme")

	eng, err := engine.New(
		engine.WithStore(memory.New()),
		engine.WithVectorStore(vsmemory.New()),
		engine.WithEmbedder(embedder.NewOpenAIEmbedder(os.Getenv("OPENAI_API_KEY"))),
		engine.WithChunker(chunker.NewRecursiveChunker()),
	)
	if err != nil {
		log.Fatal(err)
	}
	defer eng.Stop(ctx)

	col := &collection.Collection{Name: "handbook"}
	if err := eng.CreateCollection(ctx, col); err != nil {
		log.Fatal(err)
	}

	res, err := eng.Ingest(ctx, &engine.IngestInput{
		CollectionID: col.ID,
		Title:        "Leave policy",
		Content: "Full-time staff get 25 days of paid leave a year. " +
			"Unused days carry over until the end of March. " +
			"Requests longer than two weeks need approval from your manager.",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("ingested %s into %d chunks\n", res.DocumentID, res.ChunkCount)

	hits, err := eng.Retrieve(ctx, "How many vacation days do I get?",
		engine.WithCollection(col.ID),
		engine.WithTopK(3),
	)
	if err != nil {
		log.Fatal(err)
	}

	prompt, err := eng.Assemble(ctx, hits, engine.AssembleParams{MaxTokens: 1024})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(prompt.Context)
}

Run it:

go mod tidy
OPENAI_API_KEY=sk-... go run .

You'll see the document's TypeID (doc_...) and its chunk count, then the context block Weave built from the best hits, with a [1]-style marker in front of each chunk. That block is what you paste into your LLM prompt. prompt.Included tells you which hit each marker points at, so you can show citations next to the answer.

Everything here lives in memory and disappears when the program exits. Swap in a Postgres store and pgvector when you want to keep it.

Why Weave?

A RAG feature looks small until you build it: you need a chunking strategy, an embedding call, somewhere to keep vectors, a ranking step, a way to fit the results into a context window, and tenant isolation across all of it. Weave puts those steps behind one engine.Engine, and each step is a Go interface you can replace with your own.

You need Weave gives you
Text out of files Loaders for plain text, Markdown, HTML, CSV, JSON, URLs and whole directories
Chunks that fit an embedding model Recursive, fixed-size, sliding-window, sentence-based semantic and code-aware chunkers, with size and overlap per collection
Embeddings An OpenAI embedder (any OpenAI-compatible endpoint through WithOpenAIBaseURL), a nexus embedder in its own module, or your own embedder.Embedder
Vector search In-memory, PostgreSQL with pgvector (its table migrated by pgvector.Migrate, or as the weave_pgvector group in your own run), or Fabriq's vector plane
Better ranking than plain similarity MMR for diversity, hybrid retrieval with Reciprocal Rank Fusion, and a reranker wrapper
Prompt context that fits Token-budgeted assembly with [n] citation markers
One index per customer A tenant on the context that every call requires, carried into every store and vector query, so nothing reads or searches across customers
Re-ingesting the same page on every deploy SourceKey on IngestInput: the same content embeds nothing, new content replaces the old version in one swap, and replicas ingesting at once end with one ready document
Surviving a deploy mid-ingest Recovery fails documents whose ingest went quiet and deletes their partial chunks and vectors, safely on every replica
Hooks into your own systems 14 lifecycle hooks, a Chronicle audit bridge and a metrics extension
Seeing what it does OpenTelemetry spans for ingest, embedding, vector search, retrieval and reindex, plus duration and GenAI token metrics on your Forge app's /_/metrics
An API without writing handlers Forge routes for collections, documents, retrieval and search, with OpenAPI metadata

Pipeline components

engine.New takes one option per step. You have to give it a store, a vector store, an embedder and a chunker before you can ingest anything. If you forget one, Ingest tells you with weave.ErrNoStore, ErrNoEmbedder and friends.

Step Option Built in
Metadata store engine.WithStore store/memory, store/postgres, store/sqlite, store/mongo
Vector store engine.WithVectorStore vectorstore/memory, vectorstore/pgvector, vectorstore/fabriq
Embedder engine.WithEmbedder embedder.NewOpenAIEmbedder(apiKey, opts...), and nexus.New(gateway, model, dims, opts...) from github.com/xraph/weave/embedder/nexus
Chunker engine.WithChunker NewRecursiveChunker, NewFixedChunker, NewSlidingChunker, NewSemanticChunker, NewCodeChunker
Loader engine.WithLoader NewTextLoader, NewMarkdownLoader, NewHTMLLoader, NewCSVLoader, NewJSONLoader(fields...), NewURLLoader(delegate), NewDirectoryLoader(loaders...)
Retriever engine.WithRetriever NewSimilarityRetriever, NewMMRRetriever, NewHybridRetriever, NewRerankerRetriever
Hooks engine.WithExtension audit_hook, observability
Metrics engine.WithMetrics any go-utils metrics sink; the Forge extension passes the app's
Defaults engine.WithConfig weave.DefaultConfig()

A loader only runs when the IngestInput names a SourceType the loader supports, such as text/markdown or text/html. Without one, Weave chunks Content as it is.

embedder.NewLocalEmbedder exists, but it's a placeholder that returns ErrNotImplemented. Until a local model lands, use the OpenAI embedder against any compatible server, or implement the two-method embedder.Embedder interface yourself.

Retrieval

With no retriever option, Retrieve embeds the query and searches the vector store directly. Every hit is then read back from the metadata store by chunk ID, and a hit whose row has gone missing stays in the results with Orphaned set.

When plain similarity isn't enough, compose retrievers:

st := postgres.New(db)
vs := pgvector.New(db)
emb := embedder.NewOpenAIEmbedder(apiKey)

eng, err := engine.New(
	engine.WithStore(st),
	engine.WithVectorStore(vs),
	engine.WithEmbedder(emb),
	engine.WithChunker(chunker.NewRecursiveChunker()),
	engine.WithRetriever(retriever.NewHybridRetriever(
		retriever.NewSimilarityRetriever(vs, emb, st),
		retriever.NewMMRRetriever(vs, emb, 0.5),
	)),
)

Retrieve takes WithCollection, WithTopK and WithMinScore, and searches the tenant on the context. (WithTenantID and WithTenantFilter are deprecated and can only repeat that tenant.) For a query across several collections, use eng.HybridSearch(ctx, query, &engine.HybridSearchParams{...}). eng.RetrieveCompare puts your configured ranking next to the raw vector ranking for the same query, so you can see what a reranker or MMR actually moved.

Context assembly

eng.Assemble(ctx, hits, engine.AssembleParams{MaxTokens: n}) builds the context string in rank order until the budget runs out (4096 tokens when you pass zero). It returns Context, TotalTokens, Included (which hits made it in, in marker order) and FirstExcluded. If you want your own template or token counter, use the assembler package directly with assembler.WithTemplate, WithTokenCounter and WithMaxTokens.

Storage

You configure two stores. The metadata store holds collections, documents and chunks, and the vector store holds the embeddings, which is why you can mix them: SQLite for metadata with vectors in memory on a laptop, or Postgres for both in production.

Metadata store Package Notes
PostgreSQL store/postgres, postgres.New(db *grove.DB) Grove migrations, run by Migrate
SQLite store/sqlite, sqlite.New(db *grove.DB) Single node, pair it with the in-memory vector store
MongoDB store/mongo, mongo.New(db *grove.DB) Source-keyed ingest needs a replica set
Memory store/memory, memory.New() Tests and prototypes
Vector store Package Notes
pgvector vectorstore/pgvector, pgvector.New(db *grove.DB, opts...) Table weave_vectors by default, change it with WithTableName
Fabriq vectorstore/fabriq (package fabriqvec), fabriqvec.New(vq, opts...) Embeddings live in Fabriq next to the rest of your data
Memory vectorstore/memory, memory.New() Tests and prototypes

Call Migrate(ctx) on the metadata store before first use (the Forge extension does it for you on start). Postgres, SQLite and Mongo record each version in grove_migrations, so a second call applies nothing. The pgvector table has its own group, weave_pgvector, which the extension leaves alone: call pgvector.Migrate(ctx, db, dims) yourself, or add pgvector.Migrations(dims) to your own orchestrator. It refuses a table made with a different size, naming both numbers, so you find out at boot and not on the first insert.

All stores are built on Grove, so you open one *grove.DB and share it between the metadata store and pgvector.

Multi-tenancy

Put the tenant and app on the context, and Weave scopes everything under it:

ctx = weave.WithTenant(ctx, "acme")
ctx = weave.WithApp(ctx, "support-bot")

A collection created under that context belongs to acme, and Retrieve filters the vector search by the same tenant. The tenant isn't optional. A call without one fails with weave.ErrTenantRequired before it reads, writes or embeds anything, the HTTP routes answer 403 and the dashboard answers PERMISSION_DENIED. A background job builds its own context with the tenant it means.

If you're upgrading from v1.8, the rows it wrote without a tenant are unreachable until you give them one, and MIGRATION.md has the SQL and Mongo statements for that, plus everything else that changed in v1.9.0.

Use it with Forge

The extension package registers Weave as a Forge extension. On Register it reads config from extensions.weave (or the older weave key), takes a store from a *grove.DB in the container when there is one, builds the engine, mounts the HTTP API under /weave, and provides *engine.Engine to the container. Start runs the store migration.

import (
	"github.com/xraph/forge"
	"github.com/xraph/weave/chunker"
	"github.com/xraph/weave/embedder"
	"github.com/xraph/weave/engine"
	weaveext "github.com/xraph/weave/extension"
	"github.com/xraph/weave/store/memory"
	vsmemory "github.com/xraph/weave/vectorstore/memory"
)

app := forge.NewApp(forge.AppConfig{
	Name:        "search-api",
	HTTPAddress: ":8080",
	Extensions: []forge.Extension{
		weaveext.New(
			weaveext.WithStore(memory.New()), // leave out when Grove is in the container
			weaveext.WithVectorStore(vsmemory.New()),
			weaveext.WithEngineOption(engine.WithEmbedder(embedder.NewOpenAIEmbedder(os.Getenv("OPENAI_API_KEY")))),
			weaveext.WithEngineOption(engine.WithChunker(chunker.NewRecursiveChunker())),
		),
	},
})

The extension has no embedder or chunker option of its own, so you pass those through WithEngineOption. Other extensions resolve the engine with forge.Inject[*engine.Engine](app.Container()).

Weave's routes do no authentication of their own: they trust the tenant on the request context. Mount them only behind middleware that authenticates the caller and sets weave.WithTenant from the principal, or pass WithDisableRoutes() (and WithDisableMigrate() if you run the migrations yourself) and call the engine from your own authenticated API. A *grove.DB the extension borrows from the container stays open when it stops.

Configuration
extensions:
  weave:
    base_path: /weave
    default_chunk_size: 512
    default_chunk_overlap: 50
    default_embedding_model: text-embedding-3-small
    default_chunk_strategy: recursive
    default_top_k: 10
    ingest_concurrency: 4
    shutdown_timeout: 30s
    recovery_interval: 5m   # how often to sweep for stalled ingests; negative turns it off
    stalled_after: 15m      # how long an ingest can go quiet before recovery fails it
    grove_database: ""      # a named grove.DB; empty uses the default one
    disable_routes: false
    disable_migrate: false

Those values are the defaults. default_chunk_overlap has to be smaller than default_chunk_size, or Register fails. In code, the same settings go through WithConfig, WithBasePath, WithGroveDatabase, WithDisableRoutes, WithDisableMigrate and WithRequireConfig(true), and WithExtension adds a lifecycle hook.

HTTP API

With the default base path, the routes are:

Method and path Does
POST /weave/v1/collections, GET /weave/v1/collections Create or list collections
GET /weave/v1/collections/:collectionId, DELETE ... Read or delete one, with its documents and chunks
GET /weave/v1/collections/:collectionId/stats Document and chunk counts
POST /weave/v1/collections/:collectionId/reindex Re-embed every chunk
POST /weave/v1/collections/:collectionId/documents, .../documents/batch Ingest one document or a batch
GET /weave/v1/collections/:collectionId/documents List documents
GET /weave/v1/documents/:documentId, DELETE ... Read or delete a document
POST /weave/v1/collections/:collectionId/retrieve Retrieve from one collection
POST /weave/v1/search Search across collections

The routes carry OpenAPI metadata, so they show up in your Forge app's spec. The extension also contributes a weave page to the Forge dashboard.

Lifecycle hooks

You write a hook as any value that implements one or more of these methods, and you add it with engine.WithExtension:

Area Hooks
Collections OnCollectionCreated, OnCollectionDeleted
Ingestion OnIngestStarted, OnIngestChunked, OnIngestEmbedded, OnIngestCompleted, OnIngestFailed
Retrieval OnRetrievalStarted, OnRetrievalCompleted, OnRetrievalFailed
Documents and reindex OnDocumentDeleted, OnReindexStarted, OnReindexCompleted
Shutdown OnShutdown

audithook.New(recorder) (import path github.com/xraph/weave/audit_hook) turns these into audit events for Chronicle or any Recorder, and observability.NewMetricsExtension() counts ingests, retrievals and failures.

Telemetry

You don't need a hook for tracing. The engine starts OpenTelemetry spans for its own work (ingest document, embed texts, search vectors, retrieve chunks, reindex collection and a few more) on the global tracer provider, so in a Forge app they sit under the request's server span. With a metrics sink it also records ingest, retrieval and vector store durations and the GenAI client metrics for every embedding call. The Forge extension wires the app's metrics and logger in for you; outside Forge, pass engine.WithMetrics. No span or label carries query text, document content, tenant IDs or keys. The observability page lists every span, metric and label value.

Documentation

Topic Read
First pipeline Getting started, architecture, end-to-end example
Ingestion Document ingestion, loaders, chunkers, embedders
Retrieval and context Semantic retrieval, context assembler
Storage PostgreSQL, pgvector, SQLite, MongoDB, Fabriq vectors
Tenants and config Multi-tenancy, configuration
Forge and HTTP Forge extension, HTTP API
Extending it Extension system, custom components
Upgrading MIGRATION.md, starting with "Upgrading to v1.9.0"

The Go API is on pkg.go.dev.

FAQ

How do I build a RAG pipeline in Go?

Create an engine.Engine with a store, a vector store, an embedder and a chunker, then call Ingest for each document, Retrieve for each question and Assemble to turn the hits into prompt context. The quick start is the whole loop in about sixty lines.

Does Weave work with pgvector?

Yes. vectorstore/pgvector stores embeddings in a Postgres table through Grove and searches by vector distance. pgvector.Migrate creates the vector extension and the weave_vectors table, and pgvector.Available tells you first whether the server has pgvector at all.

Can I use Weave without Forge?

Yes. engine, the stores and every component are plain Go. Only extension and api import Forge.

Which embedding models does Weave support?

The built-in embedder calls OpenAI's embeddings API, text-embedding-3-small by default, and WithOpenAIModel, WithOpenAIDimensions and WithOpenAIBaseURL let you point it at another model or any OpenAI-compatible server. Anything else works through your own embedder.Embedder.

How do I keep one customer's documents out of another's results?

Set the tenant on the context with weave.WithTenant. Every call requires one. Collections, documents and chunks are stored under it, another tenant's IDs come back not found, and retrieval filters the vector search to it.

Contributing

Issues and focused pull requests are welcome. Open an issue first for anything large.

git clone https://github.com/xraph/weave.git
cd weave
GOWORK=off go build ./...
make test     # go test -v ./...
make lint     # golangci-lint v2
make fmt      # gofmt and goimports

Postgres and MongoDB store tests skip unless you set WEAVE_TEST_POSTGRES_DSN or WEAVE_TEST_MONGO_DSN, and they refuse the default ports, so point them at throwaway containers. Skip make build, make run and make dev, which point at a cmd/weave that doesn't exist. AGENTS.md has the CI jobs, test setup and release steps. Commits follow Conventional Commits with a scope, as in fix(engine): ....

License

MIT. See LICENSE.

Weave is part of the forgery stack built on Forge, by Rex Raphael and contributors.

Documentation

Overview

Package weave provides a composable RAG pipeline engine for Go.

Weave handles the full document lifecycle: ingest documents, chunk text, generate embeddings, store vectors, retrieve relevant context, and assemble prompts. It is tenant-scoped, plugin-extensible, and Forge-native.

The engine is built around pluggable interfaces:

  • loader.Loader: extract text from various document formats
  • chunker.Chunker: split text into manageable chunks
  • embedder.Embedder: generate vector embeddings
  • vectorstore.VectorStore: store and search vectors
  • retriever.Retriever: retrieve relevant chunks

All operations are tenant-scoped via forge.Scope for data isolation.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Store errors.
	ErrNoStore         = errors.New("weave: no store configured")
	ErrStoreClosed     = errors.New("weave: store closed")
	ErrMigrationFailed = errors.New("weave: migration failed")

	// ErrTenantRequired is returned by a call made on a context with no
	// tenant (see WithTenant). Nothing reads or writes across tenants.
	ErrTenantRequired = errors.New("weave: tenant required")

	// Not found errors.
	ErrCollectionNotFound = errors.New("weave: collection not found")
	ErrDocumentNotFound   = errors.New("weave: document not found")
	ErrChunkNotFound      = errors.New("weave: chunk not found")
	ErrIngestJobNotFound  = errors.New("weave: ingest job not found")

	// Conflict errors.
	ErrCollectionAlreadyExists = errors.New("weave: collection already exists")
	ErrDocumentAlreadyExists   = errors.New("weave: document already exists")
	ErrDuplicateDocument       = errors.New("weave: duplicate document (same content hash)")

	// State errors.
	ErrInvalidState    = errors.New("weave: invalid state transition")
	ErrEmptyContent    = errors.New("weave: empty content")
	ErrInvalidArgument = errors.New("weave: invalid argument")

	// Pipeline errors.
	ErrNoEmbedder    = errors.New("weave: no embedder configured")
	ErrNoVectorStore = errors.New("weave: no vector store configured")
	ErrNoChunker     = errors.New("weave: no chunker configured")

	// ErrDimensionMismatch reports an embedding whose length differs from
	// the dimensions the collection or vector table was set up with.
	ErrDimensionMismatch = errors.New("weave: embedding dimensions do not match")
	// ErrIngestInterrupted marks a document whose ingest stopped before it
	// finished, for example because the process was killed.
	ErrIngestInterrupted = errors.New("weave: ingest interrupted before it finished")
)

Functions

func AppFromContext

func AppFromContext(ctx context.Context) string

AppFromContext extracts the app identifier from the context. Returns an empty string if no app is set.

func RequireTenant

func RequireTenant(ctx context.Context) (string, error)

RequireTenant returns the tenant on ctx, or ErrTenantRequired when there is none. Every store call and every engine call that touches data needs one.

func TenantFromContext

func TenantFromContext(ctx context.Context) string

TenantFromContext extracts the tenant identifier from the context. Returns an empty string if no tenant is set.

func WithApp

func WithApp(ctx context.Context, app string) context.Context

WithApp returns a copy of ctx with the app identifier attached.

func WithTenant

func WithTenant(ctx context.Context, tenant string) context.Context

WithTenant returns a copy of ctx with the tenant identifier attached.

Types

type ComponentInfo

type ComponentInfo struct {
	Kind   string            `json:"kind"`
	Params map[string]string `json:"params,omitempty"`
	// Score is set by retrievers and vector stores.
	Score ScoreKind `json:"score,omitempty"`
	// TenantFilter is set by vector stores: "verified" when an exact
	// tenant_id metadata filter is known to work, otherwise "unverified".
	TenantFilter string `json:"tenant_filter,omitempty"`
	// Children are wrapped components, such as a hybrid retriever's parts.
	Children []ComponentInfo `json:"children,omitempty"`
}

ComponentInfo describes one pipeline component for an operator.

type Config

type Config struct {
	// DefaultChunkSize is the target chunk size in tokens.
	DefaultChunkSize int

	// DefaultChunkOverlap is the overlap between chunks in tokens.
	DefaultChunkOverlap int

	// DefaultEmbeddingModel is the embedding model name used when
	// a collection does not specify one.
	DefaultEmbeddingModel string

	// DefaultChunkStrategy is the chunking strategy used when
	// a collection does not specify one.
	DefaultChunkStrategy string

	// DefaultTopK is the default number of results for retrieval.
	DefaultTopK int

	// ShutdownTimeout is the maximum time to wait for graceful shutdown.
	ShutdownTimeout time.Duration

	// IngestConcurrency is the maximum number of documents processed
	// concurrently during batch ingestion.
	IngestConcurrency int
}

Config holds configuration for the Weave engine.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns a Config with sensible defaults.

type Context

type Context = context.Context

Context is the execution context for Weave operations. It is a simple alias for context.Context. Scope is injected via forge.WithScope on the stdlib context.

type Describer

type Describer interface {
	Describe() ComponentInfo
}

Describer is implemented by components that can describe themselves.

type Entity

type Entity struct {
	CreatedAt time.Time `json:"created_at" bun:"created_at,notnull,default:current_timestamp"`
	UpdatedAt time.Time `json:"updated_at" bun:"updated_at,notnull,default:current_timestamp"`
}

Entity is the base type embedded by all weave domain objects.

func NewEntity

func NewEntity() Entity

NewEntity returns an Entity with timestamps set to now.

type ID

type ID = id.ID

ID is the primary identifier type for all Weave entities.

type Prefix

type Prefix = id.Prefix

Prefix identifies the entity type encoded in a TypeID.

type ScoreKind

type ScoreKind string

ScoreKind names what a retrieval score means, so a page never shows an RRF sum or a rerank score as though it were cosine similarity.

const (
	// ScoreCosine is cosine similarity between query and chunk vectors.
	ScoreCosine ScoreKind = "cosine"
	// ScoreVectorSimilarity is whatever similarity the vector store reports,
	// when the store does not say which metric it uses.
	ScoreVectorSimilarity ScoreKind = "vector_similarity"
	// ScoreMMR is the vector relevance score, with results in MMR order.
	ScoreMMR ScoreKind = "mmr_relevance"
	// ScoreRRF is a reciprocal rank fusion sum. It is not comparable to cosine.
	ScoreRRF ScoreKind = "rrf"
	// ScoreRerank is a reranker's score. The vector score is not kept.
	ScoreRerank ScoreKind = "rerank"
	// ScoreUnknown means the component does not describe its score.
	ScoreUnknown ScoreKind = "unknown"
)

Directories

Path Synopsis
Package api provides Forge-style HTTP handlers for the Weave RAG engine.
Package api provides Forge-style HTTP handlers for the Weave RAG engine.
Package assembler builds context strings from retrieved chunks for use in LLM prompts, with token budgeting and citation tracking.
Package assembler builds context strings from retrieved chunks for use in LLM prompts, with token budgeting and citation tracking.
Package audithook bridges Weave lifecycle events to an audit trail backend.
Package audithook bridges Weave lifecycle events to an audit trail backend.
Package chunk defines the Chunk entity.
Package chunk defines the Chunk entity.
Package chunker defines the interface for splitting text into manageable chunks for embedding and retrieval.
Package chunker defines the interface for splitting text into manageable chunks for embedding and retrieval.
Package collection defines the Collection entity.
Package collection defines the Collection entity.
Package document defines the Document entity and its lifecycle states.
Package document defines the Document entity and its lifecycle states.
Package embedder defines the interface for generating vector embeddings from text.
Package embedder defines the interface for generating vector embeddings from text.
nexus module
Package engine provides the central Weave RAG pipeline coordinator.
Package engine provides the central Weave RAG pipeline coordinator.
Package ext defines the extension system for Weave.
Package ext defines the extension system for Weave.
Package extension provides the Forge extension adapter for Weave.
Package extension provides the Forge extension adapter for Weave.
contract
Package contract wires Weave into the Forge dashboard's contract path.
Package contract wires Weave into the Forge dashboard's contract path.
Package id defines TypeID-based identity types for all Weave entities.
Package id defines TypeID-based identity types for all Weave entities.
internal
embedtest
Package embedtest holds a deterministic embedder for tests.
Package embedtest holds a deterministic embedder for tests.
migrateretry
Package migrateretry runs grove migration groups on PostgreSQL and retries the one failure replicas booting together can hit.
Package migrateretry runs grove migration groups on PostgreSQL and retries the one failure replicas booting together can hit.
mongotest
Package mongotest gives each test that writes to a live MongoDB a database of its own, and drops it when the test ends.
Package mongotest gives each test that writes to a live MongoDB a database of its own, and drops it when the test ends.
pgtest
Package pgtest confines each test that writes to a live PostgreSQL to a schema of its own.
Package pgtest confines each test that writes to a live PostgreSQL to a schema of its own.
sqllike
Package sqllike escapes user text for use inside a SQL LIKE pattern.
Package sqllike escapes user text for use inside a SQL LIKE pattern.
telemetry
Package telemetry holds the OpenTelemetry plumbing the engine and the embedders share: the tracer, the span attribute keys, how an error is named, the bounded component labels, and the metric families recorded on a go-utils metrics sink.
Package telemetry holds the OpenTelemetry plumbing the engine and the embedders share: the tracer, the span attribute keys, how an error is named, the bounded component labels, and the metric families recorded on a go-utils metrics sink.
tenancy
Package tenancy holds the tenant checks every Weave metadata store runs before it touches data.
Package tenancy holds the tenant checks every Weave metadata store runs before it touches data.
Package loader defines the interface for extracting text from various document formats.
Package loader defines the interface for extracting text from various document formats.
Package middleware provides composable middleware for the Weave pipeline.
Package middleware provides composable middleware for the Weave pipeline.
Package observability provides a metrics extension for Weave that records lifecycle event counts via go-utils MetricFactory.
Package observability provides a metrics extension for Weave that records lifecycle event counts via go-utils MetricFactory.
Package pipeline provides a composable pipeline engine for orchestrating multi-step RAG operations (load, chunk, embed, store, retrieve, assemble).
Package pipeline provides a composable pipeline engine for orchestrating multi-step RAG operations (load, chunk, embed, store, retrieve, assemble).
Package plugins defines the plugin system for Weave.
Package plugins defines the plugin system for Weave.
Package retriever defines the interface for retrieving relevant chunks based on a query.
Package retriever defines the interface for retrieving relevant chunks based on a query.
Package store defines the composite metadata store interface for Weave.
Package store defines the composite metadata store interface for Weave.
memory
Package memory provides an in-memory implementation of the Weave composite store.
Package memory provides an in-memory implementation of the Weave composite store.
mongo
Package mongo provides a MongoDB implementation of the Weave composite store using Grove ORM with the mongodriver.
Package mongo provides a MongoDB implementation of the Weave composite store using Grove ORM with the mongodriver.
postgres
Package postgres provides a PostgreSQL implementation of the Weave composite store using grove ORM with grove migrations.
Package postgres provides a PostgreSQL implementation of the Weave composite store using grove ORM with grove migrations.
sqlite
Package sqlite provides a SQLite implementation of the Weave composite store using Grove ORM with Grove migrations.
Package sqlite provides a SQLite implementation of the Weave composite store using Grove ORM with Grove migrations.
storetest
Package storetest is the conformance suite every Weave store backend runs.
Package storetest is the conformance suite every Weave store backend runs.
Package vectorstore defines the pluggable interface for vector storage and similarity search.
Package vectorstore defines the pluggable interface for vector storage and similarity search.
fabriq
Package fabriqvec provides a fabriq VectorQuerier-backed implementation of the vectorstore.VectorStore interface.
Package fabriqvec provides a fabriq VectorQuerier-backed implementation of the vectorstore.VectorStore interface.
memory
Package memory provides an in-memory vector store using brute-force cosine similarity.
Package memory provides an in-memory vector store using brute-force cosine similarity.
pgvector
Package pgvector provides a PostgreSQL + pgvector implementation of the VectorStore interface.
Package pgvector provides a PostgreSQL + pgvector implementation of the VectorStore interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL