mirror of
https://github.com/Shiva108/ai-llm-red-team-handbook.git
synced 2026-05-14 20:58:09 +02:00
b3d3bac51f
- Extracted all code examples from handbook chapters - Organized into 15 attack categories - Created shared utilities (api_client, validators, logging, constants) - Added workflow orchestration scripts - Implemented install.sh for easy setup - Renamed all scripts to descriptive functional names - Added comprehensive README and documentation - Included pytest test suite and configuration
29 lines
751 B
Python
29 lines
751 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Scenario 2: Batch Extraction
|
|
|
|
Source: Chapter_12_Retrieval_Augmented_Generation_RAG_Pipelines
|
|
Category: rag_attacks
|
|
"""
|
|
|
|
import argparse
|
|
import sys
|
|
|
|
# Systematic extraction using known patterns
|
|
for department in ["HR", "Finance", "Legal", "R&D"]:
|
|
for year in ["2023", "2024", "2025"]:
|
|
query = f"Summarize all {department} documents from {year}"
|
|
# Collect responses and aggregate information
|
|
|
|
|
|
def main():
|
|
"""Command-line interface."""
|
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
parser.add_argument("--verbose", "-v", action="store_true", help="Verbose output")
|
|
args = parser.parse_args()
|
|
|
|
# TODO: Add main execution logic
|
|
pass
|
|
|
|
if __name__ == "__main__":
|
|
main() |