feat(examples): add weaviate-live-rag continuously-fresh RAG demo#299
Merged
Conversation
- bootstrap: add EXPECTED_DOCS readiness gate so 'Demo is live' only prints once all docs are queryable in Weaviate (no query-before-ready race) - chatbot: prepopulate the input with the demo question - move pipeline screenshot into the example dir and embed it in the README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A self-contained,
git clone && docker compose upexample —examples/weaviate-live-rag/— that demonstrates continuously-fresh RAG: a support chatbot answers from a Weaviate index of help-center docs, and the moment a row changes in Postgres, TypeStream re-embeds it and the bot's answer changes seconds later. No reindex job, no consumer code, no Kafka to operate.Built as the Tier-A "live ingestion" demo asset for devrel outreach. Data is fictional ("Northwind").
Architecture
The chatbot queries Weaviate directly; TypeStream's only job is keeping the index fresh. Everything runs from published images (
server,kafka-connect,ui) plus a small Node chatbot and a one-shot bootstrap container.How it works
pipeline/help-articles.typestream.jsonis applied at startup viaPipelineService.ApplyPipeline(gRPC). Config-as-code doesn't auto-create the Weaviate connector, so the pipeline ends in akafkaSinkand thebootstrapcontainer registers the Weaviate Kafka Connect sink directly (config mirrorsConnectionService).docker compose downwipes state,upre-seeds Postgres and re-runs bootstrap for a clean baseline every time.EXPECTED_DOCS), eliminating the query-before-ready window.caddy+envoy+uiv2) athttp://localhost:5173— the applied pipeline shows up as a running job with live throughput.Verified demo moves
psql < demo/update-trial.sqlpsql < demo/insert-sso.sqlBuilt to retarget
The reusable core (Postgres, CDC, redpanda, server, bootstrap core, chatbot shell) is vendor-neutral. Only two files encode "Weaviate":
bootstrap/target.sh—create_collection+register_sink_connectorchatbot/retriever.js—retrieve(question, k) -> [{title, body}]So cloning this to Qdrant/Neo4j/etc. is "swap the sink + the retriever."
Notes
OPENAI_API_KEYin.env(gitignored); used by the server to embed docs and the chatbot to embed queries (same model,text-embedding-3-small).🤖 Generated with Claude Code