geekan / MetaGPT

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
https://deepwisdom.ai/
MIT License
43.99k stars 5.23k forks source link

Implement Vector Store for Similarity-Based Code Generation (RAG on Codebase) #969

Open moamen270 opened 6 months ago

moamen270 commented 6 months ago

Feature description I've been exploring your repository and I'm fascinated by the capabilities of the agent as a software engineer, particularly in executing commands and calling functions. However, I believe there's a significant opportunity to enhance its capabilities by integrating a vector store that contains embedded codebases. This would enable the agent to perform similarity searches on code snippets, allowing it to generate code similar to existing codebases.

Your Feature The agent will be able to produce code that closely resembles existing codebases, improving the quality and relevance of generated code. By leveraging similarity-based code generation, the agent can adapt to different coding styles and conventions present in the embedded codebases.

better629 commented 6 months ago

@moamen270 The suggestion you mentioned here is actually what we are doing now.

Do you have deeper or further scenario you want to see? like building a sales web integrating with your own PRDs or code. If you have discord, maybe we can discuss there. My id: betterwang_72305

kripper commented 6 months ago

Are you building a multilevel summary based retriever? Idea:

  1. Embed original document and mutli-level summaries.
  2. Retrieve and feed the prompt with context crossing info from multiple levels.
  3. Let the LLM access a more general or detailed version of the matched dinamically (a la MemGPT).

Video of a similar ideas: https://www.youtube.com/watch?si=AGJ-vCW8qCfiB3EG&v=jbGchdTL7d0&feature=youtu.be