Skip to content

kingabzpro/semantic-web-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Olostep Semantic Cache

A small Jupyter benchmark for making repeated web searches faster and cheaper.

It puts a semantic cache in front of the Olostep Python SDK. Qdrant Cloud stores cached results and creates embeddings with Cloud Inference—no local model download required.

Search query
    ↓
Qdrant semantic cache
    ├─ cache hit  → return saved result ⚡
    └─ cache miss → Olostep search → save result

What the notebook shows

  • Direct Olostep vs cold-cache vs warm-cache speed
  • Cache-hit percentage and Olostep calls avoided
  • Estimated credit savings
  • One-hour cache expiry
  • Twelve similar Olostep and Qdrant queries

Quick start

pip install -r requirements.txt

Copy .env.example to .env, then add:

OLOSTEP_API_KEY=...
QDRANT_URL=...
QDRANT_API_KEY=...

Open notebook.ipynb and run it from top to bottom.

Tuning

CACHE_THRESHOLD defaults to 0.86: lower values create more hits, while higher values make reuse safer. Cache entries expire after one hour.

Skip caching when freshness matters: breaking news, stock prices, weather, or compliance-sensitive searches.

Contributors

Languages