EEEGPT is an AI-powered assistant designed to help students and professionals in Electrical and Electronic Engineering (EEE). It leverages advanced language models and vector search to provide accurate, context-based answers from authoritative EEE textbooks.
- Contextual Q&A: Answers questions using content from a trusted EEE textbook PDF.
- Beginner-Friendly: Explains concepts in simple language, with technical terms defined.
- Technical Support: Provides step-by-step reasoning, LaTeX equations, and code snippets (e.g., SPICE netlists) where relevant.
- Source Transparency: Optionally shows source document snippets for each answer.
- Interactive UI: Built with Streamlit for a conversational chat experience.
.
├── connect_memory_with_llm.py
├── create_memory_for_llm.py
├── eeegpt_ui.py
├── test.py
├── requirements.txt
├── README.md
├── data/
│ └── a-textbook-of-electrical-technology-volume-i-basic-electrical-engineering-b-l-theraja.pdf
└── vectorstore/
└── db_faiss/
├── index.faiss
└── index.pkl
- Document Loading: Loads and splits the textbook PDF into manageable text chunks.
- Embedding Generation: Uses HuggingFace's
sentence-transformers/all-MiniLM-L6-v2to create vector embeddings. - Vector Store: Stores embeddings in a FAISS vector database for efficient retrieval.
- LLM Integration: Uses Groq's Llama 3 model via API for generating answers.
- Retrieval-Augmented Generation: Retrieves relevant context from the vector store and feeds it to the LLM for accurate, context-aware responses.
git clone https://github.com/Nobi004/eeegpt.git
cd eeegptpip install -r requirements.txt- Place your EEE textbook PDF(s) in the
data/directory.
Run the following script to process the PDF and build the FAISS vector database:
python create_memory_for_llm.pystreamlit run eeegpt_ui.py- Ask any EEE-related question in the chat interface.
- The assistant will answer using only the information from the provided textbook context.
- If the context is insufficient, it will let you know.
- Add More PDFs: Place additional EEE PDFs in the
data/folder and reruncreate_memory_for_llm.py. - Prompt Engineering: Modify the prompt template in
eeegpt_ui.pyto adjust the assistant's behavior. - Model Settings: Change the LLM or embedding model as needed in the code.
- Ensure all dependencies are installed.
- Make sure the FAISS database exists at
vectorstore/db_faiss/. - Verify your Groq API key is valid and set in the code.
This project is for educational and research purposes only. Please ensure you have the rights to use any PDF content you provide.
Made by Md. Mahmudun Nobi