Ask plain questions about your own spending and get an answer computed from your transaction records — citing the transactions it used, and refusing when the records cannot support one. Elasticsearch and all-distilroberta-v1 both run on the machine; the spending history never leaves it.
The obvious RAG design — embed every transaction, retrieve top-k, let a model answer — works for "what did I buy at Decathlon?" and fails badly for "how much did I spend on groceries?"
So the two jobs are separated. Retrieval finds the transactions a question is about. Arithmetic never touches retrieved rows — aggregation questions are answered by a filtered Elasticsearch aggregation across every matching record. Retrieval still runs, and its results become the citations, so the answer shows its working.
Finds BigBasket when you type BigBasket. For merchant strings, lexical matching is exactly right and not obsolete.
all-distilroberta-v1 (768-dim) finds grocery shops when you ask about "food shopping" — a phrase that appears nowhere in the data.
Each document scores 1/(k + rank), summed across both lists. RRF needs no score calibration, which matters because BM25 scores and cosine similarities are not on comparable scales. Implemented in Python rather than using Elasticsearch's rrf retriever, a licensed feature — so this runs on a plain open-source node.
Identifiers are redacted before indexing, so a card number never reaches the index. Elasticsearch binds to 127.0.0.1, embeddings run locally, and there is no API key because there is no API call.
Every expected answer is computed directly from the transaction file in Python, with no Elasticsearch involved. If the system disagrees with the dataframe, the system is wrong.
A real bank export has messier merchant strings, refunds, failed transactions and duplicates — all of which hurt the retriever more than the aggregation.
It handles "groceries in November"; it does not handle "the month I went to Goa". An LLM extraction step would generalise it, at the cost of a dependency the design currently avoids.
No LLM in the loop is what makes the system fully local and hallucination structurally impossible. The cost is rigid phrasing.