Skip to content

Feature Proposal: Integrate OceanBase seekdb as AI-Native Database #71

@Teingi

Description

@Teingi

Feature Proposal: Integrate OceanBase seekdb as AI-Native Database

Summary

I propose integrating OceanBase seekdb as the primary database for LemonAI to enhance knowledge retrieval, semantic search, and AI-native capabilities.

Motivation

Currently, LemonAI uses SQLite for data storage and implements basic text-based search for knowledge retrieval. While this works for basic use cases, the project could significantly benefit from an AI-native database that provides:

  1. Semantic Search: Currently, knowledge retrieval uses simple text matching (includes()). seekdb enables semantic search to find relevant knowledge even when exact keywords don't match.

  2. Vector Search: The codebase has commented-out vector functionality (syncQuestionVectorData), indicating interest in vector capabilities. seekdb provides built-in vector search.

  3. Hybrid Search: Combine vector search, full-text search, and relational queries in a single statement for more accurate results.

  4. In-Database AI: Run embedding generation, reranking, and LLM inference inside the database, reducing external API calls.

  5. Better Knowledge Retrieval: The current resolveUsedKnowledgeForCategory only filters by category and agent_id. With seekdb, we can find semantically similar knowledge across categories.

Why seekdb?

Key Advantages

Feature Current (SQLite) seekdb
Vector Search
Semantic Search
Hybrid Search
Full-Text Search ⚠️ Limited
Embedded Mode
MySQL Compatible
In-Database AI
OLTP Support

Perfect Fit for LemonAI

  1. Embedded Mode: seekdb supports embedded mode (like SQLite), perfect for local deployment
  2. MySQL Compatible: Easy migration path, minimal code changes
  3. Unified Engine: Handles relational, vector, text, JSON in one database
  4. RAG Workflow: Built-in support for document-in/data-out RAG workflows
  5. Apache 2.0 License: Open source and compatible

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions