Academy › Projects › Common foundation: set up once, use in every project
Common foundation: set up once, use in every project
Tools to install: Python 3.11+, VS Code, Git + GitHub, Docker Desktop, an Azure free account (or OpenAI/Anthropic API keys), and Node.js (for front-ends).
Standard project structure:
project/
app/ # API (FastAPI)
core/ # prompts, chains, agents
guardrails/ # input/output checks
evals/ # test datasets + scoring
infra/ # Dockerfile, Bicep/Terraform
.github/workflows/ci.yml
README.md # architecture diagram + how to run
Baseline stack: FastAPI · LangChain/LangGraph · Azure OpenAI (or any LLM) · Azure AI Search / Qdrant / pgvector · Langfuse or Azure App Insights for tracing · Docker · GitHub Actions · Azure Container Apps.
The 7 production pillars (apply to every project):
- Security: secrets in Key Vault or .env (never in Git), Managed Identity, private endpoints.
- Guardrails: input validation, prompt-injection detection, PII masking, output moderation, grounding checks.
- Evals: a golden dataset (30–100 Q&A pairs) and automated scoring (faithfulness, relevance, correctness) in CI.
- Observability: trace every LLM call (prompt, tokens, latency, cost, user id).
- Cost control: caching, model routing (small model first), token limits, budgets/alerts.
- Reliability: retries with backoff, timeouts, fallback model, rate limiting.
- Governance: audit log, data retention policy, model card, human-in-the-loop for risky actions.