MoleculeX now includes powerful Google Gemini AI features for enhanced analysis quality!
- Smart Sorting: Automatically ranks clinical trials, patents, and literature by relevance
- Context-Aware: Understands query intent beyond simple keyword matching
- Quality Filter: Prioritizes high-quality, relevant results
- Natural Language: Human-readable insights instead of template text
- Market Intelligence: Intelligent opportunity and competition analysis
- Professional Tone: Compelling summaries suitable for business decisions
- Quality Assessment: AI evaluates data comprehensiveness and relevance
- Blended Scoring: Combines quantitative metrics with qualitative analysis
- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy the generated API key
-
Navigate to the backend directory:
cd backend -
Create a
.envfile:# Windows copy .env.example .env # Mac/Linux cp .env.example .env
-
Edit
.envand add your API key:GEMINI_API_KEY=your_actual_api_key_here
pip install -U google-genaipython main.pyYou should see in backend logs:
✅ Semantic search initialized (Gemini-powered)
The app works perfectly fine without Gemini:
- Basic Mode: Uses count-based ranking and template summaries
- No AI Calls: No external API dependencies
- Still Functional: All core features work normally
You'll see:
⚠️ GEMINI_API_KEY not found, using basic mode
| Feature | Without Gemini | With Gemini |
|---|---|---|
| Result Ranking | Original order | AI-ranked by relevance |
| Executive Summary | Template-based | AI-generated insights |
| Confidence Score | Count-based | AI quality assessment |
| Processing Time | Faster | Slightly slower (+1-2s) |
| Cost | Free | Gemini API usage |
- Free Tier: 60 requests per minute
- Sufficient for: Personal research, demos, testing
- Production: Consider rate limits for high-traffic apps
Learn more: Gemini Pricing
- Go to your Render dashboard
- Select your backend service
- Go to "Environment" tab
- Add environment variable:
- Key:
GEMINI_API_KEY - Value:
your_api_key
- Key:
- Save and redeploy
Submit a query and check logs for:
✅ Generated AI-powered executive summary
✅ Gemini re-ranking applied
pip install -U google-genai- Check
.envfile exists in backend directory - Verify
GEMINI_API_KEY=...line (no quotes needed) - Restart the backend server
- Check your API key is valid
- Verify you have quota remaining
- App will automatically fall back to basic mode
.envfile is missing or incorrect- API key variable name typo
- Backend not restarted after adding key
Analysis of 'respiratory diseases India' reveals 20 relevant clinical trials,
with 8 currently active or recruiting. The competitive landscape shows moderate
competition in India.
Respiratory disease research in India presents a compelling opportunity with
8 active clinical trials addressing high patient burden diseases including
COPD and asthma. The moderate competition landscape, combined with 15 recent
patents in novel delivery mechanisms, suggests significant market potential
for innovative therapeutic interventions targeting underserved patient populations.
- Use Gemini for Production: Significantly better user experience
- Monitor API Usage: Track your Gemini quota
- Fallback Ready: Code gracefully handles API failures
- Test Without Key: Ensure basic mode works before deploying
- Secure Keys: Never commit
.envto git
With Gemini configured, your analyses will be:
- ✨ More insightful
- 🎯 Better ranked
- 📊 Higher quality
- 💼 More professional
Try running a query and compare the results!
Questions? Check the main README or open an issue on GitHub.