Documentation
ΒΆ
Overview ΒΆ
Package gorag provides a Retrieval-Augmented Generation (RAG) framework for Go
GoRAG is a comprehensive framework for building RAG applications that combine large language models (LLMs) with vector databases for efficient information retrieval.
Key features include: - Circuit breaker pattern for service resilience - Graceful degradation for unreliable services - Lazy loading for efficient memory usage - Observability with metrics, logging, and tracing - Plugin system for extensibility - Connection pooling for efficient resource management - Support for multiple vector stores (Memory, Milvus, Pinecone, Qdrant, Weaviate) - Support for multiple embedding providers (Cohere, Ollama, OpenAI, Voyage) - Support for multiple LLM clients (Anthropic, Azure OpenAI, Ollama, OpenAI) - Support for multiple document parsers (CSV, JSON, Markdown, PDF, etc.)
To get started, see the examples in the cmd/gorag directory or refer to the documentation in the docs directory.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
examples
|
|
|
01_native_rag
Package nativerag demonstrates a basic Native RAG pipeline using GoRAG Steps.
|
Package nativerag demonstrates a basic Native RAG pipeline using GoRAG Steps. |
|
02_hybrid_rag
command
Package hybridrag demonstrates how to compose Hybrid RAG pipeline with multiple retrieval strategies.
|
Package hybridrag demonstrates how to compose Hybrid RAG pipeline with multiple retrieval strategies. |
|
infra
|
|
|
chunker/semantic
Package semantic provides semantic chunking utilities for RAG systems.
|
Package semantic provides semantic chunking utilities for RAG systems. |
|
enhancer
Package enhancer provides query and document enhancement utilities for RAG systems.
|
Package enhancer provides query and document enhancement utilities for RAG systems. |
|
graph
Package graph provides graph-related utilities for RAG systems.
|
Package graph provides graph-related utilities for RAG systems. |
|
searcher/agentic
Package agentic provides the Agentic RAG searcher:
|
Package agentic provides the Agentic RAG searcher: |
|
searcher/core
Package core provides shared default factory functions used by all searcher sub-packages (native, rerank, hybrid, multimodal, agentic, graphlocal, graphglobal, multiagent).
|
Package core provides shared default factory functions used by all searcher sub-packages (native, rerank, hybrid, multimodal, agentic, graphlocal, graphglobal, multiagent). |
|
searcher/crag
Package crag provides CRAG (Corrective RAG) implementation.
|
Package crag provides CRAG (Corrective RAG) implementation. |
|
searcher/graphglobal
Package graphglobal provides the Graph-Global RAG searcher (community-summary-based macro pipeline):
|
Package graphglobal provides the Graph-Global RAG searcher (community-summary-based macro pipeline): |
|
searcher/graphlocal
Package graphlocal provides the Graph-Local RAG searcher (entity-centric N-Hop pipeline):
|
Package graphlocal provides the Graph-Local RAG searcher (entity-centric N-Hop pipeline): |
|
searcher/hybrid
Package hybrid provides the Hybrid RAG searcher:
|
Package hybrid provides the Hybrid RAG searcher: |
|
searcher/hyde
Package hyde provides HyDE (Hypothetical Document Embeddings) RAG implementation.
|
Package hyde provides HyDE (Hypothetical Document Embeddings) RAG implementation. |
|
searcher/multiagent
Package multiagent provides the Multi-Agent RAG searcher:
|
Package multiagent provides the Multi-Agent RAG searcher: |
|
searcher/native
Package native provides the NativeRAG searcher:
|
Package native provides the NativeRAG searcher: |
|
searcher/selfquery
Package selfquery provides Self-Query RAG implementation.
|
Package selfquery provides Self-Query RAG implementation. |
|
searcher/stepback
Package stepback provides StepBack RAG implementation.
|
Package stepback provides StepBack RAG implementation. |
|
steps/agentic
Package agentic provides agentic orchestration steps for autonomous RAG workflows.
|
Package agentic provides agentic orchestration steps for autonomous RAG workflows. |
|
steps/post_retrieval
Package post_retrieval provides steps that process and optimize retrieval results.
|
Package post_retrieval provides steps that process and optimize retrieval results. |
|
steps/pre_retrieval
Package pre_retrieval provides query enhancement steps that occur before retrieval.
|
Package pre_retrieval provides query enhancement steps that occur before retrieval. |
|
steps/retrieval
Package retrieval provides retrieval strategy steps that execute different search algorithms.
|
Package retrieval provides retrieval strategy steps that execute different search algorithms. |
|
pkg
|
|
|
domain/abstraction
Package abstraction defines the storage abstraction interfaces for the goRAG framework.
|
Package abstraction defines the storage abstraction interfaces for the goRAG framework. |
|
domain/entity
Package entity defines the core entities for the goRAG framework.
|
Package entity defines the core entities for the goRAG framework. |
|
usecase/dataprep
Package dataprep provides data preparation utilities for RAG systems.
|
Package dataprep provides data preparation utilities for RAG systems. |