feat: add RAG-powered Document Q&A Agent (uAgents + LangChain + Gemini)#166
Open
davi713albano-coder wants to merge 1 commit into
Open
feat: add RAG-powered Document Q&A Agent (uAgents + LangChain + Gemini)#166davi713albano-coder wants to merge 1 commit into
davi713albano-coder wants to merge 1 commit into
Conversation
Add contributors/rag-document-qa-agent/ — a uAgent that ingests PDF or plain-text documents, embeds them with HuggingFace sentence-transformers, stores vectors in ChromaDB, and answers questions via the Chat Protocol using Google Gemini 2.0 Flash. Files: - agent.py: uAgent with Chat Protocol (ingest, status, Q&A commands) - rag.py: LangChain RAG pipeline (loading, chunking, embedding, retrieval) - ingest.py: Standalone document ingestion utility - requirements.txt, .env.example, .gitignore - README.md with setup, usage, and architecture docs - assets/demo.png placeholder Also updates contributors/CHANGELOG.md and root README.md Community Contributors table. Closes fetchai#128
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a RAG-powered Document Q&A Agent (
contributors/rag-document-qa-agent/) that ingests PDF/plain-text documents, embeds them with HuggingFace sentence-transformers, stores vectors in ChromaDB, and answers natural-language questions via the uAgents Chat Protocol using Google Gemini 2.0 Flash as the LLM backbone.Closes #128
What the agent does
.txt,.md,.csv) via theingest <path>command orDOCUMENT_PATHenv varRecursiveCharacterTextSplitterand embeds withall-MiniLM-L6-v2Commands
ingest <path>status<question>Tech Stack
all-MiniLM-L6-v2) — embeddingsType of Change
Checklist
contributors/<agent-name>/(not repo root).ruff check .— all checks passed.ruff format .— all files formatted.README.mdfor changed example(s)..env.exampleif environment variables are required.contributors/CHANGELOG.mdfor community agent changes, or rootCHANGELOG.mdfor other non-doc changes.README.md(if new agent).review-requiredCI).Related Issue
Closes #128
Notes for Reviewers
demo.pngis a placeholder — a real screenshot should be added after manual testing.community_agent,news-summarizer-agent).