Skip to content

About

A book specifc learning app branched from the DentalQuest application

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

DentalQuest: An Adaptive Learning System for Dental Education using Knowledge Graph and Retrieval-Augmented Generation

DentalQuest is an AI-powered adaptive learning platform that combines knowledge graphs, neural retrieval, and large language models to deliver personalized dental education and assessment.


What DentalQuest Does

  • Converts dental learning material into a structured Knowledge Graph
  • Retrieves clinically relevant concepts using graph-enhanced embeddings
  • Generates adaptive MCQs with explanations using an LLM
  • Tracks learner mastery over time and adjusts question difficulty
  • Provides an interactive dashboard for self-assessment and progress tracking

System Architecture

DentalQuest Architecture Figure 1:High-level architecture showing offline knowledge preparation and the online adaptive learning loop.

Key Features

  • Multimodal Knowledge Graph: Constructs a structured domain-specific graph from dental datasets, linking concepts (e.g., "Dental Caries") with their clinical attributes.
  • GNN-Enhanced Retrieval: Uses a Graph Convolutional Network (GCN) to refine BioBERT embeddings, capturing inter-concept relationships for 94% Top-1 retrieval accuracy.
  • MedGemma RAG Engine: Generates context-aware multiple-choice questions (MCQs) and explanations using the MedGemma-4b-it Large Language Model.
  • Adaptive Knowledge Tracing: Implements Bayesian Knowledge Tracing (BKT) to dynamically model learner mastery and adjust question difficulty in real-time.
  • Interactive Dashboard: A Gradio-based interface for students to take quizzes, track progress, and visualize their knowledge gaps.

Repository Structure

This project follows a modular source layout. Please run all commands from the root directory.

DentalQuest/
├── data/                   # Store your JSON dataset files here
├── models/                 # Stores trained GNN embeddings (.pkl)
├── src/                    
│   ├── core.py             # Backend logic (RAG, BKT, Knowledge Graph)
│   ├── gnn_train.py        # GNN training script (GCN/GAT)
│   ├── kg_viz.py           # Network visualization scripts
│   └── gnn_viz.py          # Embedding analysis (t-SNE plots)
├── app.py                  # Web application entry point
├── requirements.txt        # Python dependencies
└── README.md               

Environment Setup

1. Prerequisites

  • Python 3.10+
  • CUDA-enabled GPU (Recommended for MedGemma & GNN training)
  • Hugging Face Account (For model access)

2. Installation

Run the following commands in your terminal after cloing the repositiory.

Install base requirements

pip install -r requirements.txt

Install Graph Neural Network binaries (Crucial Step!) FOR CUDA 11.8 (Most GPUs):

pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f [https://data.pyg.org/whl/torch-2.0.0+cu118.html](https://data.pyg.org/whl/torch-2.0.0+cu118.html)

3. API Configuration

DentalQuest needs access to the Hugging Face Hub to download the MedGemma-4b-it model. This requires a personal access token.

Steps to get a Hugging Face token:

  1. Go to Hugging Face and sign up or log in.
  2. Click on your profile picture → Settings → Access Tokens.
  3. Click New token, give it a name, select read scope, and click Generate.
  4. Copy the generated token.

Add the token to DentalQuest:

  1. Check for a .env file in the root of the repository. If it doesn’t exist, create one.
  2. Open .env and add your Hugging Face token:
    HF_TOKEN=your_huggingface_token_here
  3. Save the file. The system will automatically load this token at startup using python-dotenv.

Note: Do not commit your .env file to GitHub or any version control system. It is already included in .gitignore

4. Usage

Phase 1: Data Preparation

Ensure your dental synopsis JSON files are placed inside the data/ directory. The system automatically loads all .json files found there.

Phase 2: Train GNN Embeddings

To enable the "Graph-Enhanced" retrieval mode, train the GNN model:

python3 -m src.gnn_train

This will save the trained embeddings to models/gcn_enhanced_embeddings.pkl.

Phase 3: Run the Application

Launch the interactive learning dashboard:

python3 app.py

Open your browser to the local URL provided.

Visualizations

Knowledge Graph Network: Generates the network topology and community detection plots.

python3 -m src.kg_viz

Embedding Space (t-SNE): Generates the comparison between BioBERT and GNN embeddings.

python3 -m src.gnn_viz

License

This project is licensed under the Apache-2.0 License. See LICENSE for details.

Contact

For questions or clarifications, please contact drajo_george@Dicemed.in

About

A book specifc learning app branched from the DentalQuest application

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages