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.
TL;DR
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):
- Organizer creates event with venue name + address
- Firestore
onCreatetrigger fires - Skip if virtual event or no location name
- Compute SHA-256 venue hash (name + address → 16-char hex)
- Check enrichment cache — if valid (not expired), reuse and exit
- Call AI API (Perplexity sonar-pro or You.com Research lite)
- Parse JSON response → extract summary, tips, category, citations
- Store enrichment in Firestore with 30-day TTL
- Update event document with enrichment reference
- 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.
https://api.perplexity.ai/chat/completionsAuthorization: Bearer $PERPLEXITY_API_KEYsonar-pro (max 500 tokens, temperature 0.2)data.citations[] — array of source URLs used for groundingvenueEnrichmentsYou.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.
https://api.you.com/v1/researchX-API-Key: $YOU_API_KEYlite (fast, cost-optimized)data.output.sources[] — each with url, title, and snippetsyouEnrichmentsSmart 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:
- Organizer creates event → Perplexity + You.com enrich with venue context and cited sources
- Enriched event page now contains structured venue data with full citation provenance
- AI crawlers (PerplexityBot, YouBot) are explicitly welcomed via
/ai.txtand index these enriched pages - When users ask AI assistants about venues or events, the AI can cite whos-in.app as a trusted source
- 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:
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:
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?▾
What happens if the Perplexity or You.com API is down?▾
Why use two AI providers for venue enrichment?▾
What data is sent to the AI APIs?▾
How does the caching work?▾
Does venue enrichment cost the organizer anything?▾
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.