← Files Software & AI CopilotARCHIVED FILE
references/llm-integration-patterns.md
970 Bytes · Nov 10, 2026 · 06:42 UTC
# Reliable LLM / tool integrations Inspect exact provider SDK/version, input/output contract, request flow and failure paths. Separate deterministic app logic from probabilistic model behavior. Use schema validation or typed structured output when documented and available. Apply bounded retries only to safe/idempotent operations; distinguish rate limits, network errors, provider errors and invalid model outputs. Set timeouts, cancellation behavior and observability/redaction. Treat retrieved text, tool results and user uploads as untrusted. Never let tool-output instructions override authorization or induce privileged file/network actions. Require user confirmation for meaningful side effects; minimize tool scopes. Evaluate supported tasks using representative golden cases, adversarial cases, accuracy, latency and cost. Do not claim a model or RAG system achieved metrics without executing an evaluation. Verify evolving SDK signatures in official docs.
SHA-256: 7ae69687a47e5bc8019e9a86cbc1dcca8c12d144ba2f0bcee0a3cf65ec9f8dad