Skip to content

ad23b1012/MemoryPalAI

Repository files navigation

🧠 MemoryPalAI – Intelligent Knowledge Workspace

Your Personal AI Tutor β€’ Knowledge Extractor β€’ Quiz Generator β€’ Learning Companion

πŸ”— Live Demo: https://memorypalai.onrender.com
πŸ“¦ Tech Stack: Streamlit β€’ LangGraph β€’ Gemini 2.5 Flash β€’ Pinecone β€’ SentenceTransformers β€’ PyMuPDF β€’ Python


πŸš€ Overview

MemoryPalAI is an Agentic AI Learning System that autonomously:

  • Processes documents, audio, PDFs, URLs
  • Extracts text + style + tags + topics
  • Generates embeddings and stores them in Pinecone
  • Performs RAG (retrieval augmented generation) for grounded answering
  • Generates quizzes based on retrieved content
  • Evaluates user answers
  • Creates revision notes for weak topics
  • Maintains long-term user performance memory

It acts as a complete AI learning companion.


πŸ—‚οΈ Features

πŸ“₯ Smart Ingestion

  • Supports PDF, TXT, audio (mp3/wav/m4a), URLs
  • Automatic text extraction
  • Detects subject, style, tone, tags, topic
  • Splits text using RecursiveCharacterTextSplitter
  • Embeds with Gemini text-embedding-004

πŸ”Ž Retrieval-Augmented QA

  • Retrieves top-k relevant chunks from Pinecone
  • Answers ONLY using retrieved context
  • If unavailable β†’ β€œI don't know based on the provided documents.”

🧠 Auto Learning Plan

Generates a 3-phase learning plan from your query and context.


🧩 Quiz Agent

  • Creates quizzes from retrieved content
  • Fully interactive MCQ interface

πŸ“Š Quiz Evaluation

  • Explains each answer
  • Computes final score
  • Highlights weak concepts

πŸ” Revision Agent

Triggered when score < 70%:

  • Generates concise revision notes
  • Suggests YouTube search links
  • Provides self-check questions
  • Stores revision history per topic

🧡 Knowledge Graph (Lite)

  • Builds relationships between topics and tags
  • Visualized using custom graph UI

πŸ—οΈ Architecture

                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚            User Uploads             β”‚
                β”‚ (PDF / Text / Audio / URL Input)    β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                     β”‚   Ingestion Agent   β”‚
                     β”‚ Text Extraction +   β”‚
                     β”‚ Chunking + Tagging  β”‚
                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                     β”‚  Embedding Service  β”‚
                     β”‚ (Gemini Embeddings) β”‚
                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                     β”‚     Pinecone DB     β”‚
                     β”‚  Vector + Metadata  β”‚
                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β–Ό                     β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ Retrieve & Answer β”‚   β”‚   Knowledge Graph    β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚    Quiz Generator   β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚  Quiz Evaluation    β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
              Score < 70% ?
                    β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β–Ό                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Revision Agent     β”‚    β”‚   End of Cycle     β”‚
β”‚ Weak Topic Notes    β”‚    β”‚   Good Score!      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Screenshot 2025-11-14 at 11 44 22β€―AM

πŸ§‘β€πŸ’» Tech Stack

Frontend

  • Streamlit
  • Custom UI components

Backend

  • Python
  • LangGraph Agents
  • Gemini 2.5 Flash
  • Sentence Transformers
  • PyMuPDF

Database

  • Pinecone Vector DB
  • Local JSON memory

βš™οΈ Installation

1. Clone Repo

git clone https://github.com/your-username/MemoryPalAI.git
cd MemoryPalAI

2. Create Environment

conda create -n memorypal python=3.11 -y
conda activate memorypal

3. Install Dependencies

pip install -r requirements.txt

4. Add .env

GOOGLE_API_KEY=your_key
GOOGLE_API_KEY_2=optional_secondary_key
PINECONE_API_KEY=your_pinecone_key
PINECONE_INDEX_NAME=memorypal-ai
PINECONE_NAMESPACE=memorypal

▢️ Running the App

Local:

streamlit run frontend/streamlit_app.py

Render Deployment:

streamlit run frontend/streamlit_app.py --server.port=$PORT --server.address=0.0.0.0

🌐 Deployment

Deployed at:
πŸ‘‰ https://memorypalai.onrender.com


Agentic AI Evaluation

Agentic Characteristics

Characteristic Implementation
Autonomous Full ingestion β†’ retrieval β†’ quiz β†’ revision loop
Goal Oriented Learning goal–driven reasoning
Planning Auto 3-phase learning plan
Reasoning Retrieval-grounded responses
Adaptability Adaptive revision notes
Content Awareness Style, tone, topic, tag extraction

System Components

Component Description
Brain Gemini Flash 2.5
Orchestrator LangGraph
Tools Embedding, Style Detector, Pinecone, Graph
Memory Pinecone + user_profile.json
HITL User uploads, quiz answering

πŸ‘₯ Team Contributions

  • Abhishek (AD23B1012) β€” Architected retrieval pipeline, UI, embedding flow.
  • Izhaar Ahmed (23BDS053) β€” Implemented ingestion, style/tone/tag extraction, Pinecone indexing.
  • Jashwanth (AD23B1020) β€” Built Quiz Agent & Evaluation Agent workflows.
  • Swarup G L (AD23B1020) β€” Developed knowledge graph, session manager, and agent orchestration.

Conclusion

MemoryPalAI is a complete autonomous learning system powered by Agentic AI.
It processes knowledge, quizzes users, evaluates performance, and generates personalized revision notes.


Contribute to MemoryPalAI

MemoryPalAI is fully open to contributions!
We welcome improvements, bug fixes, new ideas, and feature enhancements.

If you find this project useful, please ⭐ star the repository β€”
your support motivates us and helps the project grow! πŸš€

Feel free to submit issues or pull requests anytime.
We’re excited to see your contributions! ❀️


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors