Skip to content

[Contributor] RAG-powered Document Q&A Agent using uAgents + Langchain + Gemini #128

@ashishsoni-ai

Description

@ashishsoni-ai

Task description

Agent Proposal

Proposed folder: contributors/rag-document-qa-agent/
Category: RAG, LLM, Integration
Difficulty: Intermediate


What this agent does

A Retrieval-Augmented Generation (RAG) agent that:

  • Accepts a PDF or plain-text document as input
  • Chunks and embeds it using HuggingFace sentence-transformers
  • Stores vectors in ChromaDB
  • Answers natural language questions about the document via uAgents chat protocol
  • Uses Gemini 2.0 Flash (free tier) as the LLM backbone

Why it's useful

Most existing examples focus on live API queries or web scraping.
There is no contributor example showing how to do document-grounded Q&A inside the uAgents ecosystem.
This fills a practical gap — useful for students, researchers, and anyone who wants to chat with their own documents via an agent.


Tech Stack

  • uagents — agent runtime + chat protocol
  • langchain + langchain-google-genai — RAG chain
  • chromadb — vector store
  • sentence-transformers (HuggingFace) — embeddings
  • pypdf — PDF loading
  • Gemini 2.0 Flash — LLM (free tier, no cost barrier for contributors)

Proposed Folder Layout

contributors/rag-document-qa-agent/
README.md
requirements.txt
.env.example # GEMINI_API_KEY, AGENTVERSE_API_KEY
agent.py # uAgent with RAG chain
ingest.py # Document ingestion + embedding
assets/
demo.png


Acceptance Criteria

  • Agent registers on Agentverse and responds via chat protocol
  • Accepts document path via .env or startup config
  • Answers questions grounded in document content (not hallucinated)
  • README covers setup, env vars, run steps, and expected output
  • .env.example included, no real keys committed
  • ruff check . and ruff format . pass
  • contributors/CHANGELOG.md updated
  • Demo screenshot included

About Me

  • B.Tech AI & ML student (GGSIPU, 2028)
  • Built PDF Chat RAG system: github.com/ashishsoni-ai/pdfchat-groq-rag
  • Stack experience: LangChain, ChromaDB, FastAPI, Gemini, HuggingFace, uAgents (learning)
  • Contributing via GSSoC 2025

I would like to be assigned this issue and will open a PR within 4 days of assignment.

Target folder (if applicable)

contributors/rag-document-qa-agent/

Contributor checklist

  • I will place new agents under contributors/<agent-name>/ only
  • I will update contributors/CHANGELOG.md for non-doc changes
  • I have starred this repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions