docker / awesome-compose

Awesome Docker Compose samples
https://docs.docker.com/compose/
Creative Commons Zero v1.0 Universal
33.57k stars 6.47k forks source link

Proposal for RAG API Template with Frontend and Backend #493

Closed Perpetue237 closed 2 months ago

Perpetue237 commented 2 months ago

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:

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.