Find the prompts to the LLMs in the repo
- User
Find the prompts to the LLMs in the repo
Assistant
The Aide repository uses a variety of prompts, often dynamically generated and incorporating context from the user's code, current file, and previous interactions. There isn't a single, centralized list of all prompts. Instead, prompts are constructed within various TypeScript files based on the user's request and the current coding context.
Here's a breakdown of the prompt generation process and locations in the provided code:
1. CodeStory Prompts (
./repos/aide/extensions/codestory/src/llm/recipe/prompts.ts):This file defines several key prompts used within the CodeStory feature:
-
generatePlanAndQueriesPrompt(): This prompt asks the LLM to break down the user's request, generate search queries to find relevant code, and suggest additional instructions to clarify the user's intent. It enforces an XML-based format for the response, which is parsed bygeneratePlanAndQueriesResponseParser(). -
fileFunctionsToParsePrompt(): This prompt guides the LLM to determine which code symbols need modification and provide specific instructions for those changes. The response, parsed bygenerateFileFunctionsResponseParser(), should also use an XML format. -
modifyCodeSnippetPrompt(): This prompt uses the code, code snippet, user instructions, and filename to instruct the LLM to modify a specific code snippet within a file. It emphasizes limiting changes to the provided context. -
generateModifyCodeHallucinationPrompt(): This function provides an example prompt and response for code modification, showcasing the expected format (including<code_planning>and<code_generation>sections) and diff generation. This is used for testing and demonstrating the desired behavior. The actual prompt is constructed dynamically based on the specific code and request. -
newFileContentAndDiffPrompt(): Used to generate new file content based on a provided diff, filename, original file content, the code snippet that needs to change, and an explanation of the diff. It also requests the LLM to include any missing dependencies. -
generateTestScriptGenerationPrompt(): This prompt guides the LLM to generate a test script for the code changes, given details like the test framework, filename, code symbol, new file content, diff, and module name. -
generateTestExecutionPrompt(): Used to generate the final test script. It emphasizes that the code should execute correctly on the first try and advises against mocking any functions.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.