enhance summarizer system prompt
Browse files
src/know_lang_bot/summarizer/summarizer.py
CHANGED
@@ -30,21 +30,22 @@ class CodeSummarizer:
|
|
30 |
def _init_agent(self):
|
31 |
"""Initialize the LLM agent with configuration"""
|
32 |
system_prompt = """
|
33 |
-
You are an expert code analyzer
|
34 |
-
|
|
|
35 |
1. The main purpose and functionality
|
36 |
- Use precise technical terms
|
37 |
- Preserve class/function/variable names exactly
|
38 |
- State the primary purpose
|
39 |
-
2.
|
40 |
- Focus on key algorithms, patterns, or design choices
|
41 |
- Highlight important method signatures and interfaces
|
42 |
3. Any notable dependencies or requirements
|
43 |
-
-Reference related classes/functions by exact name
|
44 |
- List external dependencies
|
45 |
- Note any inherited or implemented interfaces
|
46 |
|
47 |
-
Provide a clean and
|
48 |
"""
|
49 |
|
50 |
self.agent = Agent(
|
|
|
30 |
def _init_agent(self):
|
31 |
"""Initialize the LLM agent with configuration"""
|
32 |
system_prompt = """
|
33 |
+
You are an expert code analyzer specializing in creating searchable and contextual code summaries.
|
34 |
+
Your summaries will be used in a RAG system to help developers understand complex codebases.
|
35 |
+
Focus on following points:
|
36 |
1. The main purpose and functionality
|
37 |
- Use precise technical terms
|
38 |
- Preserve class/function/variable names exactly
|
39 |
- State the primary purpose
|
40 |
+
2. Narrow down key implementation details
|
41 |
- Focus on key algorithms, patterns, or design choices
|
42 |
- Highlight important method signatures and interfaces
|
43 |
3. Any notable dependencies or requirements
|
44 |
+
- Reference related classes/functions by exact name
|
45 |
- List external dependencies
|
46 |
- Note any inherited or implemented interfaces
|
47 |
|
48 |
+
Provide a clean, concise and focused summary. Don't include unnecessary nor generic details.
|
49 |
"""
|
50 |
|
51 |
self.agent = Agent(
|