# dummycodertech/research-assistant-agentic-rag architecture

> Architecture diagram of the GitHub repository dummycodertech/research-assistant-agentic-rag, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dummycodertech/research-assistant-agentic-rag
- Repository: https://github.com/dummycodertech/research-assistant-agentic-rag

## Overview

Papeer is a Streamlit research-paper assistant. Users create a chat session, add papers from files, ArXiv, or URLs, then ask questions, verify claims, or use the separate /btw side channel. The main question workflow routes through LangGraph to retrieval, relevance checking and answer generation, with a claim-verification branch. The README documents graph stages not fully visible in the excerpts; those links cite the README. Evaluation tooling is excluded from this runtime map.

Main entry points: [`app.py`](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/app.py) (Chat and sessions), [`backend/vector_store.py`](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/vector_store.py) (Vector store API), [`backend/rag_graph.py`](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py) (Query router), [`backend/btw_handler.py`](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/btw_handler.py) (/btw handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Chat interface"]
  node_streamlit["Chat and sessions<br/>[app.py]"]
  node_state_inspector["Graph state panel<br/>[app.py]"]
end

subgraph group_ingestion["Paper ingestion"]
  node_file_loader["File loaders<br/>[paper_loader.py]"]
  node_arxiv_loader["ArXiv loader<br/>[paper_loader.py]"]
  node_web_loader["URL loader<br/>[paper_loader.py]"]
end

subgraph group_research["Research workflow"]
  node_graph["LangGraph workflow<br/>[rag_graph.py]"]
  node_router["Query router<br/>[rag_graph.py]"]
  node_retrieval_agent["Retrieval agent<br/>[rag_graph.py]"]
  node_retrieval_tools["Retrieval tools<br/>[rag_graph.py]"]
  node_relevance["Relevancy check<br/>[rag_graph.py]"]
  node_rewrite["Query rewrite<br/>[rag_graph.py]"]
  node_claim_check["Claim verification<br/>[rag_graph.py]"]
  node_answer["Answer generation<br/>[rag_graph.py]"]
  node_models["Structured schemas<br/>[models.py]"]
end

subgraph group_storage["Knowledge storage"]
  node_vector_api["Vector store API<br/>[vector_store.py]"]
  node_qdrant[("Session vector collections<br/>[vector_store.py]")]
  node_embed_cache[("Embedding cache<br/>[vector_store.py]")]
end

subgraph group_sidechannel["Side channel"]
  node_btw["/btw handler<br/>[btw_handler.py]"]
end

node_user(("User"))
node_groq["Groq LLM"]
node_tavily["Tavily search"]

node_user -->|"asks or uploads"| node_streamlit
node_streamlit -->|"loads files"| node_file_loader
node_streamlit -->|"loads papers"| node_arxiv_loader
node_streamlit -->|"loads URLs"| node_web_loader
node_file_loader -->|"adds documents"| node_vector_api
node_arxiv_loader -->|"adds documents"| node_vector_api
node_web_loader -->|"adds documents"| node_vector_api
node_vector_api -->|"stores chunks"| node_qdrant
node_vector_api -->|"caches embeddings"| node_embed_cache
node_user -->|"submits query"| node_streamlit
node_streamlit -->|"invokes workflow"| node_graph
node_graph -->|"routes query"| node_router
node_router -->|"selects retrieval"| node_retrieval_agent
node_retrieval_agent -->|"requests tools"| node_retrieval_tools
node_retrieval_tools -->|"searches papers"| node_vector_api
node_retrieval_tools -->|"searches web"| node_tavily
node_retrieval_tools -->|"passes results"| node_relevance
node_relevance -->|"rewrites if needed"| node_rewrite
node_rewrite -->|"retries retrieval"| node_retrieval_agent
node_relevance -->|"passes relevant context"| node_answer
node_router -->|"selects verification"| node_claim_check
node_claim_check -->|"searches claim"| node_tavily
node_claim_check -->|"passes verdict"| node_answer
node_router -->|"selects direct answer"| node_answer
node_answer -->|"returns response"| node_streamlit
node_streamlit -->|"shows graph state"| node_state_inspector
node_streamlit -->|"dispatches /btw"| node_btw
node_btw -->|"routes and answers"| node_groq
node_btw -->|"searches when needed"| node_tavily
node_router -->|"uses decision schema"| node_models
node_relevance -->|"uses decision schema"| node_models
node_claim_check -->|"uses result schema"| node_models
node_retrieval_agent -.->|"plans searches"| node_groq
node_answer -.->|"generates response"| node_groq

click node_streamlit "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/app.py"
click node_state_inspector "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/app.py"
click node_file_loader "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/paper_loader.py"
click node_arxiv_loader "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/paper_loader.py"
click node_web_loader "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/paper_loader.py"
click node_vector_api "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/vector_store.py"
click node_qdrant "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/vector_store.py"
click node_embed_cache "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/vector_store.py"
click node_graph "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py"
click node_router "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py"
click node_retrieval_agent "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py"
click node_retrieval_tools "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py"
click node_relevance "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py"
click node_rewrite "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py"
click node_claim_check "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py"
click node_answer "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py"
click node_models "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/models.py"
click node_btw "https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/btw_handler.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit,node_state_inspector,node_user toneBlue
class node_file_loader,node_arxiv_loader,node_web_loader toneAmber
class node_graph,node_router,node_retrieval_agent,node_retrieval_tools,node_relevance,node_rewrite,node_claim_check,node_answer,node_models toneMint
class node_vector_api,node_qdrant,node_embed_cache toneRose
class node_btw,node_groq,node_tavily toneIndigo
```

## Components

### Chat interface

- [Chat and sessions](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/app.py): `app.py`
- [Graph state panel](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/app.py): `app.py`

### Paper ingestion

- [File loaders](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/paper_loader.py): `backend/paper_loader.py`
- [ArXiv loader](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/paper_loader.py): `backend/paper_loader.py`
- [URL loader](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/paper_loader.py): `backend/paper_loader.py`

### Research workflow

- [LangGraph workflow](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py): `backend/rag_graph.py`
- [Query router](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py): `backend/rag_graph.py`
- [Retrieval agent](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py): `backend/rag_graph.py`
- [Retrieval tools](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py): `backend/rag_graph.py`
- [Relevancy check](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py): `backend/rag_graph.py`
- [Query rewrite](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py): `backend/rag_graph.py`
- [Claim verification](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py): `backend/rag_graph.py`
- [Answer generation](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/rag_graph.py): `backend/rag_graph.py`
- [Structured schemas](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/models.py): `backend/models.py`

### Knowledge storage

- [Vector store API](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/vector_store.py): `backend/vector_store.py`
- [Session vector collections](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/vector_store.py): `backend/vector_store.py`
- [Embedding cache](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/vector_store.py): `backend/vector_store.py`

### Side channel

- [/btw handler](https://github.com/dummycodertech/research-assistant-agentic-rag/blob/master/backend/btw_handler.py): `backend/btw_handler.py`

### Other components

- **User**
- **Groq LLM**
- **Tavily search**

## Connections

- User → Chat and sessions: asks or uploads (evidence: `README.md`)
- Chat and sessions → File loaders: loads files (evidence: `app.py`)
- Chat and sessions → ArXiv loader: loads papers (evidence: `app.py`)
- Chat and sessions → URL loader: loads URLs (evidence: `README.md`)
- File loaders → Vector store API: adds documents (evidence: `app.py`)
- ArXiv loader → Vector store API: adds documents (evidence: `app.py`)
- URL loader → Vector store API: adds documents (evidence: `README.md`)
- Vector store API → Session vector collections: stores chunks (evidence: `backend/vector_store.py`)
- Vector store API → Embedding cache: caches embeddings (evidence: `backend/vector_store.py`)
- User → Chat and sessions: submits query (evidence: `README.md`)
- Chat and sessions → LangGraph workflow: invokes workflow (evidence: `app.py`)
- LangGraph workflow → Query router: routes query (evidence: `README.md`)
- Query router → Retrieval agent: selects retrieval (evidence: `README.md`)
- Retrieval agent → Retrieval tools: requests tools (evidence: `README.md`)
- Retrieval tools → Vector store API: searches papers (evidence: `README.md`)
- Retrieval tools → Tavily search: searches web (evidence: `README.md`)
- Retrieval tools → Relevancy check: passes results (evidence: `README.md`)
- Relevancy check → Query rewrite: rewrites if needed (evidence: `README.md`)
- Query rewrite → Retrieval agent: retries retrieval (evidence: `README.md`)
- Relevancy check → Answer generation: passes relevant context (evidence: `README.md`)
- Query router → Claim verification: selects verification (evidence: `README.md`)
- Claim verification → Tavily search: searches claim (evidence: `README.md`)
- Claim verification → Answer generation: passes verdict (evidence: `README.md`)
- Query router → Answer generation: selects direct answer (evidence: `README.md`)
- Answer generation → Chat and sessions: returns response (evidence: `README.md`)
- Chat and sessions → Graph state panel: shows graph state (evidence: `README.md`)
- Chat and sessions → /btw handler: dispatches /btw (evidence: `app.py`)
- /btw handler → Groq LLM: routes and answers (evidence: `backend/btw_handler.py`)
- /btw handler → Tavily search: searches when needed (evidence: `backend/btw_handler.py`)
- Query router → Structured schemas: uses decision schema (evidence: `backend/rag_graph.py`)
- Relevancy check → Structured schemas: uses decision schema (evidence: `backend/rag_graph.py`)
- Claim verification → Structured schemas: uses result schema (evidence: `backend/rag_graph.py`)
- Retrieval agent → Groq LLM: plans searches
- Answer generation → Groq LLM: generates response
