Salesforce's Agentforce team tackled language drift in multilingual AI workflows by building a deterministic localization layer rather than relying on LLMs to self-select languages. The core insight was that even with approved language lists, probabilistic models could still generate responses in the wrong language. The solution centers on a shared Localization Context established once by the Planner and consumed across all distributed components — planners, retrieval systems, actions, and response generators. Language detection uses Lingua, a Rust-based library achieving ~3–4ms p95 latency, avoiding costly LLM inference calls. The system now handles over 600,000 daily language detections across 34 fully supported languages, with mid-conversation language switching handled by treating Localization Context as live shared state rather than static configuration.
Nguồn: https://engineering.salesforce.com/how-agentforce-prevents-language-drift-in-600k-daily-multilingual-ai-workflows. 8sync News chỉ tóm tắt và dẫn link; bản quyền nội dung thuộc tác giả và nguồn gốc.
Thay vì nhúng mô hình dữ liệu vào components.schemas của tài liệu OpenAPI, bài viết đề xuất sử dụng các tệp JSON Schema độc lập với $id riêng trong thư mục schema/. Những schema này có thể tái sử dụng cho nhiều hệ thống (validation, generate code, docs, data warehouse) mà không phụ thuộc vào OpenAPI. OpenAPI overlays giúp điều chỉnh schema gốc cho mục đích cụ thể (như dịch description sang tiếng Đức) mà không thay đổi cấu trúc cốt lõi.
OpenAPI Overlays allow a single canonical API description to be presented in multiple languages without forking the contract. Using a Products API as a teaching example, the author demonstrates how locale-specific overlay files use JSONPath targeting to replace human-readable fields (summaries, descriptions, error messages) with translated text. Four language overlays (German, French, Italian, Dutch) each extend the same base OpenAPI document, keeping one source of truth while producing localized outputs on demand. The post also covers folder organization strategy and explains why overlays are preferable to copying and maintaining multiple spec files.