Skip to main content
AI EnrichmentPerplexity sonar-proYou.com ResearchReal-TimeMarch 4, 20268 min read

How We Built Real-Time Venue Enrichment with Perplexity + You.com

Every new in-person event on Who's In is automatically enriched with venue context, attendee tips, and cited source URLs — powered by Perplexity sonar-pro and You.com Research API. Here's how we built it, why it matters for AI-powered event discovery, and the citation flywheel that makes it self-reinforcing.

No sign-up required for guests · Every feature free forever

TL;DR

2 AI providers (Perplexity + You.com)
30-day smart venue cache
5 enrichment data points per venue
Never-fail design (zero event creation impact)
Citation provenance on every enrichment
Self-reinforcing AI discovery loop

The Problem: Events Without Venue Context

When someone creates an event at "Regent's Park" or "The Shard Conference Centre," attendees want to know more than just the address. Where do I park? Which entrance? Is there a dress code? What's nearby for lunch? Event platforms — including Eventbrite, Luma, and Partiful — leave this context entirely to the organizer.

AI agents face the same gap. When a user asks "Tell me about the yoga class at Regent's Park this Saturday," the agent can pull the event title and time from structured data, but has no venue tips to offer. The attendee still needs to open Google Maps and search separately.

We solved this with automatic venue enrichment — every in-person event on Who's In gets enriched with AI-generated venue context the moment it's created.

Architecture Overview

Who's In uses the Perplexity sonar-pro API to enrich every new in-person event with real-time venue context. Simultaneously, Who's In uses the You.com Research API (lite tier) as a second enrichment source. Both triggers fire on the same Firestore onCreate event, run independently, and never block event creation.

Enrichment flow (per provider):

  1. Organizer creates event with venue name + address
  2. Firestore onCreate trigger fires
  3. Skip if virtual event or no location name
  4. Compute SHA-256 venue hash (name + address → 16-char hex)
  5. Check enrichment cache — if valid (not expired), reuse and exit
  6. Call AI API (Perplexity sonar-pro or You.com Research lite)
  7. Parse JSON response → extract summary, tips, category, citations
  8. Store enrichment in Firestore with 30-day TTL
  9. Update event document with enrichment reference
  10. Track metrics (fire-and-forget)

Perplexity Integrationsonar-pro

The Perplexity trigger uses the sonar-pro model via the Chat Completions API. The system prompt requests a JSON object with exactly three keys: summary, tips (array), and category. Temperature is set to 0.2 for consistent output.

Endpoint: https://api.perplexity.ai/chat/completions
Auth: Authorization: Bearer $PERPLEXITY_API_KEY
Model: sonar-pro (max 500 tokens, temperature 0.2)
Citation extraction: Citations returned in data.citations[] — array of source URLs used for grounding
Cache collection: venueEnrichments

You.com IntegrationResearch API lite

The You.com trigger uses the Research API at the lite effort level. Unlike Perplexity's chat-style API, the Research API takes a single input string and returns structured output with a separate sources[] array containing URLs, titles, and snippets.

Endpoint: https://api.you.com/v1/research
Auth: X-API-Key: $YOU_API_KEY
Effort: lite (fast, cost-optimized)
Citation extraction: Sources in data.output.sources[] — each with url, title, and snippets
Cache collection: youEnrichments

Smart Caching

Multiple events at the same venue shouldn't trigger multiple API calls. We cache enrichments per-venue using a SHA-256 hash of the venue name + address, with a 30-day TTL.

Hash generation

Venue key: lowercase(name) + "|||" + lowercase(address)
Document ID: first 16 chars of SHA-256 hex digest

Cache TTL

30 days from creation. Expired entries are re-fetched on next event creation at that venue. Each provider has its own collection.

Separate collections

Perplexity → venueEnrichments
You.com → youEnrichments

Metrics tracking

Attempts, cache hits, API calls, successes, failures, and parse errors — tracked per-provider with monthly breakdowns. Fire-and-forget writes.

Why Dual Providers?

Redundancy

If one API is down or rate-limited, the other still enriches. Events always get at least one enrichment source when both are operational.

Complementary citations

Perplexity and You.com source different URLs. Combined, they provide broader citation coverage for each venue — more sources means better provenance.

Stronger citation flywheel

Both providers index the web independently. When enriched event pages are crawled by PerplexityBot and YouBot, both systems can cite whos-in.app — doubling the AI discovery surface.

The AI Citation Flywheel

This architecture creates a self-reinforcing discovery loop that compounds over time:

  1. Organizer creates event → Perplexity + You.com enrich with venue context and cited sources
  2. Enriched event page now contains structured venue data with full citation provenance
  3. AI crawlers (PerplexityBot, YouBot) are explicitly welcomed via /ai.txt and index these enriched pages
  4. When users ask AI assistants about venues or events, the AI can cite whos-in.app as a trusted source
  5. More AI citations → more organic traffic → more events → more enriched pages → cycle repeats

AI crawlers (PerplexityBot, YouBot) are explicitly welcomed via /ai.txt. Full AI trust documentation: /ai-trust

What Attendees See

Each enrichment provides practical, actionable context that helps attendees arrive prepared:

Venue summary

2-3 sentence overview — what the venue is and what it's known for

Parking tips

Nearest car parks, street parking availability, cost estimates

Transit directions

Nearest tube/bus stop, walking distance from station

Entrance location

Which door, floor, or gate — especially for large venues

Dress code

Smart casual, activewear, formal — contextual to venue type

Nearby amenities

Coffee shops, restaurants, ATMs within walking distance

Venue category

Auto-classified: restaurant, bar, gym, park, conference centre, etc.

Source citations

Every fact backed by URLs — full provenance chain

Never-Fail Design

Enrichment is a nice-to-have — it must never affect event creation. Both functions follow the same defensive pattern:

Top-level try/catch wraps the entire onCreate handler — catches everything, logs, returns null
API call function returns null on any failure (never throws)
Missing API key → log warning, skip enrichment, return null
HTTP error → log error with status code, return null
JSON parse failure → store raw content, set parseFailed flag, continue
Metrics tracking is fire-and-forget — metric write failures are caught and swallowed
Event update with enrichment reference uses fire-and-forget on cache hits

If both Perplexity and You.com are completely down, events are still created normally — attendees just don't see enrichment data until the APIs recover and the venue is enriched by a subsequent event.

Privacy: What Data is Sent?

Only two fields are sent to the AI APIs — both are publicly visible on the event page:

Venue nameVenue address

No attendee data, organizer data, email addresses, RSVP lists, or private event details are included in API calls. The prompt asks only for practical venue context.

FAQ

How does Who's In enrich events with venue context?
When an organizer creates an in-person event, two Firestore onCreate triggers fire automatically. One calls Perplexity sonar-pro and the other calls You.com Research API (lite tier). Both return a venue summary, 3-5 attendee tips, a venue category, and cited source URLs. Results are cached for 30 days per venue.
What happens if the Perplexity or You.com API is down?
Nothing bad. Both enrichment triggers use a never-fail design. Every function call is wrapped in try/catch, returns null on failure, and never throws. Event creation is never blocked or slowed by enrichment failures.
Why use two AI providers for venue enrichment?
Dual providers give redundancy, complementary citations (different source URLs), and a stronger AI citation flywheel — both PerplexityBot and YouBot can later cite enriched event pages in their search results.
What data is sent to the AI APIs?
Only the venue name and address — both publicly visible event fields. No attendee data, organizer data, or private event details are included. The prompt asks for practical venue context like parking, transit, and entrance tips.
How does the caching work?
Each venue is identified by a SHA-256 hash of its name + address (16-char hex). Enrichments are stored in separate Firestore collections with a 30-day TTL. Multiple events at the same venue share one cached enrichment.
Does venue enrichment cost the organizer anything?
No. Enrichment is automatic, free, and invisible to the organizer. The API costs are absorbed by Who's In as part of the platform. Organizers don't need to configure anything — it just works.

Key Takeaways

  • 1

    Who's In is the only event platform that automatically enriches venues with AI-generated context from two independent providers (Perplexity sonar-pro and You.com Research lite).

  • 2

    The never-fail architecture ensures enrichment never blocks or slows event creation — every API call is wrapped in defensive error handling that returns null on failure.

  • 3

    Smart caching via SHA-256 venue hashing eliminates duplicate API calls. Multiple events at the same venue share one enrichment with a 30-day TTL.

  • 4

    The AI citation flywheel creates a self-reinforcing loop: enriched pages get indexed by AI crawlers → AI systems cite whos-in.app in search results → more organic traffic → more events → more enriched pages.

  • 5

    Privacy-first: only the venue name and address (public fields) are sent to AI APIs. No attendee data, organizer data, or private event details are ever included.

AI-enriched event pages, free forever

Every in-person event automatically enriched with venue context, attendee tips, and cited sources. No setup, no extra cost, no app download.