Proposal for RAG API Template with Frontend and Backend
Perpetue237 opened this issue · comments
Introduction:
I want to propose the addition of a template for building a Retrieval-Augmented Generation (RAG) API with a frontend and backend using Docker Compose. RAG is a powerful technique that combines retrieval-based methods with generation-based methods to improve the quality and relevance of generated responses, making it highly useful for applications like question-answering, chatbots, and more.
Proposal:
The proposed template will consist of a backend service for handling the RAG model, a frontend for interacting with the API, and an optional Nginx service for routing and load balancing. The template will use popular technologies such as Python (FastAPI) for the backend, React+Vite for the frontend, and Docker Compose to orchestrate the services and mount external volumes where the LLMs are stored.
Benefits:
- Ease of Deployment: Simplifies the deployment of a RAG-based application with a predefined template.
- Reusability: Provides a reusable template for developers to set up an RAG application quickly.
- Scalability: Utilizes Docker Compose to efficiently manage and scale the services.
Example Structure:
rag-api-template/
├── backend/
│ ├── Dockerfile
│ ├── app/
│ │ ├── main.py
│ │ ├── models/
│ │ └── utils/
├── frontend/
│ ├── Dockerfile
│ ├── src/
│ │ ├── App.tsx
│ │ ├── components/
│ │ └── styles/
├── nginx/
│ ├── nginx.conf
├── docker-compose.yml
└── .env
I would love to hear feedback and suggestions from the maintainers and the community on this proposal.