Skip to content

Releases: raykavin/gorag

v0.0.3

12 Mar 02:27

Choose a tag to compare

v0.0.3 - Role-based knowledge loading for RAG

This release introduces native support for knowledge roles (system and user) in the loader and RAG engine pipeline.

Added

  • role field in pkg/models.KnowledgeChunk.
  • Role normalization during engine.ReadKnowledge:
    • system stays system
    • missing/invalid values default to user (backward compatible)
  • Role propagation to all expanded chunks created from files and files_path.

Engine updates

  • engine.Config now supports SystemPrompt string.
  • RAGEngine now stores fixed system context and exposes it through SystemPrompt().

Reliability improvements

  • ReadKnowledge now wraps underlying read/parse errors while preserving sentinel compatibility (errors.Is with ErrReadingKnowledgeFile and ErrParsingKnowledgeFile).
  • Internal retrieval/filtering paths were tightened to avoid in-place slice mutation side effects.

Tests

  • Added/updated tests for:
    • role propagation in expanded knowledge chunks
    • default role fallback to user
    • error assertions using errors.Is

Compatibility

  • No breaking changes.
  • Existing knowledge.json files without role continue to work unchanged.

Example

[
  {
    "id": "k1",
    "category": "persona",
    "files_path": "./kb/persona.md",
    "role": "system"
  },
  {
    "id": "k2",
    "category": "faq",
    "files_path": "./kb/faq",
    "role": "user"
  }
]

v0.0.2 - Hybrid Retrieval and Context Assembly

05 Mar 16:06

Choose a tag to compare

What's New

  • Added hybrid retrieval mode combining dense and keyword search with Reciprocal Rank Fusion (RRF).
  • Added hybrid + reranker mode (hybrid_reranker) for higher precision when reranking is available.
  • Improved context generation with structured chunk headers (chunk_id, source, optional metadata), score filtering, and character-budget controls.

Improvements

  • More robust context assembly with configurable limits:
    • ContextMax to cap total context size
    • ChunkMax to cap each chunk contribution
  • Better retrieval defaults and candidate expansion logic for hybrid search quality.
  • README updates and project naming consistency (gorag).

Fixes

  • Reduced noisy embedding progress logging in ProgressEmbedder.
  • Added safeguards to avoid empty/low-signal context output when scores are below threshold.

Tests

  • Added/updated tests for hybrid retrieval behavior, retrieval mode normalization, and context character-budget enforcement.

v0.0.1 - Initial Release

05 Mar 16:05

Choose a tag to compare

Overview

v0.0.1 is the first stable public release of gorag, introducing a complete Retrieval-Augmented Generation (RAG) foundation in Go.

Highlights

  • Introduced the core RAGEngine with retrieval and context-building flow.
  • Added reranking support for improving final context relevance.
  • Implemented document loading and chunk processing pipeline.
  • Added concurrent progress-based embedding for batch operations.
  • Added embedding and response caching layers for performance and cost optimization.
  • Added Qdrant integration with collection bootstrap and management helpers.
  • Added domain models for chat responses, knowledge chunks, and tool call logs.

Quality and Testing

  • Added unit tests across core engine, cache, and store components.
  • Included tests for cache embedder behavior and indexing correctness.

Developer Experience

  • Added a working basic usage example under examples/basic.
  • Improved documentation and project structure.
  • Added MIT license and updated README content.