Skip to content

Key Features for Enhancing Security and Privacy

Trishal Kumar edited this page Jul 26, 2024 · 4 revisions

The Jugalbandi framework incorporates some core features to ensure the security and privacy of the users. Some of these features are already in place, while others are planned for future implementation. Here, we elaborate on each feature with examples to illustrate their practical application.

A.Redaction of Sensitive Data:

Sensitive Information Redaction: When a user inputs sensitive information such as an Aadhar number or phone number into the JB system, this data is immediately flagged as sensitive.Before any data is stored in the database or sent to an LLM for processing, the JB system automatically redacts sensitive information. This involves replacing the sensitive data with placeholders or masking it (e.g., replacing an Aadhar number like 1234-5678-9123 with X's or other characters).Only the redacted data is stored in the database or transmitted to the LLM servers. This ensures that sensitive information is not exposed even if the database is compromised or intercepted during transmission.When the LLM receives and processes the user's request, it does so without access to the actual sensitive information, working instead with the redacted data.

Regex Pattern Matching: The Jugalbandi framework employs "Regex" (short for Regular Expressions) to automatically identify and remove sensitive data or profanity from user inputs. Regex is a powerful tool used for pattern matching within text, enabling the JB system to efficiently scan and modify user messages before they are logged or processed. Regex patterns can be defined for various types of sensitive information, profanity etc. These patterns serve as templates for identifying specific sequences of characters that match the criteria for sensitive data or offensive language. When a user inputs a message, the JB system scans the text using the predefined Regex patterns. This allows the system to identify any parts of the message that match the patterns for sensitive data or profanity. Once a match is found, the system automatically redacts or removes the identified sensitive data or offensive language.The cleaned message, free from sensitive data and profanity, is then logged and processed by the JB system.

B. Encryption:

Encryption of Sensitive Keys and Media: JB encrypts sensitive keys, audio messages, and media messages, especially when migrating database instances to the cloud. When a user sends an audio message through the JB bot on WhatsApp, this message is encrypted before being stored or transmitted. Even if intercepted, the encrypted message remains unreadable without the decryption key, protecting the user's privacy.

Profanity Filter: If a user types a message containing offensive language, the profanity filter would detect and replace inappropriate words with asterisks or any other symbol, ensuring the conversation remains respectful and appropriate.

C. Controlled AI Model Access: JB ensures that OpenAI models only access prompts and data provided by the organization implementing the JB framework, keeping sensitive information like WhatsApp or OS configurations secure. When using JB to interact with an OpenAI model, the model only processes the user's questions and responses provided by the bot. It does not have access to the user's WhatsApp configuration or other underlying system details, preserving user confidentiality.

D. Strong Prompts and Prompt Engineering: JB uses strong prompts and prompt engineering techniques to control the output of large language models (LLMs) like GPT, Phi, and Llama, mitigating the risk of providing harmful or inappropriate responses. The aim is to ensure that the AI-generated responses remain accurate, relevant, and safe for users. One of the reasons JB prefers integrated LLMs over open-source models is the enhanced ability to manage and steer the output effectively, reducing the chances of "hallucination" where the model might generate incorrect or inappropriate information. Prompt engineering involves adding contextual information to the prompts to steer the conversation in a safe and useful direction. This helps prevent the AI from generating responses that could be misleading or harmful. If a user asks about a controversial topic, the prompt might include context that directs the AI to provide neutral, factual information and avoid taking a stance. By using well-engineered prompts, JB ensures that the AI models produce outputs that are in line with the intended use case and user expectations. This reduces the likelihood of the AI generating inappropriate, irrelevant, or harmful responses. For example, in a legal information bot, prompts are designed to ensure that the AI provides general legal information and advises users to consult a qualified lawyer for specific legal advice. We prefer integrating with proprietary LLMs like GPT, Phi, and Llama over open-source models. Proprietary models often come with additional safeguards, extensive training on diverse datasets, and better support for implementing prompt engineering techniques.

E. Data Residency Guarantees: All the data provided by Indian users reside within the boundaries of the country ensuring data sovereignty (in the case of deploying on Azure, the data usually resides within their South Indian data centers)

Clone this wiki locally