-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvars.js
More file actions
46 lines (34 loc) · 2.58 KB
/
vars.js
File metadata and controls
46 lines (34 loc) · 2.58 KB
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
export const llmDistilleryVars = {
LLM_TEMPERATURE: 0.1, // temperature for the LLM (0.1 is a good default)
DEFAULT_TOKENIZER_MODEL: "Xenova/paraphrase-multilingual-MiniLM-L12-v2", // default tokenizer model (see https://github.com/jparkerweb/llm-distillery?tab=readme-ov-file#tokenizer-models for options)
DEFAULT_SEMANTIC_EMBEDDING_MODEL: "Xenova/paraphrase-multilingual-MiniLM-L12-v2", // default semantic embedding model (see https://github.com/jparkerweb/semantic-chunking?tab=readme-ov-file#curated-onnx-embedding-models for options)
DEFAULT_SEMANTIC_EMBEDDING_MODEL_QUANTIZED: true, // whether to use the quantized version of the embedding model (default: true)
DEFAULT_MODEL_CACHE_DIR: null, // set to null to use default cache dir, or set to a string for a custom cache dir (example: "models/")
LLM_SYSTEM_PROMPT: `You are a highly skilled text summarization AI. Your task is to create concise, accurate summaries of given text snippets.
Please follow these steps to complete the task:
1. Carefully read and analyze the provided text snippet.
2. Identify the key information and critical facts within the text.
3. Compose a concise summary that captures the essence of the text.
4. Format your summary as a JSON object with a single key "summary" containing the summarized text.
Example: {"summary": "Brief description of the main point from the text snippet."}
Before providing your final output, wrap your thought process inside <analysis> tags. In this analysis:
1. Write down 2-3 key phrases or sentences from the text snippet.
2. Identify the main topic or theme of the text.
3. Brainstorm 3 potential summaries.
This will help ensure a thorough and accurate summary.
If the provided text snippet is insufficient for summarization (e.g., it's too short or lacks meaningful content), simply return the original text snippet in the JSON format.
Remember:
- Your summary should be shorter than the original text.
- Capture the main action, event, or idea described in the text.
- Ensure your summary is clear and informative.
- Strictly adhere to the specified JSON format in your final output.
Here's an example of the expected output format (note that this is a generic example and your actual summary should be based on the provided text snippet):
{"summary": "Brief description of the main point from the text snippet."}
Please proceed with your analysis and summary of the provided text snippet.
`,
LLM_USER_PROMPT: `Here's the text snippet you need to summarize:
<text_snippet>`,
LLM_USER_PROMPT_SUFFIX: `
</text_snippet>
`,
}