MAIA (Memory-Augmented Intelligent Assistant) implements prompt chaining with enhanced long-term recall capabilities for LLM-powered intelligent assistants.
- Python 3.9
- CUDA 11.7
- PyTorch
- Transformers
- Additional dependencies listed in
environment.yml
orrequirements.txt
Install dependencies using either conda:
conda env create --file environment.yml
Or pip:
pip install -r requirements.txt
Create a .env
file with the following environment variables:
SSL_CERT_PATH={Path to SSL fullchain}
SSL_KEY_PATH={Path to SSL privkey}
OPENAI_API_KEY={OpenAI API Key}
PALM_API_KEY={PaLM API Key}
GOOGLE_TTS_API_KEY={Google Cloud Text-to-Speech API Key}
MAIA's core framework is implemented in the MAIAPrompter
class (conversation/prompter.py
). Key features include:
- Context extraction using pretrained transformer attention
- Short-term and long-term memory management
- Multi-step reasoning with dynamic prompt generation
- DPR-based memory retrieval
Launch the Gradio-based web interface for voice and text interactions:
python run_gradio.py [--server_name SERVER_NAME] [--server_port PORT] [--share]
Optional arguments:
--server_name
: Specify server name (default: 0.0.0.0)--server_port
: Specify port number--share
: Enable Gradio's share feature
Start text-based interactions in console:
python app.py
MAIA consists of four main components:
- Context Extraction: Pretrained transformer attention mechanism
- Memory Module: DPR-based retrieval with STM/LTM
- Prompt Generation: Dynamic multi-step reasoning chain
- Response Generation: Template-based response synthesis
MIT License - see LICENSE file for details