MIRA (Molecule Insights Research Assistant) is an experimental prototype that demonstrates how modern AI can intelligently provide accurate information about decentralized science (DeSci) and Molecule's ecosystem.
MIRA is a smart chatbot that can answer questions about anything related to Molecule and the DeSci ecosystem. This includes, but is not limited to:
- DeSci (Decentralized Science) - The movement to make scientific research more open and accessible
- Molecule Platform - All features, products, and services offered by Molecule
- IP-NFTs - Tokenizing intellectual property and research assets
- Research Funding - Grants, investments, and new funding mechanisms
- DAOs & Governance - BioDAOs, VitaDAO, and decentralized organizations
- DeSci Tools - Various tools and protocols in the ecosystem
- Community & Events - DeSci conferences, initiatives, and collaborations
- And much more! - Any topic connected to Molecule's mission and the broader DeSci movement
- 🤖 Smart Decision Making: MIRA decides on its own whether it has enough information to answer your question
- 📚 Local Knowledge Base: Contains curated information about Molecule and DeSci
- 🌐 Web Search Fallback: Automatically searches the web when local knowledge isn't enough
- 👍👎 Feedback System: Help improve MIRA by rating responses
- 🔍 Source Transparency: Always shows where information comes from
MIRA uses a three-step intelligent process called "Agentic RAG" (Retrieval Augmented Generation):
When you ask a question, MIRA first searches its local knowledge base for relevant information using advanced semantic search that understands meaning, not just keywords.
MIRA then evaluates the information it found:
- Sufficient Context? → Use local knowledge to answer
- Insufficient but Relevant? → Search the web for current information
- Off-topic? → Politely decline with an explanation
Based on its decision, MIRA either:
- Provides an answer from trusted local sources
- Searches the web for up-to-date information (focusing on trusted domains)
- Explains that the question is outside its expertise
MIRA combines several technologies:
- Responsive chat interface
- Real-time streaming responses
- Interactive feedback buttons
- Vector Search: Finds information by meaning and context
- Hybrid Search: Combines semantic understanding with keyword matching
- Fast & Efficient: Delivers relevant results quickly
- Understands natural language questions
- Evaluates context quality
- Generates human-like responses
- Web search capabilities for current information
- Tracks system performance
- Collects user feedback
- Helps improve responses over time
- Ensures quality and reliability
Here's how MIRA processes your questions:
┌─────────────────────┐
│ User Question │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Search Local │
│ Knowledge Base │
│ (LanceDB) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Evaluate Context │
│ Is it sufficient? │
└──────────┬──────────┘
│
┌──────┴──────┬─────────────┐
│ │ │
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Yes │ │ No, │ │ No & │
│ │ │ but │ │ Off- │
│ Local │ │Relevant │ │ topic │
│ Answer │ │ │ │ │
└─────────┘ │ Web │ └─────────┘
│ Search │
│ (GPT-4o)│
└─────────┘
│
┌───────────┴─────────────┐
│ │
▼ ▼
┌─────────────────────┐ ┌─────────────────────┐
│ Generate Answer │ │ "Sorry, I can't │
│ with Sources │ │ help with that" │
└──────────┬──────────┘ └──────────┬──────────┘
│ │
└───────────┬───────────┘
│
▼
┌─────────────────────┐
│ Display Answer │
│ 👍 👎 │
└─────────────────────┘
│
▼
┌─────────────────────┐
│ Langfuse Monitoring │
│ (Track & Improve) │
└─────────────────────┘
- You ask a question → MIRA receives your query
- Searches local knowledge → Uses LanceDB's semantic search to find relevant information
- Makes a smart decision:
- ✅ Sufficient info? → Answers from local knowledge
- 🌐 Not enough but relevant? → Searches the web for current info
- ❌ Off-topic? → Politely declines
- Generates response → Creates a helpful answer with sources
- You rate the answer → Helps MIRA improve over time
- Python 3.8 or higher
- Virtual environment (recommended)
-
Clone the repository
git clone [repository-url] cd molecule-chainlit
-
Create and activate virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.env
file with:OPENAI_API_KEY=your_openai_api_key LANGFUSE_PUBLIC_KEY=your_langfuse_public_key LANGFUSE_SECRET_KEY=your_langfuse_secret_key
-
Run the application
chainlit run app.py
-
Open your browser Navigate to
http://localhost:8000
- MIRA v0 is an experimental prototype, not a production-ready application
- Used for learning about robust AI systems and gathering user feedback
- Responses should be verified for critical decisions
- Local knowledge base contains curated information about Molecule and DeSci
- Web search results are filtered to prioritize trusted domains like:
- molecule.to
- molecule.xyz
- bio.xyz
- vitadao.com
- ...