LLM Prompt Injection Can Never Be Fully Prevented

Prompt injection with our current LLM architecture will never be completely solved because it is not a technical flaw. It is a consequence of how language influences behavior.

Humans can be persuaded by propaganda, misleading headlines, emotional appeals, and false authority because our brains make judgments by interpreting patterns, context, and signals of credibility. We don’t verify every claim from first principles. Instead, we rely on shortcuts: whether something sounds familiar, whether it is repeated often, whether it comes from someone who appears confident, and if it fits what we already believe. These shortcuts are a necessity to operate in a world without perfect truth, but the process is prone to manipulation.

LLMs operate differently from human brains, but the problem is similar. They also “evaluate” information based on patterns, context, apparent relevance, and the relationship between one piece of language and the next.

The problem? Neither humans nor LLMs possess a perfect answer to the ultimate question: “who or what should I trust?”

This makes prompt injection more than a question of following the correct instruction. Before a system can decide which instruction to follow, it must determine which source is legitimate and which information is true. That judgment is itself vulnerable to manipulation. If false information successfully changes the system’s understanding of the situation, it can also change how the system evaluates everything that follows. In that sense, the core problem is not simply controlling what an LLM does, but establishing a reliable foundation for deciding what deserves to control it.

LLMs are designed to interpret language and allow one piece of information to influence the next. Their responses emerge through a chain of connected judgments, where each conclusion shapes what comes afterward. If an input can alter one of those judgments, it can potentially redirect the entire result. The more capable and responsive the model is, the more ways there may be for language to influence its reasoning.


It helps me if you share this post
https://rose.dev/blog/2026/08/26/llm-prompt-injection-can-never-be-fully-prevented/

Published 2026-08-26 11:46:12

AI Music Generation: MusicGen

Researchers have recently released a new paper and subsequent model, “Simple and Controllable Music Generation”, where they highlight it “is comprised of a single-stage transformer LM together with efficient token interleaving patterns, which eliminates the need for cascading several models”. What this essentially means in practice is the music generation can now be completed in less steps, and is getting more efficient as we make progress on various different types of models.

I expect AI to hit every industry in an increasingly rapid pace as more and more research becomes available and progress starts leapfrogging based on other models. MUSICGEN was trained with about 20K hours of unlicensed music, and the results are impressive.

Here are some interesting generations I thought sounded nice. As more models from massively trained datasets hit the public, we will see more community efforts and models as well just like with art.

Medium Model

I used the less performant medium model (1.5B parameters and approx 3.7 GB) to demonstrate how even on relatively poor hardware you could achieve reasonable results. Here is some lofi generated from the medium model.

Large Model

A step up is the 6.5 GB model. This produce slightly better sounding results.

What is that melody?

There is also a ‘Melody’ model that is a refined 1.5B parameter version.

Limitations

There are a few limitations on this model, namely the lack of vocals.

Limitations:

  • The model is not able to generate realistic vocals.
  • The model has been trained with English descriptions and will not perform as well in other languages.
  • The model does not perform equally well for all music styles and cultures.
  • The model sometimes generates end of songs, collapsing to silence.

However, future models and efforts will remedy these points. It’s only a matter of time before a trained vocal model is released with how fast machine learning advancements are accelerating.


It helps me if you share this post
https://rose.dev/blog/2023/06/10/ai-music-generation-musicgen/

Published 2023-06-10 18:36:40

AI

AI will help developer efficiency, not replace it.

One of the most significant use cases I’ve found for AI in my development work is its ability to automate repetitive tasks, such as using a bunch of similarly named, grouped variables. I recently was creating a ‘Human’ class, and needed all body parts for variables. That was suggested and picked up almost immediately by Copilot after a couple lines, and the whole class was done in mere seconds vs a few minutes. This adds up and means that I can focus on other creative tasks, such as developing new features, creating new UI ideas or focusing on user feedback. The result is increased productivity and faster software development.

I imagine a future where one can describe the architecture of my Android app in as much detail as possible and then go in and clean up the resulting code manually to a specific vision. Developers will be fast tracked to a more active management role.


It helps me if you share this post
https://rose.dev/blog/2023/05/17/should-you-as-a-developer-be-scared-of-ai/

Published 2023-05-17 01:05:41

How to create a simple voice-activated assistant in C#.

This is really old. I will release another tutorial updating this eventually. Follow my blog to get an update when that happens. Thanks!

While this sounds advanced (and it can be), it’s not that hard to set up a very basic setup where a custom application runs in the background in C# by using the built in speech recognition libraries in Windows 10.

Taking this idea further, I personally have a “Jarvis” that runs on my computer, automating basically all of my common actions, including launching games, music, sleeping my computer, adjusting the volume, minimizing windows, controlling the lights, and (best of all), sending emails and messages. I recommend using an external API for speech recognition if you’re serious about building something similar, as Microsoft’s sucks. You can build your own, or attempt to use something like Google’s API.

Anyway, here’s some simple C# code that should get some ideas flowing.

https://gist.github.com/GMR516/7f1ff8ab35f06ab319e1620fed6b976c


It helps me if you share this post
https://rose.dev/blog/2019/05/22/how-to-create-a-simple-voice-activated-assistant-in-c/

Published 2019-05-22 18:10:00