Skip to content

feat(examples): add Dozer + LLM + Vector DB + LangChain banking advisor sample (#1690) - #2539

Open
goddrivenbullet wants to merge 2 commits into
getdozer:mainfrom
goddrivenbullet:feat/dozer-llm-vector-langchain-sample-1690
Open

goddrivenbullet wants to merge 2 commits into
getdozer:mainfrom
goddrivenbullet:feat/dozer-llm-vector-langchain-sample-1690

Conversation

@goddrivenbullet

Copy link
Copy Markdown

Summary

Adds a self-contained Dozer + LLM + Vector Database + LangChain sample in examples/dozer-llm-langchain-sample/ demonstrating a real-time Banking & Credit Card AI Advisor (#1690).

Architecture & Implementation

  • Dozer Real-Time Feature & Aggregation Pipeline (dozer-config.yaml + src/dozer_client.py):
    • Ingests customers, credit_cards, and transactions tables and computes real-time per-customer category spend aggregations (customer_spending_summary via Dozer SQL GROUP BY customer_id, category), exposing low-latency REST (:8080) and gRPC (:50051) endpoints.
    • DozerFeatureStoreClient queries live Dozer REST endpoints (POST /{endpoint}/query) with automatic local CSV fallback for offline/CI test runs.
  • Unstructured Vector Knowledge Base (knowledge_base/credit_card_terms.md + src/vector_store.py):
    • Indexes unstructured credit card benefits, travel protection rules, lounge access perks, and underwriting criteria for cosine similarity vector search.
  • LangChain Grounded Underwriting & Recommendation Engine (src/advisor.py):
    • Combines live customer credit score, income, utilization, and real-time category spend from Dozer with semantic vector hits from the knowledge base.
    • Enforces underwriting eligibility (min_credit_score, min_annual_income, max_utilization_pct), computes exact annualized reward value (net_ongoing_annual_value_usd and net_first_year_value_usd), and synthesizes grounded recommendations via LangChain (ChatOpenAI when OPENAI_API_KEY is configured, or deterministic grounded synthesis offline).

Verification

python3 -m unittest discover -s examples/dozer-llm-langchain-sample/tests -v
# Ran 5 tests in 0.014s - OK

Fixes #1690
/claim #1690

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


James Crout seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sample: Dozer + LLM + Vector database + Langchain sample

2 participants