rag-implementation
Pass
Audited by Gen Agent Trust Hub on May 10, 2026
Risk Level: SAFE
Full Analysis
- [SAFE]: The skill provides boilerplate code and architectural patterns for building RAG systems. It correctly identifies and mitigates indirect prompt injection risks by recommending the use of boundary markers (e.g., '---') and explicit system instructions to ground the AI's responses in the provided context.
- Ingestion points:
HTMLLoader(fetching content from URLs) andPDFLoader/CodeLoader(reading local files). - Boundary markers: The
build_rag_promptfunction implements clear context delimiters and instructions to ignore external commands. - Capability inventory: The skill utilizes file system reads (
pathlib), persistent vector storage (chromadb), and database operations (psycopg2). - Sanitization: Includes basic whitespace normalization (
_clean) to prepare text for embedding. - [EXTERNAL_DOWNLOADS]: The skill demonstrates how to fetch remote documents using the
requestslibrary and interact with well-known AI services (OpenAI, Anthropic, Cohere) for generating embeddings and model responses, which is essential for RAG functionality. - [COMMAND_EXECUTION]: The provided Python examples use standard libraries for indexing and searching document corpora, including the use of
psycopg2for interacting with Postgres andchromadbfor local vector storage, which are appropriate for the skill's purpose.
Audit Metadata