realtimex-deeptutor 0.5.0.post1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. realtimex_deeptutor/__init__.py +67 -0
  2. realtimex_deeptutor-0.5.0.post1.dist-info/METADATA +1612 -0
  3. realtimex_deeptutor-0.5.0.post1.dist-info/RECORD +276 -0
  4. realtimex_deeptutor-0.5.0.post1.dist-info/WHEEL +5 -0
  5. realtimex_deeptutor-0.5.0.post1.dist-info/entry_points.txt +2 -0
  6. realtimex_deeptutor-0.5.0.post1.dist-info/licenses/LICENSE +661 -0
  7. realtimex_deeptutor-0.5.0.post1.dist-info/top_level.txt +2 -0
  8. src/__init__.py +40 -0
  9. src/agents/__init__.py +24 -0
  10. src/agents/base_agent.py +657 -0
  11. src/agents/chat/__init__.py +24 -0
  12. src/agents/chat/chat_agent.py +435 -0
  13. src/agents/chat/prompts/en/chat_agent.yaml +35 -0
  14. src/agents/chat/prompts/zh/chat_agent.yaml +35 -0
  15. src/agents/chat/session_manager.py +311 -0
  16. src/agents/co_writer/__init__.py +0 -0
  17. src/agents/co_writer/edit_agent.py +260 -0
  18. src/agents/co_writer/narrator_agent.py +423 -0
  19. src/agents/co_writer/prompts/en/edit_agent.yaml +113 -0
  20. src/agents/co_writer/prompts/en/narrator_agent.yaml +88 -0
  21. src/agents/co_writer/prompts/zh/edit_agent.yaml +113 -0
  22. src/agents/co_writer/prompts/zh/narrator_agent.yaml +88 -0
  23. src/agents/guide/__init__.py +16 -0
  24. src/agents/guide/agents/__init__.py +11 -0
  25. src/agents/guide/agents/chat_agent.py +104 -0
  26. src/agents/guide/agents/interactive_agent.py +223 -0
  27. src/agents/guide/agents/locate_agent.py +149 -0
  28. src/agents/guide/agents/summary_agent.py +150 -0
  29. src/agents/guide/guide_manager.py +500 -0
  30. src/agents/guide/prompts/en/chat_agent.yaml +41 -0
  31. src/agents/guide/prompts/en/interactive_agent.yaml +202 -0
  32. src/agents/guide/prompts/en/locate_agent.yaml +68 -0
  33. src/agents/guide/prompts/en/summary_agent.yaml +157 -0
  34. src/agents/guide/prompts/zh/chat_agent.yaml +41 -0
  35. src/agents/guide/prompts/zh/interactive_agent.yaml +626 -0
  36. src/agents/guide/prompts/zh/locate_agent.yaml +68 -0
  37. src/agents/guide/prompts/zh/summary_agent.yaml +157 -0
  38. src/agents/ideagen/__init__.py +12 -0
  39. src/agents/ideagen/idea_generation_workflow.py +426 -0
  40. src/agents/ideagen/material_organizer_agent.py +173 -0
  41. src/agents/ideagen/prompts/en/idea_generation.yaml +187 -0
  42. src/agents/ideagen/prompts/en/material_organizer.yaml +69 -0
  43. src/agents/ideagen/prompts/zh/idea_generation.yaml +187 -0
  44. src/agents/ideagen/prompts/zh/material_organizer.yaml +69 -0
  45. src/agents/question/__init__.py +24 -0
  46. src/agents/question/agents/__init__.py +18 -0
  47. src/agents/question/agents/generate_agent.py +381 -0
  48. src/agents/question/agents/relevance_analyzer.py +207 -0
  49. src/agents/question/agents/retrieve_agent.py +239 -0
  50. src/agents/question/coordinator.py +718 -0
  51. src/agents/question/example.py +109 -0
  52. src/agents/question/prompts/en/coordinator.yaml +75 -0
  53. src/agents/question/prompts/en/generate_agent.yaml +77 -0
  54. src/agents/question/prompts/en/relevance_analyzer.yaml +41 -0
  55. src/agents/question/prompts/en/retrieve_agent.yaml +32 -0
  56. src/agents/question/prompts/zh/coordinator.yaml +75 -0
  57. src/agents/question/prompts/zh/generate_agent.yaml +77 -0
  58. src/agents/question/prompts/zh/relevance_analyzer.yaml +39 -0
  59. src/agents/question/prompts/zh/retrieve_agent.yaml +30 -0
  60. src/agents/research/agents/__init__.py +23 -0
  61. src/agents/research/agents/decompose_agent.py +507 -0
  62. src/agents/research/agents/manager_agent.py +228 -0
  63. src/agents/research/agents/note_agent.py +180 -0
  64. src/agents/research/agents/rephrase_agent.py +263 -0
  65. src/agents/research/agents/reporting_agent.py +1333 -0
  66. src/agents/research/agents/research_agent.py +714 -0
  67. src/agents/research/data_structures.py +451 -0
  68. src/agents/research/main.py +188 -0
  69. src/agents/research/prompts/en/decompose_agent.yaml +89 -0
  70. src/agents/research/prompts/en/manager_agent.yaml +24 -0
  71. src/agents/research/prompts/en/note_agent.yaml +121 -0
  72. src/agents/research/prompts/en/rephrase_agent.yaml +58 -0
  73. src/agents/research/prompts/en/reporting_agent.yaml +380 -0
  74. src/agents/research/prompts/en/research_agent.yaml +173 -0
  75. src/agents/research/prompts/zh/decompose_agent.yaml +89 -0
  76. src/agents/research/prompts/zh/manager_agent.yaml +24 -0
  77. src/agents/research/prompts/zh/note_agent.yaml +121 -0
  78. src/agents/research/prompts/zh/rephrase_agent.yaml +58 -0
  79. src/agents/research/prompts/zh/reporting_agent.yaml +380 -0
  80. src/agents/research/prompts/zh/research_agent.yaml +173 -0
  81. src/agents/research/research_pipeline.py +1309 -0
  82. src/agents/research/utils/__init__.py +60 -0
  83. src/agents/research/utils/citation_manager.py +799 -0
  84. src/agents/research/utils/json_utils.py +98 -0
  85. src/agents/research/utils/token_tracker.py +297 -0
  86. src/agents/solve/__init__.py +80 -0
  87. src/agents/solve/analysis_loop/__init__.py +14 -0
  88. src/agents/solve/analysis_loop/investigate_agent.py +414 -0
  89. src/agents/solve/analysis_loop/note_agent.py +190 -0
  90. src/agents/solve/main_solver.py +862 -0
  91. src/agents/solve/memory/__init__.py +34 -0
  92. src/agents/solve/memory/citation_memory.py +353 -0
  93. src/agents/solve/memory/investigate_memory.py +226 -0
  94. src/agents/solve/memory/solve_memory.py +340 -0
  95. src/agents/solve/prompts/en/analysis_loop/investigate_agent.yaml +55 -0
  96. src/agents/solve/prompts/en/analysis_loop/note_agent.yaml +54 -0
  97. src/agents/solve/prompts/en/solve_loop/manager_agent.yaml +67 -0
  98. src/agents/solve/prompts/en/solve_loop/precision_answer_agent.yaml +62 -0
  99. src/agents/solve/prompts/en/solve_loop/response_agent.yaml +90 -0
  100. src/agents/solve/prompts/en/solve_loop/solve_agent.yaml +75 -0
  101. src/agents/solve/prompts/en/solve_loop/tool_agent.yaml +38 -0
  102. src/agents/solve/prompts/zh/analysis_loop/investigate_agent.yaml +53 -0
  103. src/agents/solve/prompts/zh/analysis_loop/note_agent.yaml +54 -0
  104. src/agents/solve/prompts/zh/solve_loop/manager_agent.yaml +66 -0
  105. src/agents/solve/prompts/zh/solve_loop/precision_answer_agent.yaml +62 -0
  106. src/agents/solve/prompts/zh/solve_loop/response_agent.yaml +90 -0
  107. src/agents/solve/prompts/zh/solve_loop/solve_agent.yaml +76 -0
  108. src/agents/solve/prompts/zh/solve_loop/tool_agent.yaml +41 -0
  109. src/agents/solve/solve_loop/__init__.py +22 -0
  110. src/agents/solve/solve_loop/citation_manager.py +74 -0
  111. src/agents/solve/solve_loop/manager_agent.py +274 -0
  112. src/agents/solve/solve_loop/precision_answer_agent.py +96 -0
  113. src/agents/solve/solve_loop/response_agent.py +301 -0
  114. src/agents/solve/solve_loop/solve_agent.py +325 -0
  115. src/agents/solve/solve_loop/tool_agent.py +470 -0
  116. src/agents/solve/utils/__init__.py +64 -0
  117. src/agents/solve/utils/config_validator.py +313 -0
  118. src/agents/solve/utils/display_manager.py +223 -0
  119. src/agents/solve/utils/error_handler.py +363 -0
  120. src/agents/solve/utils/json_utils.py +98 -0
  121. src/agents/solve/utils/performance_monitor.py +407 -0
  122. src/agents/solve/utils/token_tracker.py +541 -0
  123. src/api/__init__.py +0 -0
  124. src/api/main.py +240 -0
  125. src/api/routers/__init__.py +1 -0
  126. src/api/routers/agent_config.py +69 -0
  127. src/api/routers/chat.py +296 -0
  128. src/api/routers/co_writer.py +337 -0
  129. src/api/routers/config.py +627 -0
  130. src/api/routers/dashboard.py +18 -0
  131. src/api/routers/guide.py +337 -0
  132. src/api/routers/ideagen.py +436 -0
  133. src/api/routers/knowledge.py +821 -0
  134. src/api/routers/notebook.py +247 -0
  135. src/api/routers/question.py +537 -0
  136. src/api/routers/research.py +394 -0
  137. src/api/routers/settings.py +164 -0
  138. src/api/routers/solve.py +305 -0
  139. src/api/routers/system.py +252 -0
  140. src/api/run_server.py +61 -0
  141. src/api/utils/history.py +172 -0
  142. src/api/utils/log_interceptor.py +21 -0
  143. src/api/utils/notebook_manager.py +415 -0
  144. src/api/utils/progress_broadcaster.py +72 -0
  145. src/api/utils/task_id_manager.py +100 -0
  146. src/config/__init__.py +0 -0
  147. src/config/accessors.py +18 -0
  148. src/config/constants.py +34 -0
  149. src/config/defaults.py +18 -0
  150. src/config/schema.py +38 -0
  151. src/config/settings.py +50 -0
  152. src/core/errors.py +62 -0
  153. src/knowledge/__init__.py +23 -0
  154. src/knowledge/add_documents.py +606 -0
  155. src/knowledge/config.py +65 -0
  156. src/knowledge/example_add_documents.py +236 -0
  157. src/knowledge/extract_numbered_items.py +1039 -0
  158. src/knowledge/initializer.py +621 -0
  159. src/knowledge/kb.py +22 -0
  160. src/knowledge/manager.py +782 -0
  161. src/knowledge/progress_tracker.py +182 -0
  162. src/knowledge/start_kb.py +535 -0
  163. src/logging/__init__.py +103 -0
  164. src/logging/adapters/__init__.py +17 -0
  165. src/logging/adapters/lightrag.py +184 -0
  166. src/logging/adapters/llamaindex.py +141 -0
  167. src/logging/config.py +80 -0
  168. src/logging/handlers/__init__.py +20 -0
  169. src/logging/handlers/console.py +75 -0
  170. src/logging/handlers/file.py +201 -0
  171. src/logging/handlers/websocket.py +127 -0
  172. src/logging/logger.py +709 -0
  173. src/logging/stats/__init__.py +16 -0
  174. src/logging/stats/llm_stats.py +179 -0
  175. src/services/__init__.py +56 -0
  176. src/services/config/__init__.py +61 -0
  177. src/services/config/knowledge_base_config.py +210 -0
  178. src/services/config/loader.py +260 -0
  179. src/services/config/unified_config.py +603 -0
  180. src/services/embedding/__init__.py +45 -0
  181. src/services/embedding/adapters/__init__.py +22 -0
  182. src/services/embedding/adapters/base.py +106 -0
  183. src/services/embedding/adapters/cohere.py +127 -0
  184. src/services/embedding/adapters/jina.py +99 -0
  185. src/services/embedding/adapters/ollama.py +116 -0
  186. src/services/embedding/adapters/openai_compatible.py +96 -0
  187. src/services/embedding/client.py +159 -0
  188. src/services/embedding/config.py +156 -0
  189. src/services/embedding/provider.py +119 -0
  190. src/services/llm/__init__.py +152 -0
  191. src/services/llm/capabilities.py +313 -0
  192. src/services/llm/client.py +302 -0
  193. src/services/llm/cloud_provider.py +530 -0
  194. src/services/llm/config.py +200 -0
  195. src/services/llm/error_mapping.py +103 -0
  196. src/services/llm/exceptions.py +152 -0
  197. src/services/llm/factory.py +450 -0
  198. src/services/llm/local_provider.py +347 -0
  199. src/services/llm/providers/anthropic.py +95 -0
  200. src/services/llm/providers/base_provider.py +93 -0
  201. src/services/llm/providers/open_ai.py +83 -0
  202. src/services/llm/registry.py +71 -0
  203. src/services/llm/telemetry.py +40 -0
  204. src/services/llm/types.py +27 -0
  205. src/services/llm/utils.py +333 -0
  206. src/services/prompt/__init__.py +25 -0
  207. src/services/prompt/manager.py +206 -0
  208. src/services/rag/__init__.py +64 -0
  209. src/services/rag/components/__init__.py +29 -0
  210. src/services/rag/components/base.py +59 -0
  211. src/services/rag/components/chunkers/__init__.py +18 -0
  212. src/services/rag/components/chunkers/base.py +34 -0
  213. src/services/rag/components/chunkers/fixed.py +71 -0
  214. src/services/rag/components/chunkers/numbered_item.py +94 -0
  215. src/services/rag/components/chunkers/semantic.py +97 -0
  216. src/services/rag/components/embedders/__init__.py +14 -0
  217. src/services/rag/components/embedders/base.py +32 -0
  218. src/services/rag/components/embedders/openai.py +63 -0
  219. src/services/rag/components/indexers/__init__.py +18 -0
  220. src/services/rag/components/indexers/base.py +35 -0
  221. src/services/rag/components/indexers/graph.py +172 -0
  222. src/services/rag/components/indexers/lightrag.py +156 -0
  223. src/services/rag/components/indexers/vector.py +146 -0
  224. src/services/rag/components/parsers/__init__.py +18 -0
  225. src/services/rag/components/parsers/base.py +35 -0
  226. src/services/rag/components/parsers/markdown.py +52 -0
  227. src/services/rag/components/parsers/pdf.py +115 -0
  228. src/services/rag/components/parsers/text.py +86 -0
  229. src/services/rag/components/retrievers/__init__.py +18 -0
  230. src/services/rag/components/retrievers/base.py +34 -0
  231. src/services/rag/components/retrievers/dense.py +200 -0
  232. src/services/rag/components/retrievers/hybrid.py +164 -0
  233. src/services/rag/components/retrievers/lightrag.py +169 -0
  234. src/services/rag/components/routing.py +286 -0
  235. src/services/rag/factory.py +234 -0
  236. src/services/rag/pipeline.py +215 -0
  237. src/services/rag/pipelines/__init__.py +32 -0
  238. src/services/rag/pipelines/academic.py +44 -0
  239. src/services/rag/pipelines/lightrag.py +43 -0
  240. src/services/rag/pipelines/llamaindex.py +313 -0
  241. src/services/rag/pipelines/raganything.py +384 -0
  242. src/services/rag/service.py +244 -0
  243. src/services/rag/types.py +73 -0
  244. src/services/search/__init__.py +284 -0
  245. src/services/search/base.py +87 -0
  246. src/services/search/consolidation.py +398 -0
  247. src/services/search/providers/__init__.py +128 -0
  248. src/services/search/providers/baidu.py +188 -0
  249. src/services/search/providers/exa.py +194 -0
  250. src/services/search/providers/jina.py +161 -0
  251. src/services/search/providers/perplexity.py +153 -0
  252. src/services/search/providers/serper.py +209 -0
  253. src/services/search/providers/tavily.py +161 -0
  254. src/services/search/types.py +114 -0
  255. src/services/setup/__init__.py +34 -0
  256. src/services/setup/init.py +285 -0
  257. src/services/tts/__init__.py +16 -0
  258. src/services/tts/config.py +99 -0
  259. src/tools/__init__.py +91 -0
  260. src/tools/code_executor.py +536 -0
  261. src/tools/paper_search_tool.py +171 -0
  262. src/tools/query_item_tool.py +310 -0
  263. src/tools/question/__init__.py +15 -0
  264. src/tools/question/exam_mimic.py +616 -0
  265. src/tools/question/pdf_parser.py +211 -0
  266. src/tools/question/question_extractor.py +397 -0
  267. src/tools/rag_tool.py +173 -0
  268. src/tools/tex_chunker.py +339 -0
  269. src/tools/tex_downloader.py +253 -0
  270. src/tools/web_search.py +71 -0
  271. src/utils/config_manager.py +206 -0
  272. src/utils/document_validator.py +168 -0
  273. src/utils/error_rate_tracker.py +111 -0
  274. src/utils/error_utils.py +82 -0
  275. src/utils/json_parser.py +110 -0
  276. src/utils/network/circuit_breaker.py +79 -0
@@ -0,0 +1,173 @@
1
+ """
2
+ Material Organizer Agent - Extracts knowledge points from notebook records.
3
+ Uses unified PromptManager for prompt loading.
4
+ """
5
+
6
+ import json
7
+ from pathlib import Path
8
+ import sys
9
+ from typing import Any
10
+
11
+ # Add project root to path
12
+ _project_root = Path(__file__).parent.parent.parent.parent
13
+ if str(_project_root) not in sys.path:
14
+ sys.path.insert(0, str(_project_root))
15
+
16
+ from src.agents.base_agent import BaseAgent
17
+ from src.services.prompt import get_prompt_manager
18
+
19
+
20
+ class MaterialOrganizerAgent(BaseAgent):
21
+ """Material Organizer Agent - Extracts knowledge points"""
22
+
23
+ def __init__(
24
+ self,
25
+ language: str = "en",
26
+ api_key: str | None = None,
27
+ base_url: str | None = None,
28
+ model: str | None = None,
29
+ ):
30
+ super().__init__(
31
+ module_name="ideagen",
32
+ agent_name="material_organizer",
33
+ api_key=api_key,
34
+ base_url=base_url,
35
+ model=model,
36
+ language=language,
37
+ )
38
+ self._prompts = get_prompt_manager().load_prompts(
39
+ module_name="ideagen",
40
+ agent_name="material_organizer",
41
+ language=language,
42
+ )
43
+
44
+ async def process(
45
+ self, records: list[dict[str, Any]], user_thoughts: str | None = None
46
+ ) -> list[dict[str, Any]]:
47
+ """
48
+ Organize materials and extract knowledge points
49
+
50
+ Args:
51
+ records: Notebook record list
52
+ user_thoughts: Optional user thoughts
53
+
54
+ Returns:
55
+ Knowledge point list, each containing:
56
+ - knowledge_point: Knowledge point name
57
+ - description: Description of this knowledge point from system response
58
+ """
59
+ materials = []
60
+ for record in records:
61
+ materials.append(
62
+ {
63
+ "type": record.get("type", ""),
64
+ "title": record.get("title", ""),
65
+ "user_query": record.get("user_query", ""),
66
+ "output": record.get("output", ""),
67
+ }
68
+ )
69
+
70
+ materials_text = ""
71
+ for i, mat in enumerate(materials, 1):
72
+ materials_text += f"\n\n=== Record {i} ===\n"
73
+ materials_text += f"Type: {mat['type']}\n"
74
+ materials_text += f"Title: {mat['title']}\n"
75
+ materials_text += f"User Query: {mat['user_query']}\n"
76
+ materials_text += f"System Response: {mat['output']}\n"
77
+
78
+ user_thoughts_text = ""
79
+ if user_thoughts and user_thoughts.strip():
80
+ user_thoughts_text = f"\n\nUser Additional Thoughts:\n{user_thoughts}"
81
+
82
+ system_prompt = self._prompts.get("system", "")
83
+ user_template = self._prompts.get("user_template", "")
84
+ user_prompt = user_template.format(
85
+ materials_text=materials_text,
86
+ user_thoughts_text=user_thoughts_text,
87
+ )
88
+
89
+ self.logger.info(f"Processing {len(records)} records...")
90
+
91
+ response = await self.call_llm(
92
+ user_prompt=user_prompt,
93
+ system_prompt=system_prompt,
94
+ response_format={"type": "json_object"},
95
+ )
96
+
97
+ self.logger.debug(f"LLM response length: {len(response)} chars")
98
+
99
+ try:
100
+ result = json.loads(response)
101
+ knowledge_points = result.get("knowledge_points", [])
102
+ self.logger.info(f"Extracted {len(knowledge_points)} knowledge points")
103
+
104
+ validated_points = []
105
+ for point in knowledge_points:
106
+ if "knowledge_point" in point and "description" in point:
107
+ kp = str(point["knowledge_point"]).strip()
108
+ desc = str(point["description"]).strip()
109
+ if kp and desc and len(desc) >= 10:
110
+ validated_points.append({"knowledge_point": kp, "description": desc})
111
+
112
+ if not validated_points and records:
113
+ return await self._fallback_extract(records, user_thoughts)
114
+
115
+ self.logger.info(f"Validated {len(validated_points)} knowledge points")
116
+ return validated_points
117
+ except json.JSONDecodeError as e:
118
+ self.logger.error(f"JSON decode error: {e}")
119
+ self.logger.debug(f"Raw response: {response[:500]}...")
120
+ return await self._fallback_extract(records, user_thoughts)
121
+
122
+ async def _fallback_extract(
123
+ self, records: list[dict[str, Any]], user_thoughts: str | None = None
124
+ ) -> list[dict[str, Any]]:
125
+ """Fallback extraction method using more lenient strategy"""
126
+ materials_text = ""
127
+ for i, record in enumerate(records, 1):
128
+ materials_text += (
129
+ f"\nRecord {i}: {record.get('title', '')} - {record.get('user_query', '')[:100]}"
130
+ )
131
+
132
+ system_prompt = self._prompts.get("fallback_system", "")
133
+ user_template = self._prompts.get("fallback_user_template", "")
134
+ user_thoughts_str = f"User thoughts: {user_thoughts}" if user_thoughts else ""
135
+ user_prompt = user_template.format(
136
+ materials_text=materials_text,
137
+ user_thoughts=user_thoughts_str,
138
+ )
139
+
140
+ try:
141
+ response = await self.call_llm(
142
+ user_prompt=user_prompt,
143
+ system_prompt=system_prompt,
144
+ response_format={"type": "json_object"},
145
+ )
146
+ result = json.loads(response)
147
+ knowledge_points = result.get("knowledge_points", [])
148
+
149
+ validated_points = []
150
+ for point in knowledge_points:
151
+ if "knowledge_point" in point and "description" in point:
152
+ kp = str(point["knowledge_point"]).strip()
153
+ desc = str(point["description"]).strip()
154
+ if kp and desc:
155
+ validated_points.append({"knowledge_point": kp, "description": desc})
156
+
157
+ return (
158
+ validated_points
159
+ if validated_points
160
+ else [
161
+ {
162
+ "knowledge_point": "Comprehensive Knowledge Point",
163
+ "description": f"Comprehensive knowledge content based on {len(records)} records, containing multiple research directions and concepts.",
164
+ }
165
+ ]
166
+ )
167
+ except Exception:
168
+ return [
169
+ {
170
+ "knowledge_point": "Comprehensive Research Topic",
171
+ "description": f"Based on the selected {len(records)} notebook records, multiple research directions and knowledge points can be explored.",
172
+ }
173
+ ]
@@ -0,0 +1,187 @@
1
+ loose_filter_system: |
2
+ You are a research screening expert. Your task is to filter out clearly unsuitable knowledge points using relatively loose criteria.
3
+
4
+ Filtering Principles (Loose Criteria):
5
+ - Only filter out clearly unsuitable content, keep the criteria loose
6
+ - Knowledge points that are too superficial and have no research value (e.g., basic facts like "1+1=2")
7
+ - Descriptions that are completely blank or only a few characters, impossible to understand
8
+ - Content that is clearly erroneous or irrelevant
9
+
10
+ Retention Principles:
11
+ - As long as a knowledge point has certain depth or research potential, it should be retained
12
+ - Even if a knowledge point seems simple, retain it if it can be extended for research
13
+ - Knowledge points with imperfect but understandable descriptions should be retained
14
+ - Knowledge points with innovation potential or application value should be retained
15
+
16
+ Important: Keep the criteria loose; it's better to retain more than to over-filter. Unless a knowledge point is clearly unsuitable, it should be retained.
17
+
18
+ Output Format (JSON):
19
+ {
20
+ "filtered_points": [
21
+ {
22
+ "knowledge_point": "Knowledge point name",
23
+ "description": "Description"
24
+ }
25
+ ]
26
+ }
27
+
28
+ loose_filter_user_template: |
29
+ Please filter the following knowledge points using loose criteria, only retaining those suitable for research:
30
+
31
+ {points_text}
32
+
33
+ Please output the filtered knowledge points in JSON format.
34
+
35
+ explore_ideas_system: |
36
+ You are a research idea generation expert, skilled at discovering innovative and valuable research directions from knowledge points. Your task is to generate at least 5 feasible research ideas based on the given knowledge point.
37
+
38
+ Generation Principles:
39
+ 1. Each research idea should be specific, clear, and feasible; avoid being too abstract or vague
40
+ 2. Ideas should be based on the knowledge point but can extend, expand, deepen, or explore from different angles
41
+ 3. Ideas should have research value and depth, such as theoretical exploration, method improvement, application innovation, etc.
42
+ 4. Encourage innovative thinking from multiple dimensions:
43
+ - Theoretical Deepening: Deeply explore the theoretical foundations of the knowledge point
44
+ - Method Improvement: Improve or innovate related methods
45
+ - Application Extension: Apply the knowledge point to new domains
46
+ - Problem Solving: Solve practical problems based on the knowledge point
47
+ - Cross-disciplinary Integration: Combine with other fields to generate new ideas
48
+ 5. Generate at least 5 ideas; if the knowledge point has potential, generate more (up to 10)
49
+
50
+ Idea Quality Requirements:
51
+ - Each idea should be a complete research direction that can be independently researched
52
+ - Ideas should be specific enough to start research, not too broad
53
+ - Ideas should be interesting and innovative, able to attract researchers
54
+ - Ideas should be feasible, not completely impossible to achieve
55
+
56
+ Output Format (JSON):
57
+ {
58
+ "research_ideas": [
59
+ "Research idea 1 (specific description)",
60
+ "Research idea 2 (specific description)",
61
+ ...
62
+ ]
63
+ }
64
+
65
+ Important: Must generate at least 5 ideas. If the knowledge point has potential, try to generate more creative ideas.
66
+
67
+ explore_ideas_user_template: |
68
+ Based on the following knowledge point, generate at least 5 feasible research ideas:
69
+
70
+ Knowledge Point: {knowledge_point}
71
+ Description: {description}
72
+
73
+ Please output research ideas in JSON format.
74
+
75
+ strict_filter_system: |
76
+ You are a strict research review expert with extensive research experience. Your task is to evaluate whether research ideas are suitable from a researcher's perspective, using strict but fair criteria.
77
+
78
+ Evaluation Dimensions (Strict Criteria):
79
+ 1. Research Value: Whether the idea has academic value, innovativeness, or practical value
80
+ 2. Research Depth: Whether the idea is deep enough to produce meaningful research outcomes
81
+ 3. Feasibility: Whether the idea can be achieved within reasonable bounds, not completely impossible
82
+ 4. Extension Potential: Whether the idea is suitable for further extension and in-depth research
83
+ 5. Specificity: Whether the idea is specific and clear, not too abstract or vague
84
+
85
+ Retention Criteria (Strict):
86
+ - The idea must have clear research value
87
+ - The idea must be specific enough to start research
88
+ - The idea must be feasible, not completely impossible
89
+ - The idea must have depth, capable of producing meaningful research outcomes
90
+ - The idea should be interesting and innovative
91
+
92
+ Elimination Criteria (Strict):
93
+ - The idea is too abstract or vague to start research
94
+ - The idea has no research value or innovativeness at all
95
+ - The idea is completely infeasible, beyond reasonable bounds
96
+ - The idea is too superficial to produce meaningful research outcomes
97
+ - The idea has too little relevance to the knowledge point
98
+
99
+ Requirements:
100
+ 1. Must eliminate at least 2 research ideas (if there are 5 or more in total)
101
+ 2. Must retain at least 1 research idea
102
+ 3. Only retain ideas that are truly excellent, suitable for extension, with both depth and feasibility
103
+ 4. Even if all ideas are good, eliminate the relatively weaker ones and keep the strongest
104
+
105
+ Output Format (JSON):
106
+ {
107
+ "kept_ideas": [
108
+ "Retained research idea 1",
109
+ "Retained research idea 2",
110
+ ...
111
+ ],
112
+ "rejected_ideas": [
113
+ "Eliminated research idea 1",
114
+ "Eliminated research idea 2",
115
+ ...
116
+ ],
117
+ "reasons": {
118
+ "Retained research idea 1": "Retention reason (explain why this idea is excellent)",
119
+ "Eliminated research idea 1": "Elimination reason (explain why this idea is not good enough)",
120
+ ...
121
+ }
122
+ }
123
+
124
+ Important: Evaluation should be strict but fair, ensuring that retained ideas are truly excellent research directions.
125
+
126
+ strict_filter_user_template: |
127
+ Based on the following knowledge point and research ideas, evaluate using strict criteria:
128
+
129
+ Knowledge Point: {knowledge_point}
130
+ Description: {description}
131
+
132
+ Research Ideas:
133
+ {ideas_text}
134
+
135
+ Please output the evaluation results in JSON format. Remember: must eliminate at least 2, retain at least 1.
136
+
137
+ generate_statement_system: |
138
+ You are a research statement generation expert, skilled at writing clear, professional, and compelling research idea statements. Your task is to generate high-quality markdown-formatted statements for knowledge points and research ideas.
139
+
140
+ Writing Requirements:
141
+ 1. First, concisely list the knowledge point, including its core content and review
142
+ 2. Then, list the retained research ideas point by point, with detailed descriptions for each
143
+ 3. For each research idea, explain:
144
+ - Why this research idea was retained (research value, innovativeness, feasibility, etc.)
145
+ - The research direction and possible research content of this idea
146
+ - The potential impact or application value of this idea
147
+
148
+ Format Requirements:
149
+ - Use clear Markdown formatting
150
+ - The knowledge point review should be concise but complete
151
+ - Each research idea should be described in detail so readers understand its value
152
+ - Retention reasons should be specific and persuasive
153
+
154
+ Output Format (Markdown):
155
+ ## Knowledge Point Name
156
+
157
+ **Knowledge Point Review:**
158
+ [Brief review of the knowledge point, explaining core content and key information]
159
+
160
+ **Research Ideas:**
161
+
162
+ ### 1. [Title of Research Idea 1]
163
+
164
+ [Detailed description of research idea 1, explaining research direction, possible research content, etc.]
165
+
166
+ **Retention Reason:** [Why this research idea was retained, explaining its research value, innovativeness, feasibility, etc.]
167
+
168
+ ### 2. [Title of Research Idea 2]
169
+
170
+ [Detailed description of research idea 2]
171
+
172
+ **Retention Reason:** [Retention reason]
173
+
174
+ ...
175
+
176
+ Important: The statement should be professional, clear, and compelling, allowing readers to understand the value and potential of each research idea.
177
+
178
+ generate_statement_user_template: |
179
+ Please generate a markdown-formatted statement for the following knowledge point and research ideas:
180
+
181
+ Knowledge Point: {knowledge_point}
182
+ Description: {description}
183
+
184
+ Retained Research Ideas:
185
+ {ideas_text}
186
+
187
+ Please generate a markdown-formatted statement.
@@ -0,0 +1,69 @@
1
+ system: |
2
+ You are a knowledge organization expert, skilled at identifying and extracting valuable knowledge points from learning records. Your task is to extract relatively independent knowledge points with research value from the notebook records provided by the user.
3
+
4
+ Core Tasks:
5
+ 1. Deeply analyze all input content (including the complete user queries and system responses)
6
+ 2. Identify relatively independent and in-depth knowledge points; each knowledge point should be a concept, theory, method, or topic that can be researched independently
7
+ 3. For each knowledge point, extract relevant core descriptions from system responses, ensuring descriptions are complete, accurate, and informative
8
+ 4. Pay attention to discovering implicit knowledge points, don't only focus on explicitly mentioned content
9
+
10
+ Extraction Principles:
11
+ - Knowledge points should have research value, such as theories, methods, applications, problems, etc.
12
+ - Knowledge points should be relatively independent and can be studied separately
13
+ - Descriptions should be based on actual content from system responses, but can be appropriately summarized and refined
14
+ - If one record contains multiple knowledge points, extract them separately
15
+ - If system response content is limited, combine user queries to understand the knowledge points
16
+ - Prioritize extracting knowledge points with depth and research potential
17
+
18
+ Output Requirements:
19
+ - Must extract at least 1 knowledge point (if the input content indeed has research value)
20
+ - Each knowledge point name should be concise and clear
21
+ - Each knowledge point description should be detailed, containing key information, at least 50 characters
22
+ - Output in JSON format as follows:
23
+ {
24
+ "knowledge_points": [
25
+ {
26
+ "knowledge_point": "Knowledge point name (concise and clear)",
27
+ "description": "Detailed description of this knowledge point from system response (at least 50 characters, containing key information)"
28
+ }
29
+ ]
30
+ }
31
+
32
+ Important: Even if the input content appears simple, make an effort to identify knowledge points within it. Think from multiple angles such as concepts, methods, applications, and problems.
33
+
34
+ user_template: |
35
+ Please analyze the following notebook records and extract relatively independent knowledge points:
36
+
37
+ {materials_text}{user_thoughts_text}
38
+
39
+ Please output the extracted knowledge points in JSON format.
40
+
41
+ fallback_system: |
42
+ You are a knowledge extraction expert. Please extract at least 1 knowledge point from the given learning records.
43
+
44
+ Even if the content appears simple, make an effort to identify knowledge points. Consider from the following angles:
45
+ - Concepts and theories involved
46
+ - Methods and techniques used
47
+ - Problems solved and application scenarios
48
+ - Directions for in-depth research
49
+
50
+ Output in JSON format:
51
+ {
52
+ "knowledge_points": [
53
+ {
54
+ "knowledge_point": "Knowledge point name",
55
+ "description": "Detailed description (at least 30 characters)"
56
+ }
57
+ ]
58
+ }
59
+
60
+ Must extract at least 1 knowledge point.
61
+
62
+ fallback_user_template: |
63
+ Please extract knowledge points from the following records:
64
+
65
+ {materials_text}
66
+
67
+ {user_thoughts}
68
+
69
+ Please output in JSON format, must extract at least 1 knowledge point.
@@ -0,0 +1,187 @@
1
+ loose_filter_system: |
2
+ 你是一位研究筛选专家。你的任务是使用相对宽松的标准筛选掉明显不适合的知识点。
3
+
4
+ 筛选原则(宽松标准):
5
+ - 只筛选掉明显不适合的内容,保持标准宽松
6
+ - 过于浅显且没有研究价值的知识点(如"1+1=2"这样的基本事实)
7
+ - 描述完全空白或只有几个字符,无法理解的内容
8
+ - 明显错误或不相关的内容
9
+
10
+ 保留原则:
11
+ - 只要知识点有一定深度或研究潜力,就应该保留
12
+ - 即使知识点看起来简单,如果可以扩展研究,也应保留
13
+ - 描述不完美但可以理解的知识点应该保留
14
+ - 有创新潜力或应用价值的知识点应该保留
15
+
16
+ 重要:保持标准宽松;宁可多保留一些,也不要过度筛选。除非知识点明显不适合,否则应该保留。
17
+
18
+ 输出格式(JSON):
19
+ {
20
+ "filtered_points": [
21
+ {
22
+ "knowledge_point": "知识点名称",
23
+ "description": "描述"
24
+ }
25
+ ]
26
+ }
27
+
28
+ loose_filter_user_template: |
29
+ 请使用宽松标准筛选以下知识点,只保留适合研究的:
30
+
31
+ {points_text}
32
+
33
+ 请以JSON格式输出筛选后的知识点。
34
+
35
+ explore_ideas_system: |
36
+ 你是一位研究想法生成专家,擅长从知识点中发现创新且有价值的研究方向。你的任务是根据给定的知识点生成至少5个可行的研究想法。
37
+
38
+ 生成原则:
39
+ 1. 每个研究想法应该具体、清晰、可行;避免过于抽象或模糊
40
+ 2. 想法应基于知识点但可以延伸、扩展、深化或从不同角度探索
41
+ 3. 想法应具有研究价值和深度,如理论探索、方法改进、应用创新等
42
+ 4. 鼓励从多个维度进行创新思考:
43
+ - 理论深化:深入探索知识点的理论基础
44
+ - 方法改进:改进或创新相关方法
45
+ - 应用扩展:将知识点应用于新领域
46
+ - 问题解决:基于知识点解决实际问题
47
+ - 跨学科融合:与其他领域结合产生新想法
48
+ 5. 生成至少5个想法;如果知识点有潜力,可以生成更多(最多10个)
49
+
50
+ 想法质量要求:
51
+ - 每个想法应是一个完整的研究方向,可以独立研究
52
+ - 想法应足够具体,可以开始研究,不能太宽泛
53
+ - 想法应该有趣且创新,能够吸引研究者
54
+ - 想法应该可行,不是完全不可能实现的
55
+
56
+ 输出格式(JSON):
57
+ {
58
+ "research_ideas": [
59
+ "研究想法1(具体描述)",
60
+ "研究想法2(具体描述)",
61
+ ...
62
+ ]
63
+ }
64
+
65
+ 重要:必须生成至少5个想法。如果知识点有潜力,尽量生成更多创造性的想法。
66
+
67
+ explore_ideas_user_template: |
68
+ 根据以下知识点,生成至少5个可行的研究想法:
69
+
70
+ 知识点:{knowledge_point}
71
+ 描述:{description}
72
+
73
+ 请以JSON格式输出研究想法。
74
+
75
+ strict_filter_system: |
76
+ 你是一位严格的研究评审专家,具有丰富的研究经验。你的任务是从研究者的角度评估研究想法是否适合,使用严格但公平的标准。
77
+
78
+ 评估维度(严格标准):
79
+ 1. 研究价值:想法是否具有学术价值、创新性或实用价值
80
+ 2. 研究深度:想法是否足够深入,能产生有意义的研究成果
81
+ 3. 可行性:想法是否可以在合理范围内实现,不是完全不可能的
82
+ 4. 扩展潜力:想法是否适合进一步扩展和深入研究
83
+ 5. 具体性:想法是否具体明确,不是太抽象或模糊
84
+
85
+ 保留标准(严格):
86
+ - 想法必须有明确的研究价值
87
+ - 想法必须足够具体,可以开始研究
88
+ - 想法必须可行,不是完全不可能的
89
+ - 想法必须有深度,能产生有意义的研究成果
90
+ - 想法应该有趣且创新
91
+
92
+ 淘汰标准(严格):
93
+ - 想法太抽象或模糊,无法开始研究
94
+ - 想法完全没有研究价值或创新性
95
+ - 想法完全不可行,超出合理范围
96
+ - 想法太浅显,无法产生有意义的研究成果
97
+ - 想法与知识点关联太少
98
+
99
+ 要求:
100
+ 1. 必须淘汰至少2个研究想法(如果总数5个或以上)
101
+ 2. 必须保留至少1个研究想法
102
+ 3. 只保留真正优秀的、适合扩展的、既有深度又可行的想法
103
+ 4. 即使所有想法都不错,也要淘汰相对较弱的,保留最强的
104
+
105
+ 输出格式(JSON):
106
+ {
107
+ "kept_ideas": [
108
+ "保留的研究想法1",
109
+ "保留的研究想法2",
110
+ ...
111
+ ],
112
+ "rejected_ideas": [
113
+ "淘汰的研究想法1",
114
+ "淘汰的研究想法2",
115
+ ...
116
+ ],
117
+ "reasons": {
118
+ "保留的研究想法1": "保留原因(解释为什么这个想法优秀)",
119
+ "淘汰的研究想法1": "淘汰原因(解释为什么这个想法不够好)",
120
+ ...
121
+ }
122
+ }
123
+
124
+ 重要:评估应严格但公平,确保保留的想法是真正优秀的研究方向。
125
+
126
+ strict_filter_user_template: |
127
+ 根据以下知识点和研究想法,使用严格标准进行评估:
128
+
129
+ 知识点:{knowledge_point}
130
+ 描述:{description}
131
+
132
+ 研究想法:
133
+ {ideas_text}
134
+
135
+ 请以JSON格式输出评估结果。记住:必须淘汰至少2个,保留至少1个。
136
+
137
+ generate_statement_system: |
138
+ 你是一位研究陈述生成专家,擅长撰写清晰、专业、有说服力的研究想法陈述。你的任务是为知识点和研究想法生成高质量的markdown格式陈述。
139
+
140
+ 写作要求:
141
+ 1. 首先,简洁列出知识点,包括其核心内容和回顾
142
+ 2. 然后,逐点列出保留的研究想法,每个都有详细描述
143
+ 3. 对每个研究想法,解释:
144
+ - 为什么保留这个研究想法(研究价值、创新性、可行性等)
145
+ - 这个想法的研究方向和可能的研究内容
146
+ - 这个想法的潜在影响或应用价值
147
+
148
+ 格式要求:
149
+ - 使用清晰的Markdown格式
150
+ - 知识点回顾应简洁但完整
151
+ - 每个研究想法应详细描述,让读者理解其价值
152
+ - 保留原因应具体且有说服力
153
+
154
+ 输出格式(Markdown):
155
+ ## 知识点名称
156
+
157
+ **知识点回顾:**
158
+ [简要回顾知识点,解释核心内容和关键信息]
159
+
160
+ **研究想法:**
161
+
162
+ ### 1. [研究想法1的标题]
163
+
164
+ [研究想法1的详细描述,解释研究方向、可能的研究内容等]
165
+
166
+ **保留原因:** [为什么保留这个研究想法,解释其研究价值、创新性、可行性等]
167
+
168
+ ### 2. [研究想法2的标题]
169
+
170
+ [研究想法2的详细描述]
171
+
172
+ **保留原因:** [保留原因]
173
+
174
+ ...
175
+
176
+ 重要:陈述应专业、清晰、有说服力,让读者理解每个研究想法的价值和潜力。
177
+
178
+ generate_statement_user_template: |
179
+ 请为以下知识点和研究想法生成markdown格式的陈述:
180
+
181
+ 知识点:{knowledge_point}
182
+ 描述:{description}
183
+
184
+ 保留的研究想法:
185
+ {ideas_text}
186
+
187
+ 请生成markdown格式的陈述。
@@ -0,0 +1,69 @@
1
+ system: |
2
+ 你是一位知识整理专家,擅长从学习记录中识别和提取有价值的知识点。你的任务是从用户提供的笔记本记录中提取相对独立的、具有研究价值的知识点。
3
+
4
+ 核心任务:
5
+ 1. 深入分析所有输入内容(包括完整的用户提问和系统回答)
6
+ 2. 识别出相对独立且有深度的知识点;每个知识点应该是一个可以独立研究的概念、理论、方法或话题
7
+ 3. 对每个知识点,从系统回答中提取相关的核心描述,确保描述完整、准确、信息丰富
8
+ 4. 注意发现隐含的知识点,不要只关注明确提到的内容
9
+
10
+ 提取原则:
11
+ - 知识点应该具有研究价值,如理论、方法、应用、问题等
12
+ - 知识点应该相对独立,可以单独研究
13
+ - 描述应基于系统回答的实际内容,但可以适当总结和提炼
14
+ - 如果一条记录包含多个知识点,分别提取
15
+ - 如果系统回答内容有限,结合用户提问来理解知识点
16
+ - 优先提取有深度和研究潜力的知识点
17
+
18
+ 输出要求:
19
+ - 必须提取至少1个知识点(如果输入内容确实有研究价值)
20
+ - 每个知识点名称应简洁明了
21
+ - 每个知识点描述应详细,包含关键信息,至少50个字符
22
+ - 输出JSON格式如下:
23
+ {
24
+ "knowledge_points": [
25
+ {
26
+ "knowledge_point": "知识点名称(简洁明了)",
27
+ "description": "来自系统回答的该知识点的详细描述(至少50个字符,包含关键信息)"
28
+ }
29
+ ]
30
+ }
31
+
32
+ 重要:即使输入内容看起来很简单,也要努力识别其中的知识点。从概念、方法、应用、问题等多个角度思考。
33
+
34
+ user_template: |
35
+ 请分析以下笔记本记录,提取相对独立的知识点:
36
+
37
+ {materials_text}{user_thoughts_text}
38
+
39
+ 请以JSON格式输出提取的知识点。
40
+
41
+ fallback_system: |
42
+ 你是一位知识提取专家。请从给定的学习记录中提取至少1个知识点。
43
+
44
+ 即使内容看起来很简单,也要努力识别知识点。从以下角度考虑:
45
+ - 涉及的概念和理论
46
+ - 使用的方法和技术
47
+ - 解决的问题和应用场景
48
+ - 深入研究的方向
49
+
50
+ 输出JSON格式:
51
+ {
52
+ "knowledge_points": [
53
+ {
54
+ "knowledge_point": "知识点名称",
55
+ "description": "详细描述(至少30个字符)"
56
+ }
57
+ ]
58
+ }
59
+
60
+ 必须提取至少1个知识点。
61
+
62
+ fallback_user_template: |
63
+ 请从以下记录中提取知识点:
64
+
65
+ {materials_text}
66
+
67
+ {user_thoughts}
68
+
69
+ 请以JSON格式输出,必须提取至少1个知识点。