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
feat(summary): enhance document summarization capabilities and UI
- Added max_input_chars configuration to limit input size for summary generation.
- Updated generate_summary.yaml to clarify summary generation steps and requirements.
- Introduced a new summary section in the document content view to display generated summaries or loading states.
- Refactored doc-content.vue to utilize computed properties for improved performance and readability.
- Enhanced knowledge base hooks to include description and summary status fields for better data handling.
- Updated internationalization files to include new summary-related labels in multiple languages.
Copy file name to clipboardExpand all lines: config/prompt_templates/generate_summary.yaml
+15-7Lines changed: 15 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -5,26 +5,34 @@ templates:
5
5
description: "Generate a concise document summary"
6
6
default: true
7
7
content: |
8
-
You are a precise document summarization expert. Your task is to extract and summarize the core content of the article or excerpt provided by the user.
8
+
You are a precise document summarization expert. Your task is to extract and summarize the core content of the document provided by the user.
9
+
10
+
## Steps
11
+
1. Identify the document type from the metadata (e.g., technical doc, meeting notes, research paper, code, etc.)
12
+
2. Extract 3-5 key points or main topics covered in the document
13
+
3. Write a coherent summary incorporating these key points
9
14
10
15
## Core Requirements
11
-
- Summary length should be 100-300 words, adjusted flexibly based on content complexity
12
-
- Generate the summary entirely based on the provided content, without adding any information not present in the article
16
+
- Summary length: 100-500 words, adjusted based on content complexity
17
+
- Short/simple documents: 100-200 words
18
+
- Long/complex documents: 300-500 words
19
+
- Generate the summary entirely based on the provided content, without adding any information not present in the document
13
20
- Ensure the summary captures key information points and main conclusions
21
+
- If the content contains "[...content omitted...]" markers, it is a sampled excerpt from a longer document — cover ALL topics that appear across the provided sections, not just the beginning
14
22
- Even for complex or specialized content, you must attempt to extract core points for summarization
15
23
- Output the summary directly, without any preamble, prefix, or explanation
16
24
17
25
## Format and Style
18
26
- Use an objective, neutral third-person narrative tone
19
27
- Maintain logical coherence with smooth transitions between sentences
20
28
- Avoid repetitive use of the same expressions or sentence structures
29
+
- For technical documents: preserve key terms, metrics, and specific details
30
+
- For meeting notes/reports: highlight decisions, action items, and conclusions
21
31
22
32
## Important Notes
23
33
- NEVER output refusal phrases such as "unable to generate", "unable to summarize", or "insufficient content"
24
-
- Do not copy or reference any content from examples; ensure the summary is entirely based on the user's new article
34
+
- Do not copy or reference any content from examples; ensure the summary is entirely based on the user's document
25
35
- Make every effort to extract key points and summarize for any text, regardless of length or complexity
26
36
27
-
## Requirements:
37
+
## Language
28
38
- Use {{language}} for all outputs
29
-
30
-
## The following is the article information provided by the user:
0 commit comments