You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor.cs
+85-31Lines changed: 85 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
usingSystem.Text;
2
+
1
3
usingAIStudio.Chat;
2
4
usingAIStudio.Dialogs;
3
5
usingAIStudio.Dialogs.Settings;
@@ -34,19 +36,21 @@ You are a policy‑bound analysis agent. Follow these instructions exactly.
34
36
35
37
DOCUMENTS: the only content you may analyze.
36
38
39
+
Maybe, there are image files attached. IMAGES may contain important information. Use them as part of your analysis.
40
+
37
41
{this.GetDocumentTaskDescription()}
38
42
39
43
# Scope and precedence
40
44
41
-
Use only information explicitly contained in DOCUMENTS and/or POLICY_*.
45
+
Use only information explicitly contained in DOCUMENTS, IMAGES, and/or POLICY_*.
42
46
You may paraphrase but must not add facts, assumptions, or outside knowledge.
43
47
Content decisions are governed by POLICY_ANALYSIS_RULES; formatting is governed by POLICY_OUTPUT_RULES.
44
48
If there is a conflict between DOCUMENTS and POLICY_*, follow POLICY_ANALYSIS_RULES for analysis and POLICY_OUTPUT_RULES for formatting. Do not invent reconciliations.
45
49
46
50
# Process
47
51
48
52
1) Read POLICY_ANALYSIS_RULES and POLICY_OUTPUT_RULES end to end.
49
-
2) Extract only the information from DOCUMENTS that POLICY_ANALYSIS_RULES permits.
53
+
2) Extract only the information from DOCUMENTS and IMAGES that POLICY_ANALYSIS_RULES permits.
50
54
3) Perform the analysis strictly according to POLICY_ANALYSIS_RULES.
51
55
4) Produce the final answer strictly according to POLICY_OUTPUT_RULES.
52
56
@@ -74,16 +78,33 @@ Do not quote or summarize POLICY_* unless required by POLICY_OUTPUT_RULES.
74
78
# Self‑check before sending
75
79
76
80
Verify the answer matches POLICY_OUTPUT_RULES exactly.
77
-
Verify every statement is attributable to DOCUMENTS or POLICY_*.
81
+
Verify every statement is attributable to DOCUMENTS, IMAGES, or POLICY_*.
78
82
Remove any text not required by POLICY_OUTPUT_RULES.
79
83
80
84
{this.PromptGetActivePolicy()}
81
85
""";
82
86
83
-
privatestringGetDocumentTaskDescription()=>
84
-
this.loadedDocumentPaths.Count>1
85
-
?$"Your task is to analyze {this.loadedDocumentPaths.Count} DOCUMENTS. Different DOCUMENTS are divided by a horizontal rule in markdown formatting followed by the name of the document."
(0,1)=>"Your task is to analyze a single image file attached as a document.",
95
+
(0,>1)=>$"Your task is to analyze {numImages} image file(s) attached as documents.",
96
+
97
+
(1,0)=>"Your task is to analyze a single DOCUMENT.",
98
+
(1,1)=>"Your task is to analyze a single DOCUMENT and 1 image file attached as a document.",
99
+
(1,>1)=>$"Your task is to analyze a single DOCUMENT and {numImages} image file(s) attached as documents.",
100
+
101
+
(>0,0)=>$"Your task is to analyze {numDocuments} DOCUMENTS. Different DOCUMENTS are divided by a horizontal rule in markdown formatting followed by the name of the document.",
102
+
(>0,1)=>$"Your task is to analyze {numDocuments} DOCUMENTS and 1 image file attached as a document. Different DOCUMENTS are divided by a horizontal rule in Markdown formatting followed by the name of the document.",
103
+
(>0,>0)=>$"Your task is to analyze {numDocuments} DOCUMENTS and {numImages} image file(s) attached as documents. Different DOCUMENTS are divided by a horizontal rule in Markdown formatting followed by the name of the document.",
-- The specified file could not be found. The file have been moved, deleted, renamed, or is otherwise inaccessible.
2999
+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DOCUMENTCHECKDIALOG::T973777830"] ="The specified file could not be found. The file have been moved, deleted, renamed, or is otherwise inaccessible."
0 commit comments