Skip to content

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

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

PromptWatchDog - Real-Time Insights Metric Powered by Gemini#2740
g-emarco wants to merge 6 commits into
GoogleCloudPlatform: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
Copy link
Copy Markdown
Collaborator

@holtskinner holtskinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thank you very much for contributing. We are trying to limit the large sample applications being added to this repository and consolidating content to make the repo easier to navigate.

If you can condense the new materials from this application into a notebook that covers a specific concept/use case, then we're happy to review and add it to the repo.

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.

2 participants