AGIMA has developed a secure internal gateway architecture to manage interactions between employees and LLMs. The system uses reversible pseudonymization, replacing sensitive entities like names or phone numbers with typed tokens before sending requests to external models.
The gateway maintains a request-scoped mapping of entities, which is stored in a secure, encrypted state for two hours. This mapping is limited to 500 tokens per session and operates in an insert-only mode to prevent data overwriting. Access to reveal original values is strictly audited and restricted.
The architecture separates detection, entity resolution, policy enforcement, and rehydration. A directory containing hundreds of employees and legal entities helps the system identify objects across different grammatical cases and transliterations, ensuring the model maintains context without accessing raw identifiers.
The system implements a four-outcome policy engine to handle data exposure: masking, partial disclosure, full disclosure, or blocking. This approach ensures that search functionality remains operational while preventing unauthorized data leakage, in compliance with Russian data protection laws like 152-FZ.
To ensure security, the gateway validates responses across various formats, including JSON, tool calls, and streaming outputs. The company uses a testing framework that includes red teaming and canary deployments to monitor for false positives and ensure the integrity of the entity-mapping process.






