Guide

Keep your RAG pipeline current with live web changes

A retrieval pipeline is only as good as the freshness of its index. Re-crawling every source on a schedule is expensive, and hashing raw pages floods the store with near-duplicate chunks from ads and timestamps. Hypeline gives you the opposite: a deduplicated stream of extracted content that updates the index only when a source really changed.

The mental model: continuous, deduplicated ingest

Instead of a nightly crawl, run one long-lived ingest worker that consumes the stream and upserts a document per real change. Each event is the extracted main content, already deduplicated, so you embed the item that changed and nothing else. Key every document by the event id and the upsert is idempotent: a re-delivered change replaces its chunk rather than adding a copy.

Ingest the stream into a vector store

ingest.py
# pip install hypeline
from hypeline import Hypeline
from your_vectorstore import embed, upsert   # any store: pgvector, Pinecone, etc.

hy = Hypeline("hype_...")

# Sources the pipeline should keep current.
for url in [
    "https://docs.example/changelog",
    "https://competitor.example/pricing",
    "https://regulator.example/filings",
]:
    hy.create_watch(url)

cursor = load_cursor()  # resume where the last run stopped

for event in hy.stream(since=cursor):
    upsert(
        id=event.id,                     # idempotent: replaces on re-delivery
        vector=embed(event.content),     # extracted main content, boilerplate removed
        metadata={
            "url": event.url,
            "title": event.title,
            "source_type": event.source_type,
            "emitted_at": event.emitted_at,
        },
    )
    save_cursor(event.id)                # durable resume point

The saved cursor is what makes this safe to run forever: if the worker restarts, it reconnects from the last event it stored, and the stream replays in order with no gap and no duplicate work. The hypeline client is a thin wrapper over the HTTP API: create_watch is POST /v1/sources and stream(since=...) opens the GET /v1/stream Server-Sent Events endpoint (the cursor rides the Last-Event-ID header), so you can run the same loop from plain curl.

Retrieval sees current content

Downstream retrieval is unchanged. Your generator queries the same vector store, but now the passages it retrieves reflect the latest genuine changes to each source, not a stale snapshot from the last crawl. Because template and timestamp churn never produced an event, the store stays lean and the nearest-neighbor results stay relevant.

Why Hypeline, not a page-change checker

  • Deduplicated on extracted content. You embed real changes to the main text, so the index does not bloat with near-identical chunks.
  • One schema across every source. Feeds, watched pages, and streaming sources arrive as one event shape, so a single ingest loop covers a mixed corpus.
  • Cursor resume. A durable cursor turns an always-on ingest worker into a gap-free, exactly-resumable process.
  • Signed events. Each event carries an Ed25519 signature, so you can verify a passage's provenance before it enters retrieval.
FAQ

Frequently asked questions

Why is this better than re-crawling on a schedule?

A crawl re-fetches and re-embeds everything, most of which did not change, and raw-page hashing keeps mistaking ads and timestamps for updates. Hypeline emits an event only when the extracted content genuinely changed, so you do far less work and the index stays clean.

How do I avoid duplicate chunks?

Events are deduplicated on the extracted content, and keying each document by the event id makes the upsert idempotent. A re-delivered change overwrites its own chunk instead of adding a second one.

Which vector store does this work with?

Any of them. The stream is plain HTTP and each event is a small, extracted document, so you can embed and upsert into pgvector, Pinecone, Weaviate, or a local store with the same loop.

What happens if my ingest worker goes down?

Persist the cursor as you process events. On restart, reconnect with it and the stream resumes strictly after the last event you stored, so the index backfills in order with nothing lost or repeated.

Give your agents eyes on the web

Add your email and we'll tell you the moment your agents can start watching the web live.

No spam. One email when it goes live.