Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve prompt of workspace agent #188

Closed

Conversation

lucas-koehler
Copy link

@lucas-koehler lucas-koehler commented Sep 4, 2024

What it does

Closes https://github.com/eclipsesource/osweek-2024/issues/146

Extend the workspace prompt to get better answers and get the agent to base the answers on the actual workspace contents instead of assuming general workspace and file contents.

The added guidelines are based on the prompt of the default chat agent (in packages/ai-chat/src/common/default-chat-agent.ts) and adapted to focus on the current workspace.

I also tried adding example approaches like the following. This did not significantly improve results for me but sometimes lead to the getFileContent function to be invoked with a plain README as file path. This leads to incorrect results. Thus, the examples were removed again.

Example approaches
## Example Approaches

Question: How do I build this?
Approach: Check the workspace files for files like package.json or a pom.xml or any other suitable configuration file.
Read the file contents and determine the answer based on this. Also check the workspace's README if present.

Question: What is this about?
Approach: Analyze the files in the workspace. Read the workspace's README file and other relevant files for additional information.

Question: Where is <some-concept> implemented?
Approach: Analyze the files in the workspace. Read file contents as needed to determine relevant code locations.

How to test

  • Open a workspace containing a software project
  • Ask questions about the project. Remember to start your question with @Workspace to force the agent. E.g.
    • @Workspace What is this project about?
    • @Workspace Which typescript / java version does the project build?
    • @Workspace How do I build this?
  • Verify that the answers make sense and that relevant files actually were read.

Review checklist

Reminder for reviewers

@JonasHelming
Copy link
Member

Looks wonderful!

As the initial PR is close to be merged, i do not want to merge it into the PR anymore, but to theia once the initial PR is merged.

I created eclipse-theia#14128

Please
comment on the issue, so that i can assign it to you (eclipse-theia#14128)
subscribe to the inital PR (eclipse-theia#14048)
Once it is merged, reopen your PR against master and assign me as a reviwer
Next week is fine!
Thanks!

@lucas-koehler
Copy link
Author

Thanks, I followed the steps and will reopen the PR when appropriate. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants