The Problem
Cloud-based AI assistants require sending all your questions and context to external servers. Privacy-conscious users want a personal assistant that runs locally but can still answer questions about current events, prices, and public information. A purely local LLM has no access to the internet, making it useless for anything time-sensitive.
The Scavio Solution
Run Ollama locally with a model like Llama 3 or Mistral, and add Scavio as the external search layer. When the local LLM detects a query needing current information, it calls Scavio's API for fresh data, then generates its answer using the search results as context. All reasoning happens locally; only the search query leaves your machine.
Before
Ollama running Llama 3 locally. User asks 'What time does the Apple Store in Austin close today?' Model guesses or refuses. No internet access means no current information. Privacy is preserved but the assistant is useless for real-world questions.
After
Ollama + Scavio search. Model detects the query needs external data, calls Scavio for Google Maps results ($0.005), gets current store hours, generates the answer locally. Only the search query 'Apple Store Austin hours' leaves the machine. Privacy preserved, question answered.
Who It Is For
Privacy-conscious developers and researchers who want a personal AI assistant that runs locally but can still access current web information when needed.
Key Benefits
- All reasoning stays on your local machine
- Only search queries leave your network -- no conversation context sent externally
- Scavio at $0.005/query makes external lookups nearly free
- Works with any Ollama-supported model (Llama 3, Mistral, Phi-3)
- Combines local privacy with real-time web knowledge
Python Example
import requests, os, json
SCAVIO_KEY = os.environ["SCAVIO_API_KEY"]
OLLAMA_URL = "http://localhost:11434/api/generate"
def scavio_search(query: str) -> str:
resp = requests.post(
"https://api.scavio.dev/api/v1/search",
headers={"x-api-key": SCAVIO_KEY, "Content-Type": "application/json"},
json={"query": query, "country_code": "us"},
timeout=10,
)
results = resp.json().get("organic_results", [])[:5]
return "\n".join(f"- {r['title']}: {r['snippet']}" for r in results)
def ask_local_llm(question: str) -> str:
# Step 1: Check if question needs search
check = requests.post(OLLAMA_URL, json={
"model": "llama3",
"prompt": f"Does this question need current internet data? Answer YES or NO only: {question}",
"stream": False,
}).json()["response"].strip()
context = ""
if "YES" in check.upper():
context = f"\nCurrent search results:\n{scavio_search(question)}"
# Step 2: Generate answer locally with optional search context
resp = requests.post(OLLAMA_URL, json={
"model": "llama3",
"prompt": f"Answer this question using the provided context if available.{context}\n\nQuestion: {question}",
"stream": False,
})
return resp.json()["response"]
answer = ask_local_llm("What are the best rated coffee shops in Austin?")
print(answer)JavaScript Example
const SCAVIO_KEY = process.env.SCAVIO_API_KEY;
const OLLAMA_URL = "http://localhost:11434/api/generate";
async function scavioSearch(query) {
const res = await fetch("https://api.scavio.dev/api/v1/search", {
method: "POST",
headers: {"x-api-key": SCAVIO_KEY, "Content-Type": "application/json"},
body: JSON.stringify({ query, country_code: "us" }),
});
const results = (await res.json()).organic_results || [];
return results.slice(0, 5).map(r => `- ${r.title}: ${r.snippet}`).join("\n");
}
async function askLocalLLM(question) {
const check = await fetch(OLLAMA_URL, {
method: "POST",
body: JSON.stringify({
model: "llama3",
prompt: `Does this question need current internet data? Answer YES or NO only: ${question}`,
stream: false,
}),
}).then(r => r.json());
let context = "";
if (check.response.toUpperCase().includes("YES")) {
context = `\nCurrent search results:\n${await scavioSearch(question)}`;
}
const resp = await fetch(OLLAMA_URL, {
method: "POST",
body: JSON.stringify({
model: "llama3",
prompt: `Answer this question using the provided context if available.${context}\n\nQuestion: ${question}`,
stream: false,
}),
}).then(r => r.json());
return resp.response;
}
const answer = await askLocalLLM("What are the best rated coffee shops in Austin?");
console.log(answer);Platforms Used
Web search with knowledge graph, PAA, and AI overviews
Google Maps
Local business search with ratings and contact info
YouTube
Video search with transcripts and metadata
Community, posts & threaded comments from any subreddit