AWS Builder Center
Building a Provider Readiness Engine: Checking Who AI Assistants Recommend, Using Only AWS

Building a Provider Readiness Engine: Checking Who AI Assistants Recommend, Using Only AWS

Patients no longer Google their symptoms — they ask ChatGPT, Gemini, or Perplexity, and the AI hands back a single recommendation instead of a list of links to compare. For healthcare providers, that's the whole game now: either the AI names you, or you don't exist to that patient. This POC is a small, working system on AWS that checks a provider's digital footprint across four independent signals and flags whether LLM would confidently recommend them — and if not, which signal is holding them back.

Series: Agentic AI (2 articles)

  1. 1
    Building a Provider Readiness Engine: Checking Who AI Assistants Recommend, Using Only AWS This article

The idea, in plain terms

Search used to work like a librarian: it handed you a shelf of options and let you judge them. An LLM works like a friend who already read the whole shelf and just tells you which book to take home. You're no longer competing for a spot on a list — you're competing to be the one answer.
Healthcare makes this harder than most industries. Medical guidance falls into what search systems call YMYL — "Your Money or Your Life" — content, so the AI is deliberately cautious. It would rather recommend nobody than recommend someone it can't verify.
That verification comes down to four independent checks:
  • Search AI — can the AI find a specific, quotable fact about you rather than vague marketing language?
  • Social AI — are your profiles active and consistent with each other?
  • Listing AI — does your name, address, and phone number match everywhere?
  • Reputation AI — do you have enough recent, genuine, well-managed reviews?
Miss one, and the AI doesn't necessarily rank you lower — it often just leaves you out.

Architecture: four independent checks, no orchestration required

The simplest version of this doesn't need a central brain. Each pillar is its own small job: pull data from a third-party source, score it with an AWS AI service, done. No shared state, no coordination step, nothing to keep in sync.
Two kinds of data sources feed these checks:
  • Native platform APIs — Google Business Profile API and the Meta Graph API — when a provider exists and gives reliable, official data.
  • Bright Data — for everything without a usable public API: search result pages, review sites like Healthgrades or Yelp, and social platforms that don't expose the fields you need.
The rule of thumb: use the platform's own API when you can get a token — it's more reliable and won't break under you. Reach for Bright Data only where there's no official API, which in practice is most review sites and a few social platforms.

The four checks, as working code

Search AI — is your content quotable?

Pull how you show up in search via Bright Data's SERP API, then let Bedrock judge whether the result reads as specific and verifiable, or as marketing fog.
# search_ai_lambda.py
import requests, boto3, json

def fetch_serp(brand_name, api_token, zone):
resp = requests.post(
"https://api.brightdata.com/serp/req",
headers={"Authorization": f"Bearer {api_token}"},
json={"zone": zone, "query": f"best {brand_name} near me", "search_engine": "google"},
)
return resp.json() # organic results + any AI overview snippet

def score_with_bedrock(serp_data, brand_name):
bedrock = boto3.client("bedrock-runtime", region_name="us-east-1")
prompt = (
f"Given these search results, does '{brand_name}' appear with specific, "
f"quotable, verifiable facts (credentials, numbers, named specialists)? "
f"Score 0-100. Return JSON only.\n\n{json.dumps(serp_data)[:4000]}"
)
resp = bedrock.invoke_model(
modelId="anthropic.claude-sonnet-4-5-20250929-v1:0",
body=json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 200,
"messages": [{"role": "user", "content": prompt}],
}),
)
return json.loads(json.loads(resp["body"].read())["content"][0]["text"])

Social AI — do your profiles agree with each other?

Pull page activity from Meta's Graph API directly — official, and free with a token. Fall back to Bright Data for platforms without a public API.
# social_ai_lambda.py
import requests, boto3

def fetch_meta_page(page_id, access_token):
fields = "name,fan_count,posts.limit(10){message,created_time}"
resp = requests.get(
f"https://graph.facebook.com/v19.0/{page_id}",
params={"fields": fields, "access_token": access_token},
)
return resp.json()

def fetch_via_brightdata(profile_url, api_token, zone):
# for platforms without a usable public API (TikTok, some Instagram profiles, etc.)
resp = requests.post(
"https://api.brightdata.com/dca/trigger",
headers={"Authorization": f"Bearer {api_token}"},
json={"zone": zone, "url": profile_url},
)
return resp.json()

def score_consistency(meta_data, other_profiles):
comprehend = boto3.client("comprehend")
text = meta_data.get("name", "") + " " + " ".join(p.get("name", "") for p in other_profiles)
return comprehend.detect_sentiment(Text=text[:4500], LanguageCode="en")

Listing AI — does your name/address/phone match everywhere?

The Google Business Profile API is the source of truth here — diff it against what's on your own site.
# listing_ai_lambda.py
import requests

def fetch_gbp_listing(location_id, access_token):
resp = requests.get(
f"https://mybusinessbusinessinformation.googleapis.com/v1/{location_id}",
headers={"Authorization": f"Bearer {access_token}"},
params={"readMask": "storefrontAddress,phoneNumbers,title"},
)
return resp.json()

def nap_match(gbp_data, site_nap):
gbp_name = gbp_data.get("title", "").lower().strip()
gbp_phone = gbp_data.get("phoneNumbers", {}).get("primaryPhone", "")
return {
"name_match": gbp_name == site_nap["name"].lower().strip(),
"phone_match": gbp_phone == site_nap["phone"],
}

Reputation AI — are people saying good things, recently?

Reviews rarely have a clean API. Google reviews come through the GBP API above; everything else (Healthgrades, Yelp) goes through Bright Data's scraper API.
# reputation_ai_lambda.py
import requests, boto3

def fetch_reviews_brightdata(review_page_url, api_token, zone):
resp = requests.post(
"https://api.brightdata.com/dca/trigger",
headers={"Authorization": f"Bearer {api_token}"},
json={"zone": zone, "url": review_page_url},
)
return resp.json().get("reviews", [])

def score_reviews(reviews):
comprehend = boto3.client("comprehend")
texts = [r["text"] for r in reviews[:25] if r.get("text")]
if not texts:
return {"reputation_score": 0}
result = comprehend.batch_detect_sentiment(TextList=texts, LanguageCode="en")
pos = sum(r["SentimentScore"]["Positive"] for r in result["ResultList"])
return {"reputation_score": round((pos / len(texts)) * 100, 1)}

Where each source comes from

Pillar
Preferred source
Fallback
Search AI
Bright Data SERP API
Google Search - APIs
Social AI
Meta Graph API (official)
Bright Data, for platforms without a public API
Listing AI
Google Business Profile API (official)
Bright Data, for directories without an API
Reputation AI
Google reviews via GBP API
Bright Data, for Yelp / Healthgrades / etc.

The scoring logic

Each of the four functions above returns a 0–100 score. Combining them mirrors how the AI itself seems to behave: two signals act as gates, two act as weights.
  • Listings and Content are gates. If your NAP data doesn't match across the web, or your site has nothing quotable on it, no amount of strength elsewhere fixes that.
  • Social and Reputation are weights. Once you clear the gates, these add or subtract confidence — reputation counts for more, since it's the signal patients (and the AI) seem to trust most.
def readiness_score(content, social, reputation, nap_match_pct):
gate = 1.0 if nap_match_pct >= 90 else max(0, (nap_match_pct - 50) / 40)
weighted = 0.35 * content + 0.20 * social + 0.45 * reputation
return round(weighted * gate, 1)
A provider with excellent reviews but a mismatched phone number across directories still won't show up — the gate matters more than the weight.

Why this is worth building

None of the four checks above needs more than a scheduled Lambda function and one API call. There's no framework to learn, no orchestration layer to maintain, and no infrastructure that can silently drift out of sync. Each pillar stands on its own, which means you can ship the first one this week and add the rest as you go.
The pattern generalizes past healthcare, too — any business competing to be the AI's one answer is running the same four checks, whether the source is a hospital directory or a restaurant review site.

Series: Agentic AI (2 articles)

  1. 1
    Building a Provider Readiness Engine: Checking Who AI Assistants Recommend, Using Only AWS This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article