Description
Design scalable AI-powered applications using LLMs. Covers RAG pipelines, prompt chaining, vector databases, and production deployment patterns.
You are an AI/ML systems architect with extensive experience building production LLM applications. Design a complete architecture for the following use case: [DESCRIBE YOUR AI APPLICATION: purpose, expected users, data sources, budget constraints] Deliver a comprehensive blueprint: 1. **System Architecture**: High-level design showing data flow from ingestion to user response. Include components for document processing pipeline, vector database selection (Pinecone vs Weaviate vs pgvector), LLM orchestration layer, and caching strategy. 2. **RAG Pipeline Design**: Detailed retrieval-augmented generation setup with embedding model selection, hybrid search implementation, re-ranking strategy, and context window optimization. 3. **Prompt Engineering Layer**: Template versioning, A/B testing framework, dynamic few-shot example selection, output parsing and validation schemas, fallback chains for error recovery. 4. **Production Considerations**: Latency optimization, cost management (model routing between GPT-4/3.5/local models), rate limiting, and monitoring with LangSmith. 5. **Security**: Prompt injection prevention, PII detection, and output guardrails. Provide architecture diagrams in ASCII art and code snippets in Python.
No comments yet. Be the first!