{"nodes": [{"id": "backend_app_services_llm_matcher_py", "label": "llm_matcher.py", "file_type": "code", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L1"}, {"id": "llm_matcher_get_candidates", "label": "_get_candidates()", "file_type": "code", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L38"}, {"id": "llm_matcher_get_unmatched_ingredients", "label": "_get_unmatched_ingredients()", "file_type": "code", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L86"}, {"id": "llm_matcher_ask_ollama", "label": "_ask_ollama()", "file_type": "code", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L97"}, {"id": "llm_matcher_run_llm_match_job", "label": "run_llm_match_job()", "file_type": "code", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L147"}, {"id": "llm_matcher_rationale_1", "label": "LLM-powered second-pass ingredient\u2192grocery matcher. After the deterministic AUT", "file_type": "rationale", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L1"}, {"id": "llm_matcher_rationale_42", "label": "Return up to ``_CANDIDATE_LIMIT`` grocery items ranked by fuzzy\u00d7precision.", "file_type": "rationale", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L42"}, {"id": "llm_matcher_rationale_87", "label": "Ingredients with no existing match in ingredient_grocery_match.", "file_type": "rationale", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L87"}, {"id": "llm_matcher_rationale_98", "label": "Ask the LLM to pick the best grocery item for the ingredient. Returns the 0", "file_type": "rationale", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L98"}, {"id": "llm_matcher_rationale_152", "label": "LLM second pass: match remaining unmatched ingredients. For each ingredient", "file_type": "rationale", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L152"}], "edges": [{"source": "backend_app_services_llm_matcher_py", "target": "logging", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L12", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "re", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L13", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "time", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L14", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "uuid", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L15", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "decimal", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L16", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "requests", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L18", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "rapidfuzz", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L19", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "sqlalchemy_dialects_postgresql", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L20", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L21", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "app_config", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L23", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "app_models", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L24", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "app_services_matcher", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L30", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "llm_matcher_get_candidates", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L38", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "llm_matcher_get_unmatched_ingredients", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L86", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "llm_matcher_ask_ollama", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L97", "weight": 1.0}, {"source": "backend_app_services_llm_matcher_py", "target": "llm_matcher_run_llm_match_job", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L147", "weight": 1.0}, {"source": "llm_matcher_run_llm_match_job", "target": "llm_matcher_get_unmatched_ingredients", "relation": "calls", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L168", "weight": 1.0}, {"source": "llm_matcher_run_llm_match_job", "target": "llm_matcher_get_candidates", "relation": "calls", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L180", "weight": 1.0}, {"source": "llm_matcher_run_llm_match_job", "target": "llm_matcher_ask_ollama", "relation": "calls", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L188", "weight": 1.0}, {"source": "llm_matcher_rationale_1", "target": "backend_app_services_llm_matcher_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L1", "weight": 1.0}, {"source": "llm_matcher_rationale_42", "target": "llm_matcher_get_candidates", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L42", "weight": 1.0}, {"source": "llm_matcher_rationale_87", "target": "llm_matcher_get_unmatched_ingredients", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L87", "weight": 1.0}, {"source": "llm_matcher_rationale_98", "target": "llm_matcher_ask_ollama", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L98", "weight": 1.0}, {"source": "llm_matcher_rationale_152", "target": "llm_matcher_run_llm_match_job", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L152", "weight": 1.0}], "raw_calls": [{"caller_nid": "llm_matcher_get_candidates", "callee": "_sig_words", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L50"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "_sig_words", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L57"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "lower", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L62"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "extract", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L64"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "lower", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L65"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "len", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L68"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "_sig_words", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L74"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "len", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L78"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "len", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L78"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "append", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L80"}, {"caller_nid": "llm_matcher_get_candidates", "callee": "sort", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L82"}, {"caller_nid": "llm_matcher_get_unmatched_ingredients", "callee": "select", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L89"}, {"caller_nid": "llm_matcher_get_unmatched_ingredients", "callee": "all", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L91"}, {"caller_nid": "llm_matcher_get_unmatched_ingredients", "callee": "filter", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L91"}, {"caller_nid": "llm_matcher_get_unmatched_ingredients", "callee": "query", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L91"}, {"caller_nid": "llm_matcher_get_unmatched_ingredients", "callee": "notin_", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L92"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "warning", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L103"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "join", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L106"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "enumerate", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L106"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "len", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L111"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "post", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L115"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "raise_for_status", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L129"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "warning", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L131"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "get", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L134"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "get", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L134"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "get", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L134"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "json", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L134"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "strip", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L136"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "sub", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L136"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "lower", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L138"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "search", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L140"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "int", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L143"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "group", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L143"}, {"caller_nid": "llm_matcher_ask_ollama", "callee": "len", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L144"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "all", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L161"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "filter", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L161"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "query", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L161"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "info", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L170"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "info", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L173"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "len", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L173"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "strip", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L177"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "debug", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L182"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "info", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L186"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "len", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L186"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "sleep", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L189"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "info", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L192"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "info", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L196"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "on_conflict_do_nothing", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L199"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "values", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L199"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "_pg_insert", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L199"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "uuid4", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L201"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "Decimal", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L204"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "execute", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L209"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "commit", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L212"}, {"caller_nid": "llm_matcher_run_llm_match_job", "callee": "info", "source_file": "backend/app/services/llm_matcher.py", "source_location": "L213"}]}