Add grounded Dozer + LangChain card advisor - #143
Conversation
|
/claim getdozer/dozer#1690 |
|
Exact-head review for The offline surface is solid: I independently reproduced all 41 unit tests, the retrieval evaluation ( One acceptance gap remains for the issue's "complete working sample" requirement: the Dozer-backed path has not actually been exercised. The PR body explicitly says no live Dozer binary was used. Please add a reproducible live smoke result using the documented path: start the pinned Dozer version with Run-Id: |
Addresses the exact-head review on PR getdozer#143: the Dozer-backed path was never exercised. This commit makes it reproducible end to end with Dozer v0.2.1: - Restructure data/ into per-table directories (data/<table>/<table>.csv) because Dozer's LocalStorage CSV connector lists a per-table directory; the fixture gateway reads the same layout, so offline and Dozer paths stay identical (all 41 tests still pass, eval 1.0/1.0). - Align the customer_features endpoint primary key with the SQL GROUP BY key that Dozer materializes. - Pin Dozer v0.2.1 in the README (v1 config schema; v0.3+/v0.4 use a different schema) and document --ignore-pipe for non-TTY execution. - Commit demo/dozer-live-smoke-2026-08-12.txt: dozer 0.2.1 started with dozer-config.yaml, GET /card_products (5 records) and POST /customer_features/query {$filter customer_id=C001} both verified, and one successful `python -m app.cli --gateway dozer ... --json` call (exit 0, provenance source: "dozer" on both endpoints). AI assistance was used for implementation and verification; every claim in the smoke artifact was captured from a live run.
|
Exact-head review addressed — the Dozer-backed path is now exercised live and reproducible. Commit: Live smoke result (captured artifact committed at
Two reproducible fixes were required to make the documented path run (the config-build gap you predicted — the stub tests could not catch these):
PR body updated accordingly. |
Adds .github/workflows/grounded-card-advisor.yml so the exact-head review proof on PR getdozer#143 runs on every change instead of only once: - unit-tests job: 41-test suite, retrieval eval, compile check (runs on any PR/push touching the sample, path-scoped). - dozer-live-smoke job: downloads the pinned Dozer v0.2.1 release binary, installs its runtime deps on ubuntu-22.04 (libssl1.1, unixodbc, libltdl7, protoc 21.12), starts `dozer run --config-path dozer-config.yaml --ignore-pipe`, asserts both generated endpoints (5 card products; C001 customer features), and runs one `--gateway dozer` CLI call asserting exit code 0, gateway "dozer" and provenance source "dozer". Optional via the workflow_dispatch `run_live_smoke` input. - README documents the two jobs. No secrets or write permissions required; the smoke log is uploaded as an artifact.
The multi-line python3 -c block in the CLI step had leading indentation, which Python rejects at compile time (IndentationError). Collapse the assertions into a single-line python3 -c invocation, matching the pattern already used and passing in the endpoint step.
- schedule trigger (03:00 UTC) so the live Dozer v0.2.1 proof keeps running against Dozer release/schema drift; fires on the default branch, i.e. activates once merged to main (documented in workflow + README). - Start step now retries once: each attempt kills leftovers, starts Dozer fresh, polls up to 300s; the second attempt only runs if the first times out, so transient start flakes no longer fail the smoke job outright.
|
/claim getdozer/dozer#1690
/claim #1690
Summary
Why this implementation is different
The sample fails closed on malformed or non-finite financial data, uses Dozer's POST query filter rather than loading all customer rows, never exposes raw transaction APIs, and keeps hard eligibility outside both the LLM and vector database. It also includes a deterministic retrieval evaluation and explicit security tests.
Verification
python -m unittest discover -s tests -v— 41 passedpython -m tests.eval_retrieval— hit-rate@3 1.0, MRR 1.0python -m compileall -q app tests— passedgit diff --check— passedThe dependency-free fixture path was executed locally. The Dozer-backed path was also exercised live and is reproducible: Dozer v0.2.1 started with
dozer-config.yaml, both generated endpoints (GET /card_products,POST /customer_features/query) answered, and onepython -m app.cli --gateway dozer --dozer-url http://localhost:8080 --customer-id C001 --query "travel rewards" --jsoncall succeeded (exit 0, provenancesource: "dozer"). Captured artifact:usecases/llm-grounded-card-advisor/demo/dozer-live-smoke-2026-08-12.txt. Two fixes were required to make the documented path run: per-table CSV directories (data/<table>/<table>.csv, matching Dozer's LocalStorage layout) and an endpoint primary key aligned with the SQL GROUP BY key. No external API key was used.AI assistance was used for implementation and review; every submitted change and test result was independently checked.
Demo
usecases/llm-grounded-card-advisor/demo/dozer-1690-demo.mp4