AI Solution Architecture

Docs

View source

Bản Đồ Repository

Dùng atlas này khi chọn thư viện hoặc giải thích 17 repository khớp vào kiến trúc AI hoàn chỉnh như thế nào.

Vị Trí Ở Cấp Hệ Thống

flowchart TB subgraph App[AI app và agent architecture] OA[OpenAI Agents Python] LC[LangChain] AG[AutoGen] LI[LlamaIndex] end subgraph Serving[Model serving và inference] HF[Transformers] VLLM[vLLM] LCPP[llama.cpp] end subgraph Train[Training và adaptation] PEFT[PEFT] DS[DeepSpeed] end subgraph RAG[RAG và vector data] QD[Qdrant] CH[Chroma] end subgraph Ops[Observability và LLMOps] LF[Langfuse] PX[Phoenix] MF[MLflow] TL[TruLens] end subgraph Platform[Tools và platform] MCP[MCP Servers] OW[Open WebUI] end App --> Serving App --> RAG Train --> Serving App --> Ops Serving --> Ops RAG --> Ops Platform --> App Platform --> Ops

Ma Trận Repository

RepositoryVai trò chínhDùng khiCần chú ý
OpenAI Agents PythonAgent runtime với tool, handoff, guardrail, tracingBạn cần agent SDK tập trung với semantics rõ cho handoff/toolPermission tool, độ phủ guardrail, trace completeness
LangChainFramework composable cho app và workflowBạn cần chain, retriever, tool, model abstraction, LangGraph workflowOver-composition, state boundary không rõ, dependency sprawl
AutoGenMulti-agent framework với Core, AgentChat, extensionBạn cần collaboration theo vai trò hoặc asset AutoGen hiện hữuMaintenance mode, rủi ro code execution, governance extension
LlamaIndexFramework data-centric cho agent và retrievalKnowledge ingestion, index, query engine, RAG workflowChunking quality, index freshness, retrieval confidence
TransformersNền tảng model API và compatibilityThử nghiệm model, nạp tokenizer/model, pipeline, training utilityRuntime performance, artifact trust, remote code, memory use
vLLMRuntime high-throughput LLM servingToken throughput, concurrent serving, OpenAI-compatible endpointCapacity planning, scheduler behavior, model support, GPU memory
llama.cppRuntime local và edge inferenceCPU/edge/local serving, quantized model, binary portableQuantization quality, context limit, API exposure, model conversion
PEFTParameter-efficient fine-tuningDomain/task adaptation bằng adapter thay vì full fine-tuningAdapter compatibility, artifact không an toàn, evaluation trước promote
DeepSpeedTối ưu distributed trainingTraining job lớn, ZeRO, memory partitioning, checkpoint scaleĐộ tin cậy cluster, optimizer state, checkpoint recovery
QdrantVector database có search và ops model mạnhVector search bền vững, payload filtering, sharding, distributed operationWAL/segment recovery, filter correctness, tenant boundary
ChromaVector database thân thiện với developer và RAGLocal/server RAG development, workflow Python-firstChọn mode, persistence setting, distributed maturity
LangfuseLLM tracing, prompt, dataset, evaluation, feedbackProduct team cần nhìn thấy trace và scorePII retention, project isolation, ClickHouse/Postgres ops
PhoenixLLM observability và evaluationTrace analysis, dataset, annotation, evaluatorAuth, evaluator safety, trace volume, database isolation
MLflowExperiment tracking, model registry, artifactCần ML lifecycle lineage cho experiment và modelArtifact access, auth, registry policy, tracking server security
TruLensFeedback function và LLM app evaluationCần kiểm tra groundedness, relevance và app-level evalEval cost, hiệu chỉnh feedback, dùng metric sai
MCP ServersPattern tham chiếu cho tool serverCần tool contract giữa model/client và external systemLeast privilege, schema quality, sandboxing, audit log
Open WebUISelf-hosted AI workspace và provider gatewayCần UI, model routing, RAG, tool, admin controlAdmin boundary, tool execution, provider secret, CORS/auth

Hướng Dẫn Quyết Định

flowchart TB Start[Câu hỏi kiến trúc] --> AppQ{Cần app orchestration?} AppQ -->|Có| AgentChoice{Control model chính} AgentChoice -->|Agent SDK| OA AgentChoice -->|Workflow graph| LC AgentChoice -->|Multi-agent team| AG AgentChoice -->|RAG/query engine| LI Start --> RuntimeQ{Cần model runtime?} RuntimeQ -->|Compatibility| HF RuntimeQ -->|Throughput| VLLM RuntimeQ -->|Local/edge| LCPP Start --> DataQ{Cần knowledge retrieval?} DataQ -->|Vector DB vận hành mạnh| QD DataQ -->|RAG store thân thiện developer| CH Start --> EvalQ{Cần evidence loop?} EvalQ -->|LLM traces| LF EvalQ -->|Observability/evals| PX EvalQ -->|Experiment lineage| MF EvalQ -->|Feedback metrics| TL

Rủi Ro Production Cắt Ngang

Rủi roXuất hiện ởPhản ứng kiến trúc
Tool side effectAgent, AutoGen, MCP servers, Open WebUIDùng schema rõ, approval, audit log, sandboxing và least privilege.
Model artifact trustTransformers, PEFT, llama.cpp, vLLMPin artifact, ưu tiên safe format, review remote code, theo dõi provenance.
Retrieval driftLlamaIndex, LangChain, Qdrant, ChromaVersion embedding, chunk, metadata và query config; evaluate retrieval riêng.
Trace và PII exposureLangfuse, Phoenix, TruLens, MLflowRedact input, định nghĩa retention, tách tenant, mã hóa secret.
Serving overloadvLLM, llama.cpp, Open WebUIThêm admission control, capacity metric, scaling policy, fallback routing.
Training không tái lậpPEFT, DeepSpeed, MLflowTrack dataset, seed, config, checkpoint, adapter, tokenizer và evaluation run.

Cách Dùng Atlas Trong Design Review

  1. Bắt đầu từ product workflow, không bắt đầu từ thư viện yêu thích.
  2. Gán từng requirement vào một layer.
  3. Dùng ma trận để xác định repository ứng viên.
  4. Kiểm tra deep dive docs để xem source tree, extension point và failure mode.
  5. Ghi rõ vì sao phương án bị loại.
  6. Định nghĩa bằng chứng cần có để xem lại quyết định trong tương lai.