Implement Typesense support for RAG in the AI module

Created on 29 August 2025, 13 days ago

Problem/Motivation

We need to integrate Typesense with the AI module's "agent" functionality to enable Retrieval Augmented Generation (RAG) in the chatbot. The existing ai_search module provides a RagTool that can trigger RAG, but it only supports specific vector databases like Milvus, Zilliz, and Pinecone. We need to extend this functionality to work with Typesense, leveraging its vector database capabilities.

Proposed resolution

Implement the necessary code to allow the RagTool to query Typesense for content. This will involve creating a Typesense-specific search implementation within the AI module that can handle vector search queries and return relevant documents to the RAG agent. This would allow a specific user question to trigger a RAG process using our existing Typesense setup.

Remaining tasks

  • Analyze the ai_search module and the RagTool.php file to understand how it interacts with the currently supported vector databases.
  • Develop the code to enable querying Typesense as a vector database.
  • Verify that the integration successfully retrieves relevant content from Typesense and provides it to the AI agent for RAG.

User interface changes

None. The changes are all backend-related.

API changes

A new API might be required within the ai_search module to support Typesense as a vector database. This would likely involve extending an existing interface or creating a new one to handle Typesense-specific queries.

Data model changes

None. The changes only affect how data is retrieved, not how it is stored.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024