From c677da1e11613f619496ea2b0307531ddbff18c9 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 22 Dec 2024 11:29:08 -0500 Subject: [PATCH] Improve expert prompt. --- ra_aid/tools/expert.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/ra_aid/tools/expert.py b/ra_aid/tools/expert.py index 4d63c7b..834d766 100644 --- a/ra_aid/tools/expert.py +++ b/ra_aid/tools/expert.py @@ -42,9 +42,6 @@ def emit_expert_context(context: str) -> str: Args: context: The context to add - - Returns: - Confirmation message """ expert_context.append(context) @@ -61,9 +58,6 @@ def read_files_with_limit(file_paths: List[str], max_lines: int = 10000) -> str: file_paths: List of file paths to read max_lines: Maximum total lines to read (default: 10000) - Returns: - String containing concatenated file contents with headers - Note: - Each file's contents will be prefaced with its path as a header - Stops reading files when max_lines limit is reached @@ -99,9 +93,6 @@ def read_files_with_limit(file_paths: List[str], max_lines: int = 10000) -> str: def read_related_files() -> str: """Read related files from memory. - - Returns: - String containing concatenated file contents with headers """ related_files = get_related_files() if not related_files: @@ -125,12 +116,6 @@ def ask_expert(question: str) -> str: Try to phrase your question in a way that it does not expand the scope of our top-level task. The expert can be prone to overthinking depending on what and how you ask it. - - Args: - question: The question to ask the expert - - Returns: - The expert's response """ global expert_context @@ -168,6 +153,7 @@ def ask_expert(question: str) -> str: query_parts.extend(['\n# Additional Context', '\n'.join(expert_context)]) query_parts.extend(['# Question', question]) + query_parts.extend(['\n # Addidional Requirements', "Do not expand the scope unnecessarily."]) # Join all parts full_query = '\n'.join(query_parts)