How harshithada/cloud_monitoredrag works
Cloud Monitored RAG ingests authorized PDFs into Weaviate, then lets users ask grounded questions through Streamlit or a Flask API. The query path applies shared prompt-injection checks, retrieves hybrid-ranked chunks, generates a cited Gemini answer, and records telemetry for Phoenix. The README documents additional product capabilities; source excerpts confirm the main calls and ingestion operations, while some detailed implementation relationships are supported only by README descriptions.
Main entry points: RAG_Agent_VertexAI_GoogleADK.py RAG agent · ingestion_weaviate.py PDF ingestion · rag_pipeline.py Hybrid retrieval · streamlit_app.py Streamlit console
Components 21
User interfaces
- Streamlit console
streamlit_app.py - Flask query API
api.py
Guarded RAG
- RAG agent
RAG_Agent_VertexAI_GoogleADK.py - Query guardrail
rag_pipeline.py - Hybrid retrieval
rag_pipeline.py - Query embedding
rag_pipeline.py - Weaviate collection
rag_pipeline.py - Grounded generation
rag_pipeline.py - Source coverage
rag_pipeline.py - Cited answer
PDF ingestion
- Ingestion endpoint
ingestion_service.py - PDF ingestion
ingestion_weaviate.py - PDF extraction
rag_pipeline.py - Text chunking
rag_pipeline.py - Document embeddings
rag_pipeline.py
Observability
- OpenTelemetry spans
Observability_Traces_Phoenix.py - Phoenix dashboard
Server_Phoenix.py
Other components
- User
- Vertex Gemini
- Authorized PDFs
- OTLP collector
Connections 26
- User → Streamlit console: asks via
README.md - User → Flask query API: queries via
README.md - Streamlit console → RAG agent: submits chat
streamlit_app.py - Streamlit console → Hybrid retrieval: inspects results
streamlit_app.py - Streamlit console → Query guardrail: tests query
streamlit_app.py - Flask query API → RAG agent: dispatches query
api.py - RAG agent → Query guardrail: checks input
RAG_Agent_VertexAI_GoogleADK.py - RAG agent → Hybrid retrieval: searches accepted query
RAG_Agent_VertexAI_GoogleADK.py - RAG agent → Grounded generation: requests answer
RAG_Agent_VertexAI_GoogleADK.py - Hybrid retrieval → Query embedding: encodes query
README.md - Hybrid retrieval → Weaviate collection: runs hybrid search
rag_pipeline.py - Weaviate collection → Hybrid retrieval: returns ranked chunks
README.md - Grounded generation → Vertex Gemini: generates with
rag_pipeline.py - Grounded generation → Source coverage: checks answer
rag_pipeline.py - Source coverage → Cited answer: returns cited result
README.md - Ingestion endpoint → PDF ingestion: invokes directory ingest
ingestion_service.py - Authorized PDFs → PDF ingestion: supplies documents
README.md - PDF ingestion → PDF extraction: extracts text
ingestion_weaviate.py - PDF ingestion → Text chunking: splits text
ingestion_weaviate.py - PDF ingestion → Document embeddings: embeds chunks
ingestion_weaviate.py - PDF ingestion → Weaviate collection: upserts chunks
ingestion_weaviate.py - RAG agent → OpenTelemetry spans: creates run spans
RAG_Agent_VertexAI_GoogleADK.py - Hybrid retrieval → OpenTelemetry spans: records retrieval
rag_pipeline.py - Grounded generation → OpenTelemetry spans: records generation
README.md - OpenTelemetry spans → OTLP collector: exports spans
Observability_Traces_Phoenix.py - OTLP collector → Phoenix dashboard: feeds dashboard
README.md