Skip to content

Commit a343064

Browse files
committed
🩹 docs(exploit-toolkit): Improvements from review
1 parent ed86e63 commit a343064

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

exploit-toolkit/exploit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def run_keyword_injection_dp_attack(rag_service_address):
510510
default='localhost:8003',
511511
help='RAG service address in format host:port')
512512
def run_general_label_flipping_dp_attack(rag_service_address):
513-
""" Runs a keyword injection data poisoning attack on the RAG service with precomputed poisoned embeddings"""
513+
""" Runs a general label flipping data poisoning attack on the RAG service with precomputed poisoned embeddings"""
514514
rag_service_url = f"http://{rag_service_address}"
515515
run_data_poisoning_attack(DATA_POISONING_ATTACK_EMBEDDINGS_DIR_LABEL_FLIPPING_GENERAL, rag_service_url)
516516

@@ -520,7 +520,7 @@ def run_general_label_flipping_dp_attack(rag_service_address):
520520
default='localhost:8003',
521521
help='RAG service address in format host:port')
522522
def run_targeted_label_flipping_dp_attack(rag_service_address):
523-
""" Runs a keyword injection data poisoning attack on the RAG service with precomputed poisoned embeddings"""
523+
""" Runs a targeted label flipping data poisoning attack on the RAG service with precomputed poisoned embeddings"""
524524
rag_service_url = f"http://{rag_service_address}"
525525
run_data_poisoning_attack(DATA_POISONING_ATTACK_EMBEDDINGS_DIR_LABEL_FLIPPING_TARGETED, rag_service_url)
526526

exploit-toolkit/exploits/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ Write arbitrary files [with specially crafted archives holding directory travers
4343

4444
## Data Poisoning
4545
Poison the RAG-services's spam prediction by injecting poisoned data into its knowledge base. This can be done by either:
46-
* [Injecting keyphrase into the KB](./data-poisoning/keyword-injection-attack/README.md) that causes spam entries containing the same keyphrase to be wrongly classified as non-spam.
47-
* [Injecting wrongly labelled data into the KB](./data-poisoning/label_flipping/README.md) that causes the RAG service to return wrong spam predictions for certain entries.
46+
* [Injecting keyphrase into the KB](./data-poisoning/keyword-injection-attack/DATA_POISONING_KEYWORD_INJECTION.md) that causes spam entries containing the same keyphrase to be wrongly classified as non-spam.
47+
* [Injecting wrongly labelled data into the KB](./data-poisoning/label-flipping-attack/DATA_POISONING_LABEL_FLIPPING.md) that causes the RAG service to return wrong spam predictions for certain entries.

src/rag-service/.env.langdock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ PREVENT_INGESTION_OF_DETECTED_POISONED_DATA="false" # true or false, only releva
1616
# embedding_similarity_entry_level (default)
1717
# embeddings_cluster_analysis
1818
# knn_label_consistency
19+
# ann_label_consistency
1920
# combined_detection_strategy
2021
DATA_POISONING_DETECTION_STRATEGY="embedding_similarity_entry_level"
2122

src/rag-service/.env.local

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ PREVENT_INGESTION_OF_DETECTED_POISONED_DATA="false" # true or false, only releva
1515
# embedding_similarity_entry_level (default)
1616
# embeddings_cluster_analysis
1717
# knn_label_consistency
18+
# ann_label_consistency
1819
# combined_detection_strategy
1920
DATA_POISONING_DETECTION_STRATEGY="embedding_similarity_entry_level"
2021

src/rag-service/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ A microservice for spam classification using Retrieval-Augmented Generation (RAG
2828

2929

3030
## Getting Started for running the RAG Service locally
31-
s
3231
When starting for the first time, you need to create a Virtual Environment, activate it and install the dependencies:
3332

3433
```bash

0 commit comments

Comments
 (0)