AI Engineering
Learn LLMs, RAG, agents, secure tools, and production AI through practical insurance examples.
Shared MERN architecture
flowchart TD
AI chatbot
A chatbot exposes a conversational model through your app. It may perform no tools or retrieval. Ordinary conversation alone does not make it an agent.
Streaming AI chatbot
A streaming chatbot shows safe response pieces and progress as they arrive. Final completion remains a separate event.
RAG chatbot
A RAG chatbot answers conversations using retrieved knowledge. The dialogue interface and retrieval pipeline are separate responsibilities.
AI search
AI search often uses semantic or hybrid retrieval to return relevant results. Generation is optional. A result list can be sufficient.
AI summarizer
A summarizer condenses supplied content while preserving the requested facts. It transforms evidence rather than creating new authoritative facts.
AI extractor
An extractor converts unstructured text/media into defined fields. Unknown fields should remain unknown instead of being guessed.
AI classifier
A classifier selects a category for input. An LLM classifier can handle varied wording with a bounded output label.
Customer-support agent
A support agent combines dialogue with safe tools and knowledge search to resolve requests. It may use a bounded loop or explicit graph.
CRM assistant
A CRM assistant helps staff query customer records, summarize interactions, and prepare updates. It needs staff-scoped data access and explicit write policy.
Email assistant
An email assistant classifies, summarizes, searches, or drafts email. Sending is a separate consequential operation. Incoming email content is untrusted.
Workflow automation and introducing Python/FastAPI
AI workflow automation embeds model tasks inside an ordinary business process. Python/FastAPI adds a service boundary for Python-specific parsing, numerical work, or model execution when needed. Node remains capable of hosted model calls and orchestration.
Where does the LLM call belong?
In a server-side AI service behind authenticated Node/Next.js routes. React sends bounded input and receives safe text/events; provider secrets and trusted instructions stay on the backend.
How do MongoDB, Redis, and a vector index differ?
MongoDB stores application documents and canonical records where appropriate. Redis provides scoped caching/counters/queue backing. A vector index serves derived retrieval representations; none should silently replace authoritative claim-service truth.
How do you structure the backend?
Separate identity/validation, AI context and provider adapters, retrieval, safe tools, and domain services. Add queues or a graph only when state/recovery demands them. Keep business contracts independent of whichever framework coordinates the conversation.
A React chat UI renders malicious generated HTML. What changes?
Render model content as escaped text or a sanitized restricted Markdown subset. Do not trust generated HTML or links automatically. Review XSS, source URLs, attachment access, and leaked internal events alongside the backend controls.
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.