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

Feature request: AI pre process #43

Open
zxzinn opened this issue Aug 10, 2024 · 6 comments
Open

Feature request: AI pre process #43

zxzinn opened this issue Aug 10, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@zxzinn
Copy link

zxzinn commented Aug 10, 2024

Hi! Thanks for this awesome project.
I have a great time using it, but as the project scales up, the output file for ai becomes lazy,
I want to suggest that add a option for using own AI API key to introduce/pre-process the output files,
and it can depend on a prompt file that was pre-defined to make the output file more understandable for ai.
I know this request is a heavy job and it might have multiple potential issues, it's unnecessary to make this feature because this
project is already good!
Thank you for viewing this issue

Best wishes,
Xinn

@yamadashy
Copy link
Owner

yamadashy commented Aug 11, 2024

@zxzinn
Thank you for your suggestion! I really appreciate your continued use of Repopack.

I think making the output more AI-friendly is a great idea.

I'd like to delve deeper into the content of your proposal. Could you clarify which of the following approaches you're envisioning?

  1. Using a pre-prepared prompt for output file adjustment to summarize Repopack's output in a way that's easier for AIs like Claude to understand, and then including this summary in Repopack's output file.
  2. Using a pre-prepared prompt for output file adjustment to rewrite the entire file that Repopack outputs, making it easier for AIs to understand.

if it's the second option, transforming the entire output might be quite time-consuming and costly, so we'd need to think of a good method to handle this efficiently.

I apologize if I've misunderstood anything! What are your thoughts on this? I'd love to hear more about your vision for this feature.

@yamadashy
Copy link
Owner

yamadashy commented Aug 11, 2024

Additionally, I'd like to mention that there's a related issue (#40) which suggests "defining rules for LLMs to improve accuracy". Do you think this approach might be effective even for large-scale projects?

While the requirements are different, implementing API key-based rewriting would be a significant undertaking.
If we can achieve a reasonable improvement in AI comprehension through the approach suggested in #40, implementing that solution first might be beneficial for users working with large-scale projects.

@zxzinn
Copy link
Author

zxzinn commented Aug 11, 2024

Thank you for your reply! I think the first approach is better, which involves introducing:

What the project is about
What techniques the project is using
What language the project is using
What additional approaches the project requires
What dependencies the project is using
[Optional] What design patterns the project needs to follow

These are all things the user can write themselves, similar to prompt engineering, to help the AI better understand the project you're working on. My idea is that users can pre-define their own prompts, then process them through a basic AI to introduce the features of the project, and then include this information at the beginning or end of Repopack's output.

In my opinion, I have a project with a 40k context window using Claude, and it becomes extremely sluggish at times, forcing me to manually select which features I want to modify.

I think the thing I want to approach is similarly to the issue you mentioned.

@yamadashy
Copy link
Owner

yamadashy commented Aug 11, 2024

Thank you for your detailed response! I now have a much clearer understanding of your proposed idea.

Including such content in Repopack's output would indeed be very helpful for AI comprehension, and I'm definitely keen on implementing this feature.

However, my main concern with this approach is whether the API-generated summaries would consistently meet user expectations in terms of quality. To achieve the quality users expect, we'd need to support APIs for various AI services that users prefer. Additionally, based on my experience, even with Claude, the quality can be somewhat inconsistent (around 60-90% accuracy), so simply incorporating API results into Repopack output might be problematic.

Given this, I've been thinking that, assuming the project structure doesn't change dramatically very often, we could implement something similar to #40.

  • We could allow users to attach a "project overview and desired rules file" to Repopack.
  • Users could manually create this file by sending Repopack's output to their preferred AI (like Claude) and asking it to generate the overview.

This approach would likely ensure that the quality meets user expectations. And, We'll document best practices for this process in the README.

As for using API keys for AI-generated summaries, I feel this might be more suitable for summarizing rapidly changing information like git logs, diffs, GitHub issues, and PRs.

What are your thoughts on this approach?
Thanks again for your contribution to this discussion!

@zxzinn
Copy link
Author

zxzinn commented Aug 12, 2024

Yes, I think users can provide an overview of the project and specify the directories or files they want included in Repopack. Perhaps we don't need to support many types of AI - I think a lightweight/inexpensive option should be sufficient to handle the task of introducing the project.

@yamadashy
Copy link
Owner

I agree. It's a good idea to start with the minimum support and add more later.

Currently, I'm working on a PR to implement reading a manually created instruction file:
#46

If this works well, the next step could be to consider adding a feature to create this file using an API.

Thank you for your excellent ideas!

@yamadashy yamadashy added the enhancement New feature or request label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants