AI-powered system for extracting, verifying, and analyzing claims from research papers with interactive web UI
# 1. Clone the repository
git clone <repository-url>
cd Research-Assistant-Tool-
# 2. Start the web interface
cd web_ui
python app.py
# 3. Open your browser
http://localhost:5000
# 4. Start exploring!
# - Upload PDF research papers
# - Extract and visualize claims
# - Ask the AI assistant questions
# - Track provenance for all dataOr use with ANY AI coding assistant:
claude # Claude Code CLI
# or: codex # OpenAI Codex CLI
# or: cursor # Cursor AI
# or: aider # Aider- Real-time graph visualization with D3.js force-directed layout
- Tab-based navigation (Documents, Search, Agents, Projects)
- Draggable panel system for customizable layout
- AI chat assistant powered by Claude Code
- WebSocket live updates for real-time collaboration
- Context-aware interface that adapts to your workflow
- Reads PDF research papers
- Identifies substantive claims using LLM extraction
- Preserves critical qualifiers (can/may/might/all/some)
- Organizes claims in a knowledge graph
- Tracks provenance for every claim and document
- Searches 4 free research APIs (arXiv, CORE, OpenAlex, ORKG)
- Semantic similarity matching for evidence discovery
- LLM-based classification (support/contradict)
- Automatic evidence linking after processing
- Builds evidence networks with confidence scores
- Document Processor Agent: Extracts claims and evidence
- Document Finder Agent: Multi-source document discovery
- Background Agents: Asynchronous processing with live status
- Agent Transcript Logging: Full activity capture with provenance
- AI Chat Assistant: Context-aware conversational interface
- Clusters similar claims using semantic embeddings
- Identifies relationships and evidence links
- Visualizes claim hierarchies with interactive graph
- Supports both NetworkX and Neo4j databases
- Full lineage: Every node tracks creating agent and discovery chain
- Verification system: Cross-link validation ensures data integrity
- Audit trail: Complete history of all agent activities
- Trust scores: Track confidence and investigation value
- Documents Tab: Browse all documents, claims, and evidence
- Search Tab: Text search, semantic search, LLM-powered search
- Agents Tab: Monitor active/completed/failed background agents
- Projects Tab: Organize research into separate workspaces
- Resize left panel: Drag horizontal divider (250-600px)
- Resize AI assistant: Drag vertical divider (150-500px)
- Panel sizes persist across sessions via localStorage
- Context-aware: Knows active tab and selected nodes
- Natural language: Ask questions conversationally
- Quick actions: Find Similar, Analyze, Suggest buttons
- Approval system: Confirms before modifying data
- Real-time responses: Powered by Claude Code CLI
- WebSocket integration: Live graph updates
- Agent monitoring: Real-time status of background tasks
- Event notifications: Toast messages for important events
- Progress tracking: Visual indicators for long operations
- Similarity threshold: Configurable (0.5-0.9) for evidence matching
- Embedding model: 6 choices from fast to multilingual
- β‘ MiniLM-L6 (fastest, 384-dim)
- βοΈ MiniLM-L12 (balanced, 384-dim)
- β¨ MPNet (recommended, 768-dim)
- π¬ DistilRoBERTa (premium, 768-dim)
- π Multilingual MPNet (50+ languages, 768-dim)
- π― MS MARCO (search-optimized, 768-dim)
1. Click "Upload Documents" button
2. Select PDF file
3. System extracts claims automatically
4. View results in interactive graph
5. Click nodes to see details
You: "Find documents about machine learning"
AI: "I found 3 documents related to machine learning. Would you like me to filter the graph?"
You: "What claims are most important to investigate?"
AI: "Based on investigation scores, these 5 claims need attention..."
You: "Show me evidence supporting this claim"
AI: "Here are 4 pieces of evidence with confidence scores..."
1. Select any node in the graph
2. View "Created by" agent information
3. Click agent ID to see full transcript
4. See complete lineage chain
5. Verify data integrity
This project works with ANY AI coding assistant:
- β
Claude Code CLI (reads
.claude/CLAUDE.md) - β
OpenAI Codex CLI (reads
AGENTS.md) - β
Cursor AI (reads
INSTRUCTIONS.md) - β
Aider (reads
INSTRUCTIONS.md) - β
Any other AI agent (reads
INSTRUCTIONS.mdorREADME.md)
Agent Configuration (web_ui/agent_config.py):
- Supports multiple CLI adapters
- Easy to add custom adapters
- Environment variable or config file selection
- Defaults to Claude Code
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Web UI (Flask + SocketIO) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Tab Navigation β AI Assistant β Graph Viz (D3) β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Repository Pattern (Backend/Database) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Claim Repo β Document Repo β Event Emitter β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Neo4j Graph Database β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Documents β Claims β Evidence + Provenance β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Agent System β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Doc Processor β Doc Finder β AI Assistant β β
β β Transcript Logs β Provenance β CLI Adapters β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β External APIs & Services β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β arXiv β CORE β OpenAlex β ORKG β LLMs β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The system never loses qualifiers like:
- Modal: can, may, might, could, would, should
- Frequency: always, never, often, sometimes, rarely
- Quantity: all, some, most, few, many, several
Why critical: "X can cause Y" β "X causes Y" - huge semantic difference!
Every node in the graph tracks:
- created_by: Agent type (document_processor, document_finder)
- created_by_agent_id: Unique agent instance ID
- discovered_by: Optional discoverer agent type
- discovered_by_agent_id: Optional discoverer instance ID
- Full transcript: Complete agent activity log with timestamps
Verification system ensures:
- All provenance links are valid
- No orphaned nodes without agent transcripts
- Cross-references work in both directions
- Embedding-based similarity: Uses sentence-transformers
- Configurable threshold: User controls precision/recall trade-off
- Multiple models: From fast (MiniLM) to premium (DistilRoBERTa)
- Automatic linking: Evidence matched after document processing
- LLM classification: Support/contradict/neutral determination
Complete activity logging:
- Agent lifecycle: created β active β completed/failed
- Timestamped events: Every action logged with microsecond precision
- Structured data: JSON-based with rich metadata
- File persistence: Transcripts saved to disk by default
- API access: Query transcripts and agent-created nodes
- arXiv: Preprint server (physics, math, CS, etc.)
- CORE: Open access aggregator
- OpenAlex: 250M+ scholarly papers
- ORKG: Structured research comparisons
All free, most require no API key!
- NetworkX: In-memory, file-based (no setup)
- Neo4j: Production graph database (current default)
- System works with both!
- Python: 3.11+
- Backend: Flask, Flask-SocketIO, eventlet
- Database: neo4j-driver, networkx
- AI/ML: sentence-transformers, anthropic
- PDF Processing: PyPDF2, pdfplumber
- Research APIs: arxiv, orkg
- Testing: pytest, pytest-asyncio
- Optional: Neo4j 5.26.0 (Windows Service)
Research-Assistant-Tool-/
βββ .claude/
β βββ CLAUDE.md # Agent auto-setup
βββ backend/
β βββ database/
β βββ repositories/ # Repository pattern
β β βββ claim_repository.py
β β βββ document_repository.py
β βββ event_emitter.py # WebSocket events
β βββ neo4j_client.py # Database connection
βββ research_agent/
β βββ graph_database.py # NetworkX
β βββ neo4j_database.py # Neo4j
β βββ transcript_manager.py # NEW: Agent logging
β βββ provenance_verifier.py # NEW: Verification
β βββ normalization/
β β βββ qualifier_extractor.py # CRITICAL
β βββ research_apis/
β βββ arxiv_client.py
β βββ core_client.py
β βββ openalex_client.py
β βββ orkg_client.py
βββ web_ui/
β βββ app.py # Flask application
β βββ agent_config.py # NEW: Multi-CLI support
β βββ document_processor.py # Agent orchestration
β βββ static/
β β βββ css/
β β βββ js/
β β βββ tab_manager.js # NEW: Tab navigation
β β βββ panel_manager.js # NEW: Draggable panels
β β βββ ai_assistant.js # NEW: Chat interface
β β βββ header_manager.js # NEW: Unified header
β βββ templates/
β βββ index.html # Main UI
βββ docs/
β βββ TAB_SYSTEM_ARCHITECTURE.md # NEW: UI architecture
βββ tests/ # 60+ unit tests
β βββ test_provenance_unit.py # NEW: Provenance tests
β βββ test_provenance_simple_integration.py # NEW
βββ test_full_pipeline.py # Complete system test
βββ sample papers/ # Example PDFs
Core Endpoints:
GET /api/graph- Get full graph dataPOST /api/upload-document- Upload PDFPOST /api/process-document- Extract claimsGET /api/documents- List all documentsGET /api/claims- List all claims
Provenance Endpoints:
GET /api/nodes/<id>/provenance- Get node provenanceGET /api/agents/<id>/transcript- Get agent transcriptGET /api/agents/<id>/created-nodes- Get agent's nodes
Assistant Endpoint:
POST /api/assistant/chat- AI chat assistant
Settings Endpoints:
POST /api/update-confidence- Update claim confidencePOST /api/create-manual-claim- Create claim via chat
# Full pipeline test (run by agent automatically)
python test_full_pipeline.py
# Critical tests (must always pass)
python run_tests.py critical
# Provenance tests (23 tests)
pytest tests/test_provenance_unit.py -v
pytest tests/test_provenance_simple_integration.py -v
# All tests
python run_tests.py all- Extract claims from hundreds of papers
- Identify consensus and disagreements
- Track how claims evolve over time
- Visualize research landscape interactively
- Cross-reference claims across papers
- Find supporting/contradicting evidence
- Build evidence networks with semantic matching
- Track confidence and investigation scores
- Visualize research landscapes
- Discover hidden connections via graph traversal
- Identify research gaps through missing links
- Export to standard formats (Cypher, GraphML, JSON)
- Complete provenance tracking
- Audit trail for all data
- Reproducible workflows
- Trust verification system
- Support Agent: Finds supporting evidence
- Challenge Agent: Finds contradictions
- Analysis Agent: Examines definitions and concepts
- All logged: Full transcripts with provenance
// Find similar claims
MATCH (c1:Claim)-[:SIMILAR_TO]-(c2:Claim)
WHERE c1.similarity_score > 0.85
RETURN c1, c2
// Claim hierarchies with provenance
MATCH (c:Claim)-[:MERGED_INTO]->(sc:SuperClaim)
RETURN sc.text, sc.created_by_agent_id, count(c) as num_claims
// Get agent's created nodes
MATCH (n)
WHERE n.created_by_agent_id = $agent_id
RETURN n
// Verify provenance chain
MATCH (d:Document)<-[:DISCOVERED]-(c:Claim)
WHERE d.discovered_by_agent_id = c.created_by_agent_id
RETURN d, c- Cypher (Neo4j import)
- GraphML (Gephi, Cytoscape)
- JSON (custom analysis)
- Agent Transcripts (JSON logs)
- Interactive web UI at
http://localhost:5000 - AI assistant for help and guidance
- Contextual tooltips throughout UI
STATUS.md- Complete system statusPROJECT_INIT.md- Technical initialization guidedocs/TAB_SYSTEM_ARCHITECTURE.md- UI architecture.claude/CLAUDE.md- Agent workflowtests/README.md- Testing guideAGENT_INSTRUCTIONS.md- Agent setup guide
This system is designed for agent-orchestrated workflows. To contribute:
- Clone repository
- Start Claude Code or Codex
- Let agent set everything up
- Make changes
- Agent runs tests automatically before commits
Key areas for contribution:
- Additional research API integrations
- Enhanced semantic matching algorithms
- More visualization options
- Additional agent types
- Performance optimizations
[Specify license]
Built on:
- Neo4j - Graph database
- NetworkX - Python graph library
- Flask + SocketIO - Web framework with real-time updates
- D3.js - Interactive graph visualization
- Sentence-Transformers - Semantic embeddings
- Claude Code - AI assistant backend
- arXiv - Open access preprints
- CORE - Open access aggregator
- OpenAlex - Scholarly metadata
- ORKG - Open Research Knowledge Graph
System: β Production Ready Web UI: β Fully Functional with Tab Navigation + AI Assistant Provenance: β Complete with Verification System Testing: β 60+ Unit Tests + 23 Provenance Tests Agent Support: β Claude Code, OpenAI, Gemini, Custom Platform: β Windows (with auto-install scripts) Database: β Neo4j (default) + NetworkX (fallback)
- β¨ Interactive web UI with real-time updates
- π¨ Tab navigation system with draggable panels
- π€ AI chat assistant powered by Claude Code
- π Complete provenance tracking with verification
- π§ Semantic evidence matching with configurable models
- π Agent transcript logging with file persistence
- βοΈ User-configurable settings UI
- π Document finder agent with multi-source support
Ready to verify research claims at scale with full transparency! π
Questions?
- Start the web UI:
cd web_ui && python app.py - Ask the AI assistant in the bottom-left panel
- Or start your AI agent and ask - it knows everything!