基于RAG的研究副本:
一个智能多智能体研究助手 LangGraph, LangChain,以及 模型上下文协议(MCP) 实现文献探索的自动化。它检索论文,总结关键见解,对相关作品进行分类,并可视化研究趋势。
______________________________________________________________________
主要亮点
- 检索代理: 查询和摘录论文 *arXiv* 使用自定义 主控程序 整合。
- 摘要代理: 通过以下方式执行设备上的抽象摘要 拥抱脸BART大型CNN (没有API调用或成本)。
- 群集代理: 用途 句子BERT嵌入 + 聚类 按主题对相关论文进行分组,并生成二维投影。
- 可视化层: 内置 溪流 + Plotly,制作一个包含主题集群和摘要的交互式仪表板。
- LangGraph工作流程: 管理代理状态转换(检索器->摘要器->集群器),以实现模块化、可调试的执行。
- 离线可扩展: 在CPU/GPU(支持MPS)上本地运行,并可使用新的MCP工具轻松扩展。
______________________________________________________________________
架构:
┌──────────────────────────────────────┐
│ User Query Input │
│ (e.g., "Multilingual Translation") │
└──────────────────────────────────────┘
│
▼
┌────────────────────────────────────────┐
│ Retriever Agent (LangGraph Node 1) │
│ → fetch_arxiv_papers() via MCP │
│ → Retrieves 3–5 recent papers │
└────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────┐
│ Summarizer Agent (LangGraph Node 2) │
│ → Local BART summarizer (HuggingFace) │
│ → On-device MPS inference (no API) │
│ → Outputs concise 2–3 sentence summaries │
└───────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────┐
│ Cluster Agent (LangGraph Node 3) │
│ → Sentence-BERT embeddings │
│ → KMeans + PCA 2-D projection │
│ → Groups similar papers by topic │
└────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────┐
│ Streamlit Dashboard │
│ → Displays clusters & summaries │
│ → Plotly scatterplot visualization │
│ → Allows export (optional next) │
└────────────────────────────────────────┘安装:
git clone https://github.com/Noshitha98/rag_research_copilot.git