mirror of
https://github.com/aljazceru/enclava.git
synced 2025-12-18 16:04:28 +01:00
rag improvements 2
This commit is contained in:
6
backend/app/modules/rag/__init__.py
Normal file
6
backend/app/modules/rag/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
"""
|
||||
RAG (Retrieval-Augmented Generation) module for Confidential Empire platform
|
||||
"""
|
||||
from .main import RAGModule
|
||||
|
||||
__all__ = ["RAGModule"]
|
||||
1922
backend/app/modules/rag/main.py
Normal file
1922
backend/app/modules/rag/main.py
Normal file
File diff suppressed because it is too large
Load Diff
82
backend/app/modules/rag/module.yaml
Normal file
82
backend/app/modules/rag/module.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
name: rag
|
||||
version: 1.0.0
|
||||
description: "Document search, retrieval, and vector storage"
|
||||
author: "Enclava Team"
|
||||
category: "ai"
|
||||
|
||||
# Module lifecycle
|
||||
enabled: true
|
||||
auto_start: true
|
||||
dependencies: []
|
||||
optional_dependencies:
|
||||
- cache
|
||||
|
||||
# Module capabilities
|
||||
provides:
|
||||
- "document_storage"
|
||||
- "semantic_search"
|
||||
- "vector_embeddings"
|
||||
- "document_processing"
|
||||
|
||||
consumes:
|
||||
- "qdrant_connection"
|
||||
- "llm_embeddings"
|
||||
- "document_parsing"
|
||||
|
||||
# API endpoints
|
||||
endpoints:
|
||||
- path: "/rag/collections"
|
||||
method: "GET"
|
||||
description: "List document collections"
|
||||
|
||||
- path: "/rag/upload"
|
||||
method: "POST"
|
||||
description: "Upload and process documents"
|
||||
|
||||
- path: "/rag/search"
|
||||
method: "POST"
|
||||
description: "Semantic search in documents"
|
||||
|
||||
- path: "/rag/collections/{collection_id}/documents"
|
||||
method: "GET"
|
||||
description: "List documents in collection"
|
||||
|
||||
# UI Configuration
|
||||
ui_config:
|
||||
icon: "search"
|
||||
color: "#8B5CF6"
|
||||
category: "AI & ML"
|
||||
|
||||
forms:
|
||||
- name: "collection_config"
|
||||
title: "Collection Settings"
|
||||
fields: ["name", "description", "embedding_model"]
|
||||
|
||||
- name: "search_config"
|
||||
title: "Search Configuration"
|
||||
fields: ["top_k", "similarity_threshold", "rerank_enabled"]
|
||||
|
||||
# Permissions
|
||||
permissions:
|
||||
- name: "rag.create"
|
||||
description: "Create document collections"
|
||||
|
||||
- name: "rag.upload"
|
||||
description: "Upload documents to collections"
|
||||
|
||||
- name: "rag.search"
|
||||
description: "Search document collections"
|
||||
|
||||
- name: "rag.manage"
|
||||
description: "Manage all collections (admin)"
|
||||
|
||||
# Health checks
|
||||
health_checks:
|
||||
- name: "qdrant_connectivity"
|
||||
description: "Check Qdrant vector database connection"
|
||||
|
||||
- name: "embeddings_service"
|
||||
description: "Check LLM embeddings service"
|
||||
|
||||
- name: "document_processing"
|
||||
description: "Check document parsing capabilities"
|
||||
Reference in New Issue
Block a user