Overview
Support agents answer questions based on a knowledge base that was last updated weeks or months ago. When products change pricing, features update, or new integrations launch, the agent gives outdated answers until someone manually updates the KB. This workflow searches Google daily for your product's current documentation, pricing pages, and changelog, then updates the knowledge base entries that have drifted from the live data.
Trigger
Cron schedule (daily at 6 AM UTC)
Schedule
Daily at 6 AM UTC
Workflow Steps
Load knowledge base entries
Read all KB entries tagged as requiring freshness checks (pricing, features, integrations, compatibility).
Search for current data
For each KB entry, query Scavio for the topic. Compare the search results against the stored KB content.
Detect drift
Flag entries where search results contradict the KB content (different prices, deprecated features, new versions).
Generate update suggestions
For each drifted entry, create a suggested update with the new data and source URL.
Apply auto-updates or queue review
Auto-apply updates for factual fields (prices, versions). Queue subjective changes for human review.
Report changes
Send a summary of applied and queued changes to the support team lead.
Python Implementation
import requests, os, json
H = {"x-api-key": os.environ["SCAVIO_API_KEY"]}
KB_ENTRIES = [
{"id": "pricing", "topic": "Scavio pricing", "current_text": "Scavio offers 500 free credits per month"},
{"id": "platforms", "topic": "Scavio supported platforms", "current_text": "Google, YouTube, Amazon, Walmart, Reddit"},
]
def check_kb_freshness(entry):
r = requests.post("https://api.scavio.dev/api/v1/search", headers=H,
json={"platform": "google", "query": entry["topic"] + " 2026",
"ai_overview": True}, timeout=10).json()
snippets = [o.get("snippet", "") for o in r.get("organic", [])[:3]]
aio_text = ""
aio = r.get("ai_overview")
if aio:
aio_text = aio.get("text", "")
all_text = " ".join(snippets) + " " + aio_text
# Simple drift detection: check if key terms from KB appear in search results
kb_terms = [t.lower() for t in entry["current_text"].split() if len(t) > 3]
found = sum(1 for t in kb_terms if t in all_text.lower())
confidence = found / max(len(kb_terms), 1)
return {
"id": entry["id"],
"topic": entry["topic"],
"confidence": round(confidence, 2),
"needs_review": confidence < 0.5,
"search_evidence": snippets[:2],
"ai_overview_text": aio_text[:200] if aio_text else None
}
for entry in KB_ENTRIES:
result = check_kb_freshness(entry)
status = "DRIFT DETECTED" if result["needs_review"] else "OK"
print(f"[{status}] {result['topic']} (confidence: {result['confidence']})")
if result["needs_review"]:
print(f" Evidence: {result['search_evidence'][0][:100]}...")JavaScript Implementation
const H = {"x-api-key": process.env.SCAVIO_API_KEY, "Content-Type": "application/json"};
async function checkKbFreshness(entry) {
const r = await fetch("https://api.scavio.dev/api/v1/search", {
method: "POST", headers: H,
body: JSON.stringify({platform: "google", query: entry.topic + " 2026", ai_overview: true})
}).then(r => r.json());
const snippets = (r.organic || []).slice(0, 3).map(o => o.snippet || "");
const aioText = r.ai_overview?.text || "";
const allText = snippets.join(" ") + " " + aioText;
const kbTerms = entry.currentText.split(" ").filter(t => t.length > 3).map(t => t.toLowerCase());
const found = kbTerms.filter(t => allText.toLowerCase().includes(t)).length;
const confidence = found / Math.max(kbTerms.length, 1);
return {
id: entry.id, topic: entry.topic,
confidence: Math.round(confidence * 100) / 100,
needsReview: confidence < 0.5,
searchEvidence: snippets.slice(0, 2)
};
}Platforms Used
Web search with knowledge graph, PAA, and AI overviews