snowy-system

byfalco punch

create a multi agent system using langgraph, which gives answer related to uploaded document. add guardrails to it. basically a RAG pipeline

No preview

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document

System Requirements Document (SRD)

1. Introduction

This document outlines the requirements for developing a multi-agent system that utilizes LangGraph to provide answers related to uploaded documents. The system will incorporate guardrails to ensure secure and accurate responses, and it will leverage a Retrieval-Augmented Generation (RAG) pipeline for efficient document-based question answering. Additionally, the system will include a fallback response mechanism to handle cases where the document does not contain relevant information.

2. System Overview

The system is designed to allow users to upload documents and ask questions related to the content of those documents. It will use LangGraph to manage multiple agents that collaborate to process user queries. The system will implement guardrails to ensure the responses are accurate, secure, and contextually appropriate. The RAG pipeline will combine document retrieval with generative AI models to deliver precise answers. In cases where the document does not contain relevant information, the system will provide a fallback response stating, "The document does not contain relevant info."

Page 1 of 6

3. Functional Requirements as Story Points

  • As User I should be able to upload documents for processing.
  • As User I should be able to ask questions related to the uploaded documents.
  • As User I should receive accurate and contextually relevant answers to my questions.
  • As User I should receive a fallback response stating, "The document does not contain relevant info," when the document does not cover the question asked.
  • As Admin I should be able to configure guardrails to ensure secure and appropriate responses.
  • As Admin I should be able to monitor and manage the multi-agent system.
  • As System I should utilize LangGraph to coordinate multiple agents for efficient query processing.
  • As System I should implement a RAG pipeline to retrieve relevant document content and generate answers.
  • As System I should ensure responses are filtered through guardrails for security and accuracy.
  • As System I should provide a fallback response when the document does not contain relevant information.

4. User Personas

User

  • A general user who uploads documents and asks questions related to them.
  • Needs accurate and contextually relevant answers.
  • Requires clear fallback responses when the document does not contain relevant information.
Page 2 of 6

Admin

  • Responsible for configuring and managing the system.
  • Ensures guardrails are properly set up and monitors system performance.
  • Manages fallback response configurations.

System

  • The automated multi-agent system that processes user queries and generates responses.
  • Provides accurate answers and fallback responses when necessary.

5. Visuals Colors and Theme

The system will adopt a professional and clean theme:

  • Primary Color: Deep Blue (#003366) for headers and accents.
  • Secondary Color: Light Gray (#F5F5F5) for backgrounds.
  • Highlight Color: Emerald Green (#50C878) for buttons and actionable items.
  • Fallback Response Color: Crimson Red (#DC143C) for error or fallback messages.
  • Font: Sans-serif fonts like Open Sans or Roboto for readability.
  • Icons: Minimalistic and modern icons for user interface elements.
Page 3 of 6

6. Non-Functional Requirements

  • The system should respond to user queries within 2 seconds.
  • The system must handle up to 10,000 concurrent users.
  • The system should ensure data security and privacy for uploaded documents.
  • The system must be scalable to accommodate future growth.
  • The system should comply with relevant data protection regulations (e.g., GDPR, CCPA).
  • The fallback response mechanism must be reliable and clearly communicate when the document does not contain relevant information.

7. Tech Stack

Frontend

  • React for Web

Backend

  • Python
  • FastAPI

Database RDBMS

  • MySQL or MariaDB (using Alembic for migrations)

Database NoSQL

  • MongoDB
Page 4 of 6

AI Models

  • GPT 5.2 for user-friendly responses
  • Claude 4.5 Opas for academic or coding work
  • Gemini 3 Pro for friendly responses

AI Tools

  • Langchain
  • Litellm for LLM Routing

Local Orchestration

  • Docker
  • docker-compose

Server-side Orchestration

  • Kubernetes

8. Assumptions and Constraints

Assumptions

  • Users will upload documents in supported formats (e.g., PDF, DOCX, TXT).
  • The system will primarily serve English-language queries.
  • Guardrails will be configurable by the Admin to meet specific organizational needs.
  • Fallback responses will be sufficient to handle cases where the document does not contain relevant information.
Page 5 of 6

Constraints

  • The system must operate within the constraints of the chosen tech stack.
  • The system must comply with data protection regulations.
  • The system must ensure high availability and fault tolerance.
  • The fallback response mechanism must not interfere with the accuracy of other system functionalities.

9. Glossary

  • LangGraph: A framework for managing multi-agent systems.
  • Guardrails: Mechanisms to ensure secure and appropriate responses.
  • RAG Pipeline: Retrieval-Augmented Generation pipeline, combining document retrieval with generative AI models.
  • Multi-Agent System: A system where multiple agents collaborate to achieve a goal.
  • LLM: Large Language Model, used for generating responses.
  • Fallback Response: A predefined response stating "The document does not contain relevant info" when the document does not cover the user's query.
  • Docker: A tool for containerizing applications.
  • Kubernetes: A system for automating deployment, scaling, and management of containerized applications.

This document has been updated to incorporate the user's request for a fallback response mechanism stating "The document does not contain relevant info" when the document does not cover the user's query.

Page 6 of 6

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.