Repository navigation
Add samples/llm-chatbot: Dozer + LLM + Vector DB + Langchain sample (#1690) - #2525
Open
CallumJB125 wants to merge 1 commit into
Open
CallumJB125 wants to merge 1 commit into
CallumJB125 wants to merge 1 commit into
Conversation
Complete working sample for getdozer#1690, based on the hyper-personalization article (getdozer.io/blog/llm-chatbot): - docker-compose.yml: Postgres (seeded customer profiles, transactions, credit-card products) + Qdrant (vector store) + Dozer + chatbot - dozer-config.yaml: ingests the three datasets, builds a unified customer profile via SQL join + aggregation, serves REST/gRPC - chatbot/: Langchain app - Dozer REST client, Qdrant RAG over the product catalog, prompt assembly, FastAPI + CLI entrypoints - Works keyless (mock LLM + hashing embeddings) for CI; real LLM with OPENAI_API_KEY - tests/: end-to-end smoke tests over the full chain
This branch has not been deployed
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.
/claim #1690
Closes #1690
Payout: 0xB43A9e048032049A2f8553739ED124C15f00487b (EVM/USDC)
What this adds
Complete working sample for #1690, based on the hyper-personalization article (getdozer.io/blog/llm-chatbot). A bank chatbot answers customer questions using a unified customer profile that Dozer builds in real time from multiple datasets (customer profiles, transactions, credit-card products), combined with RAG over the product catalog in a vector database, orchestrated with Langchain.
samples/llm-chatbot/:docker-compose.yml—postgres:16(seeded) +qdrant+getdozer/dozer+ chatbot service; onedocker compose up --builddozer-config.yaml— 3 Postgres sources → SQL join + aggregation → unifiedcustomer_profileendpoint, pluscustomers/transactions/productsendpoints with primary + secondary indexesseed/init.sql— 5 customers, 18 transactions, 5 credit-card productschatbot/— Langchain app: Dozer REST client, Qdrant indexing + retrieval (OpenAI embeddings, or a dependency-free hashing embedder), prompt assembly with chat history, FastAPI + interactive CLI entrypointstests/test_sample.py— 6 end-to-end smoke tests over the full chainOPENAI_API_KEYa deterministic mock LLM + hashing embeddings still run the whole pipeline (CI-friendly, zero secrets); with a key it usesgpt-4o-mini+ OpenAI embeddings.OPENAI_BASE_URLalso supported for vLLM/Ollama-compatible servers.Verified end-to-end
Verified against a dozer binary built from this repo's source (v0.2.0 tag, arm64):
dozer runwith the sample config: pipeline validation OK, REST API on:8080serving all 4 endpointsGET /health→{"status":"SERVING"};GET /→["/customers","/transactions","/products","/profile"]transaction_count=4,total_spend=2190.40{"$filter":{"customer_id":1003},"$order_by":{"amount":"desc"},"$limit":3}→1450.00, 980.00, 890.00pytest tests/test_sample.py→ 6 passedNo demo video attached yet — happy to record one if useful; the test suite and commands above reproduce the full flow.