-
Notifications
You must be signed in to change notification settings - Fork 0
Pipeline Flow
Dev Doshi edited this page Jun 18, 2026
·
1 revision
Purpose:
- Prompt injection detection
- Unsafe content detection
- Malicious query filtering
Methods:
- Pattern Matching
- LLM Safety Validation
Determines whether a query belongs to the knowledge domain.
Output:
question_is_relevant: boolCombines:
- Semantic Search (ChromaDB)
- Keyword Search (BM25)
Merges rankings from:
- ChromaDB
- BM25
Produces:
retrieved_docsChecks context size.
Maximum:
max_context_tokens = 1000Uses:
tiktokenModel:
gpt-4o-miniRetries:
3 attemptsBackoff:
Exponential- PII Redaction
- Safety Validation
Self-RAG style confidence estimation.
Range:
0.0 - 1.0