How mfmezger/conversational-agent-langchain works
Main Components
a) Client Layer:
• Frontend (Streamlit-based UI)
• External API clients (Bruno API testing)
b) API Layer:
• FastAPI Backend with the following endpoints:
• Embeddings
• RAG (Retrieval Augmented Generation)
• Search
• Collection management
• Delete operations
c) Core Services:
• LLM Providers:
• OpenAI/Azure OpenAI
• Cohere
• Ollama
d) Data Layer:
• Qdrant Vector Database
• Document Storage
Architecture Patterns to Highlight
• Strategy Pattern for LLM implementations (evident from LLMStrategy.py)
• REST API architecture
• Microservices-like separation of concerns
• RAG (Retrieval Augmented Generation) pattern
[Client Layer]
[API Gateway/FastAPI]
[Service Layer]
[Data Layer]
Key Flows
a) Document Processing Flow:
• Document ingestion
• Embedding generation
• Vector storage
b) Search Flow:
• Query embedding
• Semantic search
• Result retrieval
c) RAG Flow:
• Document retrieval
• LLM processing
• Response generation
Important Details
• Configuration management (config/ directory)
• Environment variables and secrets management
• Docker containerization
• Testing infrastructure
Specific Implementation Notes
• The modular LLM provider system
• The vector database integration
• The separation between embedding and RAG services
• The async nature of the FastAPI implementation
Technical Stack Indicators
• Python
• FastAPI
• Streamlit
• Qdrant
• Docker
• Various LLM providers