Dodge-AI-ERP-Copilot / DOCS /task_log.md
Abhisingh-18's picture
Mirror of github.com/Abhisingh18/Dodge-AI-ERP-Copilot
ed895b0 verified
|
Raw
History Blame Contribute Delete
2.25 kB

Upgrade: Keyword-Match β†’ LLM Intent Detection

  • Backend: LLM Intent Detector

    • Add detect_intent(query) β†’ calls LLM β†’ returns {intent, entities}
    • Define intent types: trace_order, show_orders, billing_analysis, explain, fraud_check, etc.
  • Backend: Intent-Based SQL

    • Replace keyword generate_sql() with generate_sql_from_intent(intent, entities)
    • Deterministic SQL per intent, no more if "trace" in q
  • Backend: LLM Summary

    • Add generate_llm_summary(query, result) for clean natural language answers
    • Fallback to rule-based if LLM fails
  • Backend: Conditional Highlights

    • Only return highlights for trace/graph intents
    • Empty highlights for show_orders, billing_analysis, etc.
  • Frontend: Smart Graph Control

    • Only highlight when highlights array is non-empty
    • Clear previous highlights for non-graph queries
  • Verification

    • curl test all intents
    • Browser demo
  • Feature: Visual Flow Trace in Chat

    • Add renderFlowTrace component to ChatPanel.jsx
    • Render document chain with arrows (Order β†’ Delivery β†’ Billing β†’ Journal)
    • Support clicking on IDs in the flow to highlight them in the graph
    • Sync main.py and main_OPENROUTER_FINAL.py for correct flow data output
  • Feature: Resizable Chat Panel

    • Add chatWidth state to App.jsx
    • Implement draggable resize handle between Graph and Chat panels
    • Update ChatPanel.jsx to accept and use dynamic width
    • Add min/max width constraints for better UX
  • Feature: Monorepo Refactor for Deployment

    • Create backend/ and frontend/ directories
    • Move backend logic and DB to backend/
    • Create backend/requirements.txt
    • Update frontend to use import.meta.env.VITE_API_URL
    • Create frontend/.env for local development
    • Verify local run in browser
    • Commit all changes locally (Monorepo + Updates)
    • Final Push to GitHub (Success πŸš€)
    • Fix Vercel 404: Add frontend/vercel.json and push
    • Fix API 422: Refactor /query from GET to POST