-
Notifications
You must be signed in to change notification settings - Fork 518
[Feat] RAG example #21
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
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a comprehensive RAG (Retrieval-Augmented Generation) agent example to the AgentLightning framework. The example demonstrates how to build and train an agent that answers questions using Wikipedia retrieval capabilities through an MCP (Model Context Protocol) server.
- Implements a RAG agent using Wikipedia retrieval with FAISS indexing and sentence transformers
- Sets up MCP server infrastructure for retrieval operations
- Provides training configuration and evaluation utilities for the RAG system
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/rag_agent/wiki_retriever_mcp/wiki_retriever_mcp.py | MCP server implementation for Wikipedia retrieval using FAISS and sentence transformers |
| examples/rag_agent/wiki_retriever_mcp/wiki_retriever_install.sh | Environment setup script for the MCP server dependencies |
| examples/rag_agent/utils.py | Evaluation utilities for computing F1 scores, exact match, and other metrics |
| examples/rag_agent/train.sh | Training configuration script with hyperparameters and model settings |
| examples/rag_agent/rag_agent.py | Main RAG agent implementation with training and validation logic |
| examples/rag_agent/README.md | Setup instructions and documentation for the RAG example |
Comments suppressed due to low confidence (1)
examples/rag_agent/rag_agent.py:66
- The variable
resourcesshadows the parameter of the same name. Consider using a different name likevalidation_resourcesto avoid confusion.
resources = {
|
Is there anything wrong with this PR? Can it be implemented correctly and used as a reference? |
Add RAG example