Design Hebbia Chat for SEC Filings
Design Hebbia Chat for SEC Filings
Design a chat interface, Hebbia Chat, that allows users to ask questions about SEC filings and receive answers that are grounded in the source documents and include citations.
The system must be fast, durable, and scalable. Internally, it operates using a multi-agent workflow comprising at least the following agents:
- Orchestrator agent: Determines the sequence of subagent calls and signals when the workflow is complete.
- Retrieval agent: Searches the SEC filing corpus to find relevant evidence and provides citations.
- Output agent: Generates the final user-facing answer based on the retrieved evidence and intermediate agent results.
Functional Requirements
- Users can submit chat messages with questions about SEC filings.
- The backend must display loading/progress states to the user before and after each agent call.
- Text generated by the output agent must be streamed to the frontend as it is produced.
- Users have the ability to cancel an in-progress message.
- A finite token budget per user or workspace within a defined time window must be enforced, requiring usage tracking.
Design the complete end-to-end system, covering frontend↔backend communication, agent orchestration, persistence, cancellation, streaming, token budget enforcement, retrieval over filings, scalability, and failure handling.
Consider: What unit of work makes these five requirements tractable?
AI interview prep
Core dilemma
Balancing the complexity of a multi-agent LLM workflow with strict real-time user experience requirements (streaming, cancellation, progress indication) and resource constraints (token budgets).
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Design Hebbia Chat for SEC Filings
Design Hebbia Chat for SEC Filings
Design a chat interface, Hebbia Chat, that allows users to ask questions about SEC filings and receive answers that are grounded in the source documents and include citations.
The system must be fast, durable, and scalable. Internally, it operates using a multi-agent workflow comprising at least the following agents:
- Orchestrator agent: Determines the sequence of subagent calls and signals when the workflow is complete.
- Retrieval agent: Searches the SEC filing corpus to find relevant evidence and provides citations.
- Output agent: Generates the final user-facing answer based on the retrieved evidence and intermediate agent results.
Functional Requirements
- Users can submit chat messages with questions about SEC filings.
- The backend must display loading/progress states to the user before and after each agent call.
- Text generated by the output agent must be streamed to the frontend as it is produced.
- Users have the ability to cancel an in-progress message.
- A finite token budget per user or workspace within a defined time window must be enforced, requiring usage tracking.
Design the complete end-to-end system, covering frontend↔backend communication, agent orchestration, persistence, cancellation, streaming, token budget enforcement, retrieval over filings, scalability, and failure handling.
Consider: What unit of work makes these five requirements tractable?