Home / Companies / Fireworks AI / Blog / Post Details
Content Deep Dive

How we fixed prompt injection for all models on Fireworks

Blog post from Fireworks AI

Post Details
Company
Date Published
Author
-
Word Count
2,088
Company Posts That Month
8
Language
English
Hacker News Points
-
Post removed?
No
Summary

Fireworks Training introduces a feature called "safe_tokenization" to address the vulnerability of prompt injection in machine learning models, where user input can inadvertently be encoded as control tokens, altering system behavior. This issue arises from the tokenization process used by many open models, where user text and control tokens are not adequately separated, leading to potential exploitation. Safe_tokenization ensures that user content is tokenized separately from control tokens, maintaining the intended structure of prompts and preventing unauthorized modifications. This feature, available in the Fireworks Chat Completions API, enables the separation of user and system content at the token level, providing a defense against adversarial inputs without altering the user content itself. The implementation involves pre-processing the chat template and encoding user content to break any control-token bytes into subword pieces, ensuring the integrity of the system prompt. Fireworks plans to make this feature the default for new integrations, emphasizing its importance for maintaining product integrity in production environments.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 3 6,296 1,346 246 -2%
AI Coding Assistant 2 1,480 382 153 +18%
LLM 2 5,932 1,046 223 -2%
Reinforcement learning 1 104 49 23 -14%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.