Skip to content

Koog storage backend (kdrant-koog) #37

Description

@tonytonycoder11

A Kdrant-backed Koog storage, so a Koog RAG agent can use Qdrant.

The original blocker has cleared: ai.koog:rag-vector-jvm:1.1.1-beta and its dependencies
rag-base-jvm:1.1.1 and embeddings-base-jvm:1.1.1 all resolve on Maven Central now.

What it also turned up is that this issue named the wrong interface. VectorStorageBackend<Document>
has no search method: Koog's EmbeddingStorage ranks by streaming allDocumentsWithPayload() from the
backend and scoring in memory. A Kdrant implementation of it would make every query pull the whole
collection over HTTP and rank it client-side, which is worse than not using a vector database at all,
since it pays for the index and then ignores it.

The right target is SearchStorage<Document, SimilaritySearchRequest>, where search is the
implementation's own and Qdrant does the work. SimilaritySearchRequest carries queryText, limit,
offset, minScore and a filterExpression, which maps onto Kdrant's search DSL the way the Spring AI
and LangChain4j adapters already do.

Two things to settle before building it:

  • SearchStorage lives in rag-base, which is stable at 1.1.1, while rag-vector is published
    only as 1.1.1-beta. Targeting the search interface may avoid depending on a beta at all, which
    matters for a module Kdrant would publish under its own stability policy.
  • The request carries a text query rather than a vector, so the module needs an embedder, as the other
    framework adapters do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Deferred

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions