AI / CrewAI Interview Questions II
1. Which is better and why: a single Crew vs combining multiple Crews inside a Flow for a complex pipeline?
Single Crew Multiple Crews inside a Flow Simpler to set up for a self-contained task More setup, but handles genuinely multi-stage pipelines One process governs the whole task, sequential or hierarchical Each stage can use whichever process fits it best Less explicit control over what happens bet...
2. Explain the internal working of CrewAI's memory system when memory=True is set?
flowchart LR A[Crew Created with memory=True] --> B[Default ShortTermMemory Instance] A --> C[Default LongTermMemory Instance] A --> D[Default EntityMemory Instance] B --> E[Shared Embedder Config Applied] D --> E E --> F[ChromaDB Vector Storage Backend] When a Crew is instantiated with memory=Tr...
3. Explain the lifecycle of state persistence in a Flow using the @persist decorator?
flowchart LR A[Flow Starts] --> B[Unique UUID Assigned] B --> C[State Updated as Methods Execute] C --> D[@persist Writes State to Backing Store] D --> E{Interrupted?} E -->|Yes| F[State Reloaded from Store] F --> C E -->|No| G[Flow Completes] Initialization : a Flow instance is created and autom...