Skip to content

PromptWatchDog - Real-Time Insights Metric Powered by Gemini#2740

Open
g-emarco wants to merge 6 commits intoGoogleCloudPlatform:mainfrom
g-emarco:project/PromptWatchDog
Open

PromptWatchDog - Real-Time Insights Metric Powered by Gemini#2740
g-emarco wants to merge 6 commits intoGoogleCloudPlatform:mainfrom
g-emarco:project/PromptWatchDog

Conversation

@g-emarco
Copy link
Copy Markdown

This PR introduces PromptWatchDog, a serverless, event-driven framework designed to monitor data streams using natural language prompts evaluated by Gemini Pro on Google Cloud. Instead of rigid code-based metrics, users define conditions in English (e.g., "Check if message sentiment is negative"), and Gemini interprets the data in real-time.

Architecture & Flow

  • Event Ingestion: Listens to messages on Pub/Sub.
  • AI Analysis Engine: Uses Gemini Pro (via LangChain) to evaluate unstructured payloads against natural language metric definitions.
  • Dynamic Monitoring: Emits structured JSON logs to aggregate Log-Based Metrics in Cloud Monitoring.
  • Local Dashboard: A Next.js UI for managing prompt definitions stored in Firestore.

Key Components Included:

  • Watchdog Service (Python 3.11): Deployed on Cloud Run (Functions Framework or Gen2) using uv for dependencies.
  • Next.js Dashboard (Local Only): Secure management UI for Firestore prompts (adheres to the Principle of Least Privilege).
  • Unified Monitoring Setup: Patterns for using watchdog_id and watchdog_name labels to scale without schema changes.

@g-emarco g-emarco requested a review from a team as a code owner March 26, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant