Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Major Refactor. Migrating AI Logic to SDK and Implementing Component-Based Architecture #129

Open
Diegi97 opened this issue Jul 5, 2024 · 0 comments

Comments

@Diegi97
Copy link
Member

Diegi97 commented Jul 5, 2024

🚀 The feature, motivation and pitch

This issue proposes a significant refactor and enhancement to the architecture of ChatFAQ, aimed at evolving the vision of ChatFAQ to enable the creation of services based on genAI capabilities beyond RAG workflows. This initiative will shift the core AI 'logic' from the backend to our SDK, allowing for more flexible and modular AI component deployment and orchestration.

Overview of Changes:

  1. AI Logic Migration: All AI processing logic will be migrated to the SDK. The backend will henceforth focus on deploying AI 'components' such as:

    • LLMs (Language Models)
    • Embedding Models
    • Retrievers

    Future work may include classifiers, NERs (Named Entity Recognition), text-to-speech, text-to-image models, and more.

  2. Component Deployment: These AI components will be deployed on a Ray cluster.

  3. Endpoint Exposure: The backend will expose specific endpoints to facilitate communication with these deployed components.

  4. AI Orchestration Patterns: To streamline usage, common AI orchestration patterns can be predefined as a Finite State Machine (FSM) layer. Users will be able to create and utilize FSMs that uses these patterns directly through the SDK along with the logic that they want to implement. Common patterns include Retrieval Augmented Generation (RAG), agents, information extraction, synthetic data generation, data labeling, etc.

Tasks:

  • Expose Endpoints in the Backend: Develop and document endpoints for interacting with the deployed AI components.
  • Create RAG Layer in the SDK: Integrate the existing RAG logic within the SDK to handle AI orchestration.
  • Remove RAG Logic and Models from the Backend: Refactor the backend to remove redundant AI processing logic, focusing solely on deployment and management.
  • Update Admin Interface: Ensure the admin interface is updated to reflect these architectural changes and manage new components effectively.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant