graph TD
A[Start: Receive Product Details] --> B[Extract Fields]
B --> C[Title Text]
B --> D[Bullet Points]
B --> E[Description]
C --> F[LLM Scan for Suspicious Terms]
D --> F
E --> F
F --> G[Generate Suspicious Terms List]
G --> H[Trademark API Check]
H --> I{Is Term Trademarked?}
I -->|Yes| J[Add to Remove List]
I -->|No| K[Add to Keep List]
J --> L[Text Rewrite Process]
K --> L
L --> M[Clean Title]
L --> N[Clean Bullets]
L --> O[Clean Description]
M --> P[Final Compliance Check]
N --> P
O --> P
P --> Q{Passes All Checks?}
Q -->|No| L
Q -->|Yes| R[Generate Keywords]
R --> S[Compile Final Output]
S --> T[Return Compliant Text Package]
subgraph APIs Used
H
P
end
subgraph Text Processing
L
R
end