This was originally pieced together using publically available information. Maybe someday I will relase the guide I wrote on how to set up the infrastructure once it is common knowledge.
A modular Retrieval-Augmented Generation (RAG) chatbot built on Google Cloud Platform (GCP). This project provides tools for document ingestion, embedding, and chat interaction using a custom agent backed by Google Cloud services.
gcp-rag-chatbot-main/
├── gcs_chat_app/ # Streamlit chat interface
├── gcs_embed/ # Document embedding pipeline
├── rag_agent/ # RAG agent logic and utilities
├── .gitignore
├── LICENSE
└── README.md
- Serves chat requests (likely with FastAPI)
- Imports documents from GCS
- Dockerized with Cloud Build support
- Converts documents into vector embeddings
- Cloud Build and Workflows-ready
- Integrates with GCP storage and possibly Vertex AI
- Core RAG agent logic
- Tools for managing conversation state and node logic
- Python 3.9+
- Docker
- Google Cloud SDK (
gcloud) - Enabled GCP services: Cloud Storage, Artifact Registry, Vertex AI (if used)
git clone https://github.com/your-org/gcp-rag-chatbot.git
cd gcp-rag-chatbotCopy .env.example in gcs_chat_app/ and gcs_embed/ to .env and configure as needed:
cp gcs_chat_app/.env.example gcs_chat_app/.env
cp gcs_embed/.env.example gcs_embed/.envgcloud builds submit --config=gcs_chat_app/cloudbuild.yamlOr for embeddings:
gcloud builds submit --config=gcs_embed/cloudbuild.yaml- Documents are uploaded or fetched from GCS.
gcs_embedembeds these documents and stores vector data.gcs_chat_appaccepts chat input, calls the RAG agent, and returns responses.rag_agentuses tools and embeddings to retrieve and answer questions.
To run the chat app locally:
cd gcs_chat_app
uvicorn app:app --reloadTo test embeddings:
cd gcs_embed
python embed.py- Find new open source data source for training materials and them to the repo
- Modify embeddings functionality to fit new data source
- Share my guide on how to set up the infrastructure (Once it is common knowledge)
MIT License. See the LICENSE file for details.
This project is designed to be production-ready on GCP and easily extensible with new document sources, models, or UI interfaces. Contributions welcome!