graph TD
A[Start: Input keywords_with_metrics.csv] --> B[Parse CSV Input]
B --> C[Initialize LLM Classification]
C --> D[Apply Intent Rules]
D --> E{For Each Keyword}
E --> F[Check Action Words]
E --> G[Check Service Words]
E --> H[Check Tool Words]
E --> I[Check Location Words]
E --> J[Check Question Words]
E --> K[Check Info Words]
F & G & H & I --> L[Label as Buyer Intent]
J & K --> M[Label as Info Intent]
L & M --> N[Compile Results]
N --> O[Create keywords_with_intent.csv]
O --> P[Add Intent Column]
P --> Q[Validate Output Format]
Q --> R[End: Return keywords_with_intent.csv]