Best Architecture Pattern For Mail AI Agents With RAG and Fine Tuning #184989
Replies: 1 comment 1 reply
-
|
I'm not sure how far along you are, but if you're just starting out, I highly recommend checking out this template. (The template uses FastAPI, but you can easily adapt the LangGraph logic to your Django app). Celery is great for linear task queues. If your workflow is always fetch -> classify -> retrieve -> generate -> send, it works very well. Now, if you want something more dynamic, where the agent can decide on different paths (e.g., the agent decides 'this email needs a response' vs 'this needs human review' vs 'I need to search again'), tools such as LangGraph (designed for these stateful, cyclic workflows) used in the template above can help you. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I'm building an AI email agent for tourism businesses using Django + RAG for context-aware responses. The system fetches emails via IMAP, classifies them with fine-tuned models, retrieves relevant info from a vector database, then generates responses using LLMs. What's the best architecture pattern for managing the workflow between e
mail fetching → classification → RAG retrieval → response generation → SMTP sending? Should I use Celery task queues, or are there better approaches for this pipeline?
Beta Was this translation helpful? Give feedback.
All reactions