https://github.com/dhruvvkdv/teaching-assistant
AI-Enhanced Teaching Assistant: Bridging Instructor Knowledge and Web Intelligence
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.2%) to scientific vocabulary
Keywords
Repository
AI-Enhanced Teaching Assistant: Bridging Instructor Knowledge and Web Intelligence
Basic Info
- Host: GitHub
- Owner: DHRUVvkdv
- Language: Python
- Default Branch: main
- Homepage: https://teachingassistant-dv.streamlit.app/
- Size: 327 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
AI-Enhanced Teaching Assistant: Bridging Instructor Knowledge and Web Intelligence
Click here to view the live project
Student Side
Student Side | AI-Enhanced Teaching Assistant: Bridging Instructor Knowledge and Web Intelligence
Instructor Side
Instructor Side | AI-Enhanced Teaching Assistant: Bridging Instructor Knowledge and Web Intelligence
Watch full Instructor side demo
Project Overview and Goals
This project implements an advanced AI-powered teaching assistant that combines knowledge from multiple professors with real-time web information to provide comprehensive, accurate, and personalized responses to student queries. The system leverages a team of AI agents working collaboratively to enhance the learning experience across various subjects and professors.
Goals
- Integrate knowledge from multiple professors with up-to-date web information.
- Provide personalized and comprehensive responses to student queries.
- Enhance student learning through interactive and adaptive content presentation.
- Demonstrate the effective use of LangGraph and Tavily API in a multi-agent system.
Key Features
- Multi-Professor Support: Students can select from multiple professors, accessing specialized knowledge bases for each.
- Web-Enhanced Responses: Combines professor-specific knowledge with current web information for comprehensive answers.
- Personalized Learning: Tailors responses based on the selected professor and student preferences.
- Multi-source Integration: Merges professors' notes and web information seamlessly.
- Intelligent Query Processing: Utilizes embeddings and language models for accurate understanding.
- Interactive Learning Formats: Supports MCQs, case studies, and various presentation styles.
- Multi-language Support: Includes dynamic translation for global accessibility.
Architecture
The project uses a multi-agent system architecture:
- Query Processing Agent: Prepares and reformulates the user's query.
- Vector DB Agent: Searches the Pinecone database for relevant notes from the selected professor.
- Web Search Agent: Performs web searches using the Tavily API to supplement professor knowledge.
- Result Processing Agent: Synthesizes information from vector DB and web search.
- Response Formatting Agent: Structures the response in a consistent format.
- Translator Agent: Handles translation of the final response if needed.
The workflow of these agents is orchestrated using the LangGraph framework.

Technologies Used
- FastAPI: Web framework for backend API.
- Pinecone: Vector storage for efficient retrieval of professor-specific knowledge.
- Tavily API: Web search for up-to-date information.
- LangGraph: Agent workflow orchestration.
- Amazon Bedrock: Language model inference.
- AWS Services: S3, Lambda, DynamoDB for cloud infrastructure.
- PyPDF2: PDF processing for professor notes and materials.
- Streamlit: User-friendly frontend interface.
Setup and Installation
- Clone the repository:
sh git clone https://github.com/DHRUVvkdv/teaching-assistant.git cd ai-teaching-assistant Install dependencies:
```sh pip install -r requirements.txt
```
Set up environment variables: Create a
.envfile in the root directory and add the following:PINECONE_API_KEY=your_pinecone_api_key TAVILY_API_KEY=your_tavily_api_key AWS_ACCESS_KEY_ID=your_aws_access_key AWS_SECRET_ACCESS_KEY=your_aws_secret_keyInitialize the Pinecone index:
sh python scripts/initialize_pinecone.pyRun the FastAPI server:
sh uvicorn main:app --reloadRun the Streamlit frontend:
sh streamlit run streamlit_app.py
Usage
API Endpoints
- POST /combined_query: Submit a query for processing by the AI teaching assistant.
- GET /querystatus/{queryid}: Check the status of a submitted query.
- POST /processallpdfs: Process and index all PDFs for a specific teacher.
- GET /listprocessedfiles: List all processed files for a teacher.
Example Usage
```python import requests
APIBASEURL = "http://api-base-url.com" APIKEY = "apikey_here"
Submit a query
querydata = { "querytext": "How does pressure work in fluids?", "teachername": "drvinay", "targetlanguage": "en" } headers = { "API-Key": APIKEY, "Content-Type": "application/json" } response = requests.post(f"{APIBASEURL}/combinedquery", json=querydata, headers=headers) queryid = response.json()["query_id"]
Check query status
statusresponse = requests.get(f"{APIBASEURL}/querystatus/{queryid}", headers=headers) print(statusresponse.json())
Process all PDFs for a teacher
processdata = {"teachername": "drvinay"} processresponse = requests.post(f"{APIBASEURL}/processallpdfs", json=processdata, headers=headers) print(process_response.json())
List processed files
listresponse = requests.get(f"{APIBASEURL}/listprocessedfiles?teachername=drvinay", headers=headers) print(list_response.json()) ```
User Interface
The Streamlit-based user interface provides the following features:
- Customizable themes and fonts.
- Dynamic, searchable language selection.
- Options for different presentation styles.
- MCQ generation based on query results.
- Real-time, client-side translation of results.
Contributing
We welcome contributions to the AI-Enhanced Teaching Assistant project. Please follow these steps to contribute:
- Fork the repository.
- Create a new branch:
sh git checkout -b feature/AmazingFeature - Make your changes.
- Commit your changes.
sh git commit -m 'Add some AmazingFeature' - Push to the branch:
sh git push origin feature/AmazingFeature - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Acknowledgments
- Tavily API for providing powerful web search capabilities.
- LangGraph framework for enabling the creation of complex AI agent workflows.
- The open-source community for their invaluable contributions to the tools and libraries used in this project.
Owner
- Name: Dhruv Varshney
- Login: DHRUVvkdv
- Kind: user
- Location: USA
- Repositories: 1
- Profile: https://github.com/DHRUVvkdv
Learning to get better.
GitHub Events
Total
- Watch event: 9
- Fork event: 2
Last Year
- Watch event: 9
- Fork event: 2
Dependencies
- public.ecr.aws/lambda/python 3.11 build
- PyPDF2 *
- boto3 ==1.34.117
- fastapi *
- langchain ==0.2.1
- langchain-aws ==0.1.6
- mangum ==0.17.0
- pinecone-client *
- uvicorn ==0.30.0