DEV Community

Shreya Maheshwar
Shreya Maheshwar

Posted on

"New Year, New You" Portfolio Challenge with Google AI

New Year, New You Portfolio Challenge Submission

This is a submission for the New Year, New You Portfolio Challenge Presented by Google AI

About Me

I'm a software engineer with experience specializing in backend systems, data engineering, and cloud infrastructure. I built this portfolio to showcase two AI-powered projects that solve real problems I face daily: information overload and LLM observability during LLM auto-review of PRs on personal repos.

Portfolio

How I Built It

**Tech Stack
| Component | Technology |
|-----------|------------|
| Backend | FastAPI on Cloud Run |
| AI/Scoring | Gemini 2.0 Flash API |
| Data Storage | BigQuery |
| Rate Limiting | Firestore + BudgetGuard |
| Observability | OpenTelemetry, Cloud Monitoring |

The Portfolio Has Two Main Projects:
1. Content Intelligence Hub

An AI-powered content curation system that transforms 500+ daily RSS articles into ~10 high-value reads using a dual-scoring approach:

Gemini AI analyzes personal relevance to my interests.
Community signals (HackerNews, Lobsters) validate quality.
This solves the "obscure blog post" problem — where AI alone can't distinguish between a random tutorial and a battle-tested Netflix engineering post.

2. LLM Code Review Observability
End-to-end monitoring for AI code review systems, tracking:

  • RAG retrieval quality (embedding similarity scores)
  • Cost and latency trends
  • Request volume and error rates Live dashboards query BigQuery directly for real-time KPIs and time-series charts.

Technical Deep Dive
Dual-Scoring Algorithm (Content Intelligence Hub project)

The system uses confidence-based weighting that adapts based on available signals:

weights = {
    'high': (0.5, 0.5),    # Found on BOTH Hacker News and Lobsters
    'medium': (0.7, 0.3),  # Found on ONE platform
    'low': (0.9, 0.1)      # No community signals
}
Enter fullscreen mode Exit fullscreen mode

Viral Override: when community score >= 70 AND ai_relevance >= 25.
The AI threshold prevents off-topic viral content (e.g. politics) from taking over.

if community_score >= 70 and ai_relevance >= 25:
    ai_weight, community_weight = 0.3, 0.7
Enter fullscreen mode Exit fullscreen mode

Structured Output with Gemini
Gemini returns type-safe JSON validated by Pydantic.

StruQ Pattern for Safe NL→SQL
The chat assistant never generates SQL from user input. Instead, Gemini extracts structured intent, which maps to parameterized queries:

User: "Show me Python tutorials from this week"
         ↓
SearchIntent {
    topics: ["Python"],
    time_range_days: 7,
    content_type: "tutorial"
}
         ↓
Parameterized SQL (user input never touches query)
Enter fullscreen mode Exit fullscreen mode

LLM Observability Patterns (LLM Code Review Observability project)
The observability pipeline tracks metrics that surface actionable insights:

Metric Pattern and What It Means

  1. High cost, low similarity: Sending lots of context but it's not relevant—tune RAG
  2. Low context utilization: Room to add more files or history to improve reviews
  3. Embedding failures: Vertex AI quota/connectivity issues—check GCP console
  4. Cost variance between repos: Some codebases need different review strategies

Google AI Integration
Gemini 2.0 Flash powers:

  • Article relevance scoring with structured JSON output
  • Natural language chat interface (StruQ pattern for safe NL→SQL)
  • Content classification (tutorials, deep dives, news)

Security
5-layer prompt injection defence at $0 additional cost:

  1. Input validation (20+ regex patterns)
  2. Secure prompt construction with delimiters
  3. Structured output schema enforcement (Pydantic)
  4. Output validation (schema enforcement, prompt leakage detection)
  5. Rate limiting ($2/day budget cap via Firestore)
  6. Vacation mode - Firestore-backed rate limiting (2 req/IP/day, 10 global/day) - current mode

What I'm Most Proud Of

The Dual-Scoring Innovation: Single-dimension AI scoring treats an obscure blog post the same as a viral Netflix engineering article if both match your interests. By combining AI relevance with community validation, I get the best of both worlds—personalized AND battle-tested recommendations.

Live Stats: Both dashboards show numbers that are real and relevant, not projection metrics. The Content Intelligence Hub queries BigQuery for actual article counts and scores. The LLM Observability tab displays live KPIs (total reviews, cost, latency, RAG similarity) and time-series charts pulled directly from the llm_observability.metrics table.

Cost Control: BudgetGuard caps spending at $2/day with graceful degradation. The entire platform runs for ~$20/month while processing 100s of daily articles and sporadic PRs. Thanks to Cloud Runs that scale-to-zero.

Top comments (0)