An AI-powered research assistant that helps explore NASA research papers using Retrieval-Augmented Generation (RAG) technology. Built with Next.js, Pinecone vector database, and Google's Gemini Flash model.
- 🚀 NASA Research Database: Access to comprehensive NASA research papers and studies
- 🤖 AI-Powered Chat: Intelligent responses using Google Gemini Flash model
- 🔍 Vector Search: Advanced semantic search through Pinecone vector database
- 📊 Research Categories: Organized exploration tabs for different research areas:
- Astrobiology & Life Sciences
- Mars Research & Exploration
- Exoplanet Discovery & Analysis
- Space Medicine & Human Factors
- 🎨 Modern UI: Responsive design with NASA-themed styling and dark mode
- 📱 Mobile Friendly: Optimized for all device sizes
Before you begin, ensure you have:
- Node.js 18+ installed
- Pinecone account with vector database indexes already uploaded
- Google AI API key for Gemini Flash model
- Clone the repository:
git clone https://github.com/akcode7/nasa_hackathon_rag.git
cd nasa_hackathon_rag- Install dependencies:
npm install- Create
.env.localfile with your API keys:
# Pinecone Configuration
PINECONE_API_KEY=your_pinecone_api_key_here
PINECONE_INDEX_NAME=your_nasa_index_name_here
# Google Gemini API Configuration
GOOGLE_API_KEY=your_gemini_api_key_here
# App Configuration
NODE_ENV=development- Sign up at Pinecone
- Create a new index with your NASA research data
- Copy your API key and index name to
.env.local
- Visit Google AI Studio
- Create a new API key
- Add it to your
.env.localfile
- Start the development server:
npm run dev- Open http://localhost:3000 in your browser
This project is designed to work with NASA research papers from:
- NASA Hackathon Dataset
- Research papers covering astrobiology, space medicine, planetary science, and more
- Start a Conversation: Ask questions about NASA research, space biology, or planetary science
- Explore Categories: Use the suggestion tabs to explore different research areas
- View Sources: Each AI response includes references to relevant research papers
- Follow Suggestions: Click on suggested questions to dive deeper into topics
src/
├── app/
│ ├── api/
│ │ ├── chat/ # Chat API endpoint
│ │ └── suggestions/ # Suggestions API endpoint
│ ├── layout.js # Root layout
│ └── page.js # Main page
├── components/
│ └── ChatInterface.js # Main chat UI component
└── lib/
├── pinecone.js # Pinecone vector DB integration
└── gemini.js # Gemini AI integration
- Query Processing: User questions are processed and optimized
- Vector Search: Relevant research papers retrieved from Pinecone
- Context Building: Research context assembled for AI model
- Response Generation: Gemini Flash generates informed responses
- Source Attribution: Citations and sources provided with answers
- Dynamic suggestions based on active research category
- AI-generated exploration prompts
- Curated questions covering major NASA research themes
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically
The app can be deployed on any Node.js hosting platform. Ensure environment variables are configured properly.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
API Keys Not Working:
- Verify all environment variables are set correctly
- Check API key permissions and quotas
Pinecone Connection Issues:
- Ensure your Pinecone index name is correct
- Verify your vector database has data uploaded
No Research Results:
- Check if your Pinecone index contains NASA research data
- Verify index metadata structure matches the expected format
This project is licensed under the MIT License - see the LICENSE file for details.
- NASA for providing research data and inspiration
- Pinecone for vector database technology
- Google for Gemini AI model
- Next.js team for the excellent framework