Skip to content

feat: add RAG database access as a tool #32

Closed

Description

@pavelanni

Summary

DocsClaw should be able to query RAG (Retrieval-Augmented Generation) databases to ground agent responses in domain-specific knowledge. This would enable agents to retrieve relevant context from vector stores before generating responses, improving accuracy for enterprise use cases.

Motivation

Several user stories from the business user requirements involve processing domain-specific documents where the agent needs access to organizational knowledge bases:

  • HR agents screening resumes against historical hiring data
  • Compliance officers matching controls against policy repositories
  • Security analysts cross-referencing findings against asset inventories

A RAG tool would let agents query a vector database (e.g. pgvector, Milvus, Qdrant, Elasticsearch) to retrieve relevant documents or passages, then use that context in their responses.

Proposed approach

Add a new tool (e.g. rag_query or fetch_context) in internal/rag/ that:

  • Accepts a natural language query and optional filters
  • Queries a configured vector database endpoint
  • Returns ranked document chunks with metadata
  • Configurable via agent-config.yaml (endpoint, collection, top-k, similarity threshold)

Open questions

  • Which vector database backends to support first?
  • Should this be a single generic tool or separate tools per backend?
  • How does this interact with the fetch_document tool — complementary or overlapping?
  • Authentication model for the RAG endpoint (SA token, API key, mTLS?)

Activity

  1. pavelanni commented on Jul 1, 2026

    @pavelanni
    CollaboratorAuthor

    Resolved in PR #73 (v0.10.0). RAG search tool with Weaviate backend is available via the rag: block in agent-config.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions