This project is an AgentStack-powered AI pipeline that assists in managing GitHub issues efficiently. It uses Retrieval-Augmented Generation (RAG) with Multi-Retrieval Queries to analyze GitHub issues, extract relevant information, and update issues with related discussions.
- Retrieves and processes GitHub issues from a repository.
- Uses Multi-Retrieval Queries to improve similarity search by reformulating queries from different perspectives.
- Stores issues in a vector database (Chroma) for efficient retrieval.
- Extracts issue URLs and adds comments to GitHub issues with related discussions.
- Runs as a structured pipeline using
agentstack.
The agent follows a structured pipeline:
- Retrieves all issues from the GitHub repository.
- Stores them in ChromaDB for efficient retrieval.
- Uses Multi-Retrieval Query Generation to generate alternative versions of the user query.
- Reformulates queries from different perspectives to enhance similarity-based retrieval.
- Retrieves the most relevant GitHub issues by overcoming distance-based limitations.
- Generates an AI-assisted response.
- Extracts relevant issue links from the generated response.
- Adds a comment to the corresponding GitHub issue.
- Defines and executes the entire workflow using
agentstack. - Ensures that each step updates the state correctly.
Instead of using a single search query, the Multi-Retrieval Query method generates five alternative perspectives of the user's query to:
- Improve similarity-based search results.
- Reduce distance-based search errors.
- Ensure better document retrieval.
"How do I extract a datetime from a timestamp?"
- "Convert timestamp to datetime format in Python."
- "How can I parse timestamps into datetime objects?"
- "Best ways to retrieve datetime from a timestamp."
- "Extract date and time from a given timestamp."
- "Methods to transform a timestamp into a readable date."
These alternative queries increase retrieval accuracy, helping the AI find more relevant GitHub issues.
When the agent runs, it automatically adds a comment to the GitHub issue:
✅ Successfully added a comment to Issue #123:
The issue titled "How do I extract a datetime from a timestamp?" can be found at:
https://github.com/YOUR_REPO/issues/456
Make sure your GITHUB_TOKEN is correct and has repo permissions.
Use updated imports:
from langchain_community.vectorstores import Chroma
from langchain_community.embeddings import OpenAIEmbeddingsEnsure that each task/agent returns an updated state:
return {**state, "retrievelink": response_text}- Python 3.9+
- AgentStack
- LangChain
- ChromaDB
- GitHub API (PyGitHub)
- Multi-Retrieval Query Generation
For questions or contributions, feel free to reach out:
- GitHub: Neel Harsola
- Email: [email protected]