AI Research Assistant Usage Guide
Guides researchers through installing and using a tool that combines knowledge graphs, semantic search, and AI agents for paper analysis.
What this file does
Guides researchers through installing and using a tool that combines knowledge graphs, semantic search, and AI agents for paper analysis.
When to use it
- You want to analyze academic papers and identify research gaps
- You need to set up a research assistant with Neo4j and local or cloud AI models
- You are building a web interface for research analysis with multiple search modes
- You want to visualize a knowledge graph of papers, concepts, authors, and methods
Assumes this stack
AI Research Assistant Usage Guide
Overview
The AI Research Assistant is a powerful tool that combines knowledge graphs, semantic search, and AI agents to help researchers analyze academic papers, identify research gaps, and generate hypotheses. The system supports both local and cloud-based AI models, with a focus on privacy and flexibility.
Prerequisites
- Python 3.8+
- Neo4j Database
- Ollama (for local models)
- OpenAI API key (optional, for cloud models)
- 8GB+ RAM for local models
Installation
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
# Required
export NEO4J_URI="bolt://localhost:7687"
export NEO4J_USER="neo4j"
export NEO4J_PASSWORD="your_password"
# Optional
export MODEL_PROVIDER="local" # or "openai"
export OPENAI_API_KEY="your_key" # if using OpenAI
Starting the Application
Run the application:
python main.py
The web interface will be available at http://localhost:8000
Using the Interface
The application provides four main modes of operation:
1. Research Analysis
The Research Analysis tab provides a complete research workflow:
- Enter a research topic (e.g., "transformer attention mechanisms")
- Select your preferred model provider (Local or OpenAI)
- Click "Research"
- The system will:
- Fetch relevant papers from arXiv
- Build a knowledge graph
- Analyze research trends
- Identify gaps
- Generate hypotheses
2. Semantic Search
The Semantic Search tab provides high-level semantic search capabilities:
- Enter your search query
- Adjust the similarity threshold (0.0 to 1.0)
- Higher values (e.g., 0.8) return more precise matches
- Lower values (e.g., 0.5) return more results but may be less relevant
- Click "Search"
- View results with similarity scores
3. Embedding Search
The Embedding Search tab provides direct access to embedding vectors:
- Enter your search query
- Adjust parameters:
- Similarity threshold (0.0 to 1.0)
- Result limit (1 to 100)
- Click "Search Embeddings"
- View results including:
- Paper details
- Similarity scores
- Raw embedding vectors (expandable)
4. Knowledge Graph Visualization
The Knowledge Graph tab provides an interactive visualization of the research network:
-
Search Functionality:
- Enter search terms in the search box
- Filter by node type (Papers, Concepts, Authors, Methods)
- Use the Reset button to clear search and restore view
-
Navigation:
- Zoom: Use mouse wheel or pinch gesture
- Pan: Click and drag
- Focus: Click on a node to center it
- Reset View: Click the Reset button
-
Node Types and Colors:
- Papers: Blue
- Concepts: Red
- Authors: Green
- Methods: Orange
-
Search Results:
- Matching nodes are highlighted in gold
- Results count is displayed
- First match is automatically focused
Understanding the Results
Research Analysis Results
- Research Overview: Summary of papers found and analysis time
- Key Concepts: Important terms and concepts identified
- Research Trend Analysis: Insights into dominant areas and emerging topics
- Research Gap Analysis: Identified gaps in current research
- Generated Hypotheses: Suggested research directions
Semantic Search Results
- Similar Papers: Papers ranked by semantic similarity
- Similarity Scores: Percentage indicating how closely each paper matches your query
- Abstracts: Paper summaries for quick review
Embedding Search Results
- Query Embedding: The vector representation of your search query
- Paper Embeddings: Vector representations of matching papers
- Similarity Scores: Cosine similarity between query and paper embeddings
- Raw Vectors: Expandable sections showing the actual embedding vectors
Knowledge Graph Results
- Node Information: Hover over nodes to see details
- Relationship Types: Different types of connections between nodes
- Search Matches: Highlighted nodes showing search results
- Node Types: Color-coded nodes for different entity types
Advanced Usage
Local vs. Cloud Models
The system supports two model providers:
-
Local (Ollama):
- Models: llama3.1:8b, codellama:7b, nomic-embed-text
- Advantages: Privacy, no API costs
- Requirements: 8GB+ RAM
-
Cloud (OpenAI):
- Models: gpt-4, text-embedding-3-small
- Advantages: Better performance, no local resources
- Requirements: OpenAI API key
Knowledge Graph Structure
The Neo4j database stores:
- Paper Nodes: Research papers with metadata and embeddings
- Concept Nodes: Key concepts and terms
- Author Nodes: Paper authors
- Method Nodes: Research methods and techniques
- Relationships: Connections between papers, concepts, authors, and methods
API Endpoints
The system provides several REST API endpoints:
POST /research: Full research analysisPOST /semantic-search: Semantic searchPOST /embedding-search: Direct embedding searchGET /graph-data: Knowledge graph dataGET /health: Health check
Troubleshooting
Common Issues
-
Neo4j Connection Errors:
- Verify Neo4j is running
- Check connection credentials
- Ensure Neo4j has enough memory
-
Model Loading Issues:
- For local models: Ensure Ollama is running
- For OpenAI: Verify API key
- Check system memory
-
Search Performance:
- Adjust similarity threshold
- Reduce result limit
- Use more specific queries
-
Graph Visualization Issues:
- Clear browser cache
- Check browser console for errors
- Ensure sufficient memory for large graphs
Performance Tips
-
Local Models:
- Close other memory-intensive applications
- Use smaller models if memory is limited
- Consider using cloud models for large datasets
-
Search Optimization:
- Start with higher similarity thresholds
- Use specific, focused queries
- Limit results when possible
-
Graph Visualization:
- Use type filters to reduce visible nodes
- Focus on specific subgraphs
- Use search to find relevant nodes quickly
Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues for:
- Bug fixes
- Feature requests
- Documentation improvements
- Performance optimizations
License
[Your License Here]
Contact
[Your Contact Information]
What's inside
7 sections: overview, prerequisites, installation, interface modes, results explanation, advanced usage, troubleshooting
Change this for your project
- Replace
kishdubey/research-assistantwith your own repository name - Replace
[Your License Here]with your actual license - Replace
[Your Contact Information]with your contact details
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Offers four distinct modes (research analysis, semantic search, embedding search, knowledge graph) to cover different user needs
- Provides troubleshooting tips for common issues like Neo4j connection and model loading
Related Documents
Building SupportX AI Assist: A Multi-Agent IT Support System
Describes building a multi-agent IT support system with AutoGen, Azure AI Search, and Gemini embeddings for instant issue resolution and automatic escalation.
Intelligent Document Query Platform โ GitHub-ready Low-Level Design (LLD)
Provides a copy-ready low-level design for a serverless document query platform with vector search and LLM integration.
Graph Matching with Topological Features
Teaches enhanced graph matching by combining spatial distances with node2vec and commute times embeddings, then applying the Hungarian algorithm.
Pulse โ Life Cofounder | Build Log
Documents a full-stack monorepo that ingests LinkedIn and GitHub data, generates embeddings in-browser, and provides a RAG chat with an AI cofounder.