-
Notifications
You must be signed in to change notification settings - Fork 81
/
detection.puml
57 lines (49 loc) · 1.32 KB
/
detection.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
title Detect Injection
actor User
participant RebuffClient
participant RebuffAIAPI
participant LLM
participant VectorDB
User -> RebuffClient : user input
activate RebuffClient
RebuffClient -> RebuffAIAPI : detect_injection()
activate RebuffAIAPI
alt heuristic check
RebuffAIAPI --> RebuffAIAPI : stage 1
end
alt LLM check
RebuffAIAPI -> LLM : validate input
activate LLM
LLM --> RebuffAIAPI : validation result
deactivate LLM
end
alt vectordb check
RebuffAIAPI -> VectorDB : check input
activate VectorDB
VectorDB --> RebuffAIAPI : check result
deactivate VectorDB
end
RebuffAIAPI --> RebuffClient : response
deactivate RebuffAIAPI
RebuffClient --> User : response
deactivate RebuffClient
User -> RebuffClient : user input with canary word
activate RebuffClient
RebuffClient -> LLM : send prompt with canary word
activate LLM
LLM --> RebuffClient : response completion
deactivate LLM
RebuffClient --> User : detect_canary_word()
deactivate RebuffClient
User -> RebuffClient : user input (leak==true)
activate RebuffClient
RebuffClient -> RebuffAIAPI : report_leak()
activate RebuffAIAPI
RebuffAIAPI->VectorDB:log_leak()
activate VectorDB
VectorDB-->RebuffAIAPI:save confirmation
deactivate VectorDB
RebuffAIAPI --> RebuffClient : confirmation
deactivate RebuffAIAPI
RebuffClient --> User : confirmation
deactivate RebuffClient