January 2025 Summaries
4 posts from Ploomber
Filter
Month:
Year:
Post Summaries
Back to Blog
Widespread adoption of large language models (LLMs) necessitates robust protection against attacks like jailbreak, prompt injection, and indirect prompt injection. Jailbreak attacks target the LLM itself by overriding system prompts, while prompt injection attacks manipulate applications built on LLMs to perform unintended actions. Indirect prompt injection occurs when data sources, rather than direct user commands, are manipulated to influence the model's behavior. Meta's Prompt Guard is an open-source model designed to mitigate these vulnerabilities by classifying inputs as JAILBREAK, INJECTION, or BENIGN, but its strictness often results in false positives. Fine-tuning the model with application-specific data can improve its effectiveness, and it can be deployed using Ploomber Cloud for demonstration purposes. Despite its limitations, such as handling only 512 tokens at a time and requiring fine-tuning to reduce false positives, Prompt Guard represents a step towards securing LLM-powered systems against potential threats.
Jan 24, 2025
2,236 words in the original blog post.
Large Language Models (LLMs) have significantly enhanced enterprise productivity by automating various business operations, yet they pose risks related to data privacy, particularly when sensitive information is inadvertently shared with LLM APIs. To address these security concerns and comply with data protection laws like GDPR, Microsoft offers Presidio, a Python open-source framework designed to detect and anonymize sensitive data before it is exposed. The blog post details how to use Presidio for safeguarding data when integrating with APIs like OpenAI, emphasizing its core components: the analyzer and anonymizer, which work together to identify and mask personally identifiable information (PII). Various customization options for anonymization are discussed, including creating custom recognizers and using context-awareness to improve detection accuracy. The post also provides a proof-of-concept code for integrating Presidio with OpenAI, highlighting its application in anonymizing messages before they are processed by the API. For those seeking more robust, enterprise-grade solutions, the company offers advanced features such as user interface for rule definition, logging for auditing, and performance optimization to ensure efficient LLM application usage.
Jan 23, 2025
2,359 words in the original blog post.
Presidio, an open-source framework from Microsoft, is utilized to anonymize personally identifiable information (PII) data in conjunction with OpenAI's API, but its implementation requires meticulous configuration and compliance checks for each application using the API. To address these operational challenges, a reverse proxy employing FastAPI and Presidio is proposed as a more centralized solution. This proxy intercepts all OpenAI API calls, anonymizes sensitive data using Presidio, and forwards the sanitized requests to OpenAI, ensuring consistent privacy protection across an organization without requiring individual application changes. Although the setup efficiently sanitizes requests, it currently only supports PII removal for the /chat/completions/ endpoint, and using Presidio's default settings may not align with every company's data policy, leading to potential information loss. An enterprise-grade solution is suggested for enhanced customization and auditing capabilities, providing unique identifiers for redacted data and a user interface for PII rule customization. Deployment involves using Ploomber Cloud to facilitate the process, which ensures seamless integration with OpenAI's API while maintaining data privacy.
Jan 23, 2025
1,497 words in the original blog post.
This tutorial outlines the process of building a Flask application that allows users to upload PDFs to a database, conduct vector similarity searches, and use OpenAI to answer questions about the documents. The application leverages several technologies, including Celery for background processing, RabbitMQ as a message broker, and SQLite for storing parsed text and embeddings. Users authenticate via Flask endpoints, upload PDFs that are processed by running OCR, and engage in similarity searches to find relevant documents. The application is designed with a job queue to handle time-intensive operations efficiently and uses Supervisor to ensure the app components remain operational. Although the app is a proof of concept with limitations like non-persistent storage and simple OCR parsing, it demonstrates potential for scalable AI-driven document management. Deployment requires a Ploomber Cloud account, an OpenAI key, and involves setting up resources for running the application, which can be accessed via a URL once deployed.
Jan 14, 2025
1,478 words in the original blog post.