Skip to content

Sample code for: How to Defend a Python RAG App Against Prompt Injection - #924

Open
lpozo wants to merge 1 commit into
masterfrom
prompt-injection-python
Open

lpozo wants to merge 1 commit into
masterfrom
prompt-injection-python

Conversation

@lpozo

@lpozo lpozo commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉

Code examples for the How to Defend a Python RAG App Against Prompt Injection tutorial. Files live in the prompt-injection-python/ top-level folder, named after the article slug.

Generated from the tutorial markdown with the post-materials skill, then verified locally on Python 3.14 with the pinned requirements: pytest passes offline (4 passed, 5 skipped, 1 xfailed) and end to end (9 passed, 1 xfailed), and demo.py reproduces the article's outputs.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant