A production-ready Retrieval-Augmented Generation (RAG) server that uses Vertex AI Search and the Discovery Engine API to serve the Answer method - a conversational search experience with generative answers grounded on document data.
- π€ Fully-managed RAG pipeline: Stateful multi-turn conversational search with generative answers
- β‘ Production-capable performance: Autoscaling, concurrency, and regional redundancy via multiple Cloud Run services
- π Integration flexibility: Authenticated external HTTPS endpoint using Google-managed TLS
- π Resource observability: Single-pane-of-glass Cloud Monitoring dashboard with customizable metrics and alerts
- π Explainable and debuggable results: Investigate generative answers using the full RAG pipeline results logged to BigQuery
- π Data-driven LLM-ops: Tune the conversational search agent using question/answer pairs labelled with user feedback
- π‘οΈ Identity-Aware Proxy: Secure access control
- π€ Google OAuth: Personalized sessions with user authentication
- π Automated deployments: One-click install and uninstall with Terraform and Cloud Build
- The Global External Application Load Balancer provides planet-scale availability
- The load balancer backend service interfaces with regional serverless network endpoint group backends composed of Cloud Run services
- Zonal failover: Cloud Run services replicate across multiple zones within a Compute region to prevent outages for a single zonal failure
- Autoscaling: add/remove instances to match demand and maintain a minimum instance count for high availability
- Concurrency: instances process multiple requests simultaneously
- Regional redundancy: services can span multiple regions to optimize latency and optionally deliver higher availability in case of regional outages.
- The Vertex AI Search Search App and Data Store automate document preparation for semantic search and retrieval
- The Conversational Search Service (the interface for the Answer method) uses Gemini-based answer generation models to power grounded generative answers
- The application asynchronously writes the full session data and user feedback responses to BigQuery for offline analysis
- Google Cloud Project with Owner permissions
- Terraform and
gcloudCLI installed
See detailed deployment prerequisites β
-
Configure OAuth for user authentication
π Complete OAuth setup guide β -
Deploy the application
source scripts/install.sh -
Enable Vertex AI Agent Builder in the Cloud Console and import your documents
-
Configure Identity-Aware Proxy to secure access
π View complete installation guide β
- β Prerequisites - Environment setup
- π OAuth Setup Guide - Step-by-step OAuth client configuration
- π Deployment - Deployment and Post-deployment steps
- π§ͺ Development Guide - Local development, testing, and Docker usage
- π API Reference - Answer method configuration options
- π·οΈ Version Management - Automated semantic release and versioning
- ποΈ Terraform Overview - General Terraform patterns and best practices (reusable)
- π Bootstrap Process - Initial project setup and service accounts
- βοΈ Cloud Build Automation - Automated deployments and CI/CD
- π Rollbacks - Rolling back deployments and managing revisions
- βοΈ Infrastructure Changes - Applying infrastructure-only changes
- π οΈ Helper Scripts - Automation scripts reference
- β Known Issues - Common problems and solutions
Remove all resources:
source scripts/uninstall.shThis project uses:
- Python 3.13+ with Poetry for dependency management
- FastAPI backend with an example Streamlit frontend
- Terraform for infrastructure as code
- pytest for testing
π Full development guide β
answer-app/
βββ src/
β βββ answer_app/ # FastAPI backend service
β βββ client/ # Streamlit frontend application
β βββ package_scripts/ # Helper scripts (OAuth secrets)
βββ terraform/
β βββ bootstrap/ # Initial project setup
β βββ main/ # Main infrastructure deployment
β βββ modules/ # Reusable Terraform modules
βββ docs/ # Modular documentation
β βββ installation/ # Setup guides
β βββ infrastructure/ # Infrastructure documentation
β βββ development/ # Development & API docs
β βββ troubleshooting/ # Known issues & solutions
βββ scripts/ # Automation scripts
βββ tests/ # Unit tests
βββ assets/ # Documentation screenshots
This project is licensed under the MIT License - see the LICENSE file for details.
